Bug 1007266 - org.apache.commons.beanutils.PropertyUtilsBean throws java.lang.NoSuchMethodException
Summary: org.apache.commons.beanutils.PropertyUtilsBean throws java.lang.NoSuchMethodE...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-sdk-java
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.3.0
Assignee: Juan Hernández
QA Contact: Ilia Meerovich
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-12 08:16 UTC by Ilia Meerovich
Modified: 2016-07-05 00:07 UTC (History)
6 users (show)

Fixed In Version: is15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-21 22:11:50 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 19262 0 None None None Never

Description Ilia Meerovich 2013-09-12 08:16:33 UTC
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 08:19:05 UTC
build is14

Comment 2 Michael Pasternak 2013-09-12 08:33:15 UTC
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 15:51:22 UTC
verified with is15

Comment 6 Itamar Heim 2014-01-21 22:11:50 UTC
Closing - RHEV 3.3 Released


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