Bug 1007266 - org.apache.commons.beanutils.PropertyUtilsBean throws java.lang.NoSuchMethodException
org.apache.commons.beanutils.PropertyUtilsBean throws java.lang.NoSuchMethodE...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-sdk-java (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.3.0
Assigned To: Juan Hernández
Ilia Meerovich
infra
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-12 04:16 EDT by Ilia Meerovich
Modified: 2016-07-04 20:07 EDT (History)
6 users (show)

See Also:
Fixed In Version: is15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-21 17:11:50 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 19262 None None None Never

  None (edit)
Description Ilia Meerovich 2013-09-12 04:16:33 EDT
org.apache.commons.beanutils.PropertyUtilsBean throws java.lang.NoSuchMethodException.

For example run:
import java.io.IOException;

import org.apache.http.client.ClientProtocolException;
import org.ovirt.engine.sdk.Api;
import org.ovirt.engine.sdk.exceptions.ServerException;
import org.ovirt.engine.sdk.exceptions.UnsecuredConnectionAttemptError;


public class Foo {
        private static final String URL = "https://*****:443/api";

    public static void main(String[] args) throws ClientProtocolException, ServerException,
            UnsecuredConnectionAttemptError, IOException {
        Api api = new Api(URL, "admin@internal", "*****", true);
       	System.out.print(api.getHosts().list().get(0).getRebootAfterInstallation());
    }
}

and you will see:
java.lang.NoSuchMethodException: Property 'links' has no setter method in class 'class org.ovirt.engine.sdk.decorators.Host'null
	at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:2138)
	at org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBean.java:1957)
	at org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.java:2064)
	at org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:858)
	at org.ovirt.engine.sdk.mapping.Mapper.excludeExceptions(Mapper.java:91)
	at org.ovirt.engine.sdk.mapping.Mapper.map(Mapper.java:58)
	at org.ovirt.engine.sdk.common.CollectionDecorator.unmarshall(CollectionDecorator.java:185)
	at org.ovirt.engine.sdk.common.CollectionDecorator.list(CollectionDecorator.java:164)
	at org.ovirt.engine.sdk.common.CollectionDecorator.list(CollectionDecorator.java:137)
	at org.ovirt.engine.sdk.decorators.Hosts.list(Hosts.java:75)
	at debugRemove.main(debugRemove.java:15)
Comment 1 Ilia Meerovich 2013-09-12 04:19:05 EDT
build is14
Comment 2 Michael Pasternak 2013-09-12 04:33:15 EDT
even if we'll file a bug for PropertyUtilsBean, it won't be addressed in any near
feature, so i'll provide a workaround in sdk,

Ilia,

can you please run all your tests and check if the only place where 
PropertyUtilsBean.setSimpleProperty fails is a 'links' property?

thanks.
Comment 4 Ilia Meerovich 2013-09-17 11:51:22 EDT
verified with is15
Comment 6 Itamar Heim 2014-01-21 17:11:50 EST
Closing - RHEV 3.3 Released

Note You need to log in before you can comment on or make changes to this bug.