You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Raviteja Lokineni (JIRA)" <ji...@apache.org> on 2016/09/27 13:44:21 UTC
[jira] [Commented] (CONFIGURATION-627) BeanHelper exception on
XMLConfiguration builder.getConfiguration()
[ https://issues.apache.org/jira/browse/CONFIGURATION-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15526161#comment-15526161 ]
Raviteja Lokineni commented on CONFIGURATION-627:
-------------------------------------------------
So the linked bugs seem resolved. Can you guys let me know if the following stacktrace is related:
{noformat}
WARN o.a.c.b.FluentPropertyBeanIntrospector - Error when creating PropertyDescriptor for public final void org.apache.commons.configuration2.AbstractConfiguration.setProperty(java.lang.String,java.lang.Object)! Ignoring this property.
java.beans.IntrospectionException: bad write method arg count: public final void org.apache.commons.configuration2.AbstractConfiguration.setProperty(java.lang.String,java.lang.Object)
at java.beans.PropertyDescriptor.findPropertyType(PropertyDescriptor.java:657) ~[?:1.8.0_92]
at java.beans.PropertyDescriptor.setWriteMethod(PropertyDescriptor.java:327) ~[?:1.8.0_92]
at java.beans.PropertyDescriptor.<init>(PropertyDescriptor.java:139) ~[?:1.8.0_92]
at org.apache.commons.beanutils.FluentPropertyBeanIntrospector.createFluentPropertyDescritor(FluentPropertyBeanIntrospector.java:177) ~[commons-beanutils-1.9.2.jar:1.9.2]
at org.apache.commons.beanutils.FluentPropertyBeanIntrospector.introspect(FluentPropertyBeanIntrospector.java:140) ~[commons-beanutils-1.9.2.jar:1.9.2]
at org.apache.commons.beanutils.PropertyUtilsBean.fetchIntrospectionData(PropertyUtilsBean.java:2234) ~[commons-beanutils-1.9.2.jar:1.9.2]
at org.apache.commons.beanutils.PropertyUtilsBean.getIntrospectionData(PropertyUtilsBean.java:2215) ~[commons-beanutils-1.9.2.jar:1.9.2]
at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:950) ~[commons-beanutils-1.9.2.jar:1.9.2]
at org.apache.commons.beanutils.PropertyUtilsBean.isWriteable(PropertyUtilsBean.java:1466) ~[commons-beanutils-1.9.2.jar:1.9.2]
at org.apache.commons.configuration2.beanutils.BeanHelper.isPropertyWriteable(BeanHelper.java:521) ~[commons-configuration2-2.1.jar:2.1]
at org.apache.commons.configuration2.beanutils.BeanHelper.initProperty(BeanHelper.java:357) ~[commons-configuration2-2.1.jar:2.1]
at org.apache.commons.configuration2.beanutils.BeanHelper.initBeanProperties(BeanHelper.java:273) ~[commons-configuration2-2.1.jar:2.1]
at org.apache.commons.configuration2.beanutils.BeanHelper.initBean(BeanHelper.java:192) ~[commons-configuration2-2.1.jar:2.1]
at org.apache.commons.configuration2.beanutils.BeanHelper$BeanCreationContextImpl.initBean(BeanHelper.java:669) ~[commons-configuration2-2.1.jar:2.1]
at org.apache.commons.configuration2.beanutils.DefaultBeanFactory.initBeanInstance(DefaultBeanFactory.java:162) ~[commons-configuration2-2.1.jar:2.1]
at org.apache.commons.configuration2.beanutils.DefaultBeanFactory.createBean(DefaultBeanFactory.java:116) ~[commons-configuration2-2.1.jar:2.1]
at org.apache.commons.configuration2.beanutils.BeanHelper.createBean(BeanHelper.java:459) ~[commons-configuration2-2.1.jar:2.1]
at org.apache.commons.configuration2.beanutils.BeanHelper.createBean(BeanHelper.java:479) ~[commons-configuration2-2.1.jar:2.1]
at org.apache.commons.configuration2.beanutils.BeanHelper.createBean(BeanHelper.java:492) ~[commons-configuration2-2.1.jar:2.1]
at org.apache.commons.configuration2.builder.BasicConfigurationBuilder.createResultInstance(BasicConfigurationBuilder.java:447) ~[commons-configuration2-2.1.jar:2.1]
at org.apache.commons.configuration2.builder.BasicConfigurationBuilder.createResult(BasicConfigurationBuilder.java:417) ~[commons-configuration2-2.1.jar:2.1]
at org.apache.commons.configuration2.builder.BasicConfigurationBuilder.getConfiguration(BasicConfigurationBuilder.java:285) ~[commons-configuration2-2.1.jar:2.1]
{noformat}
Sample code [CONF634.zip|https://issues.apache.org/jira/secure/attachment/12812292/CONF634.zip]
> BeanHelper exception on XMLConfiguration builder.getConfiguration()
> -------------------------------------------------------------------
>
> Key: CONFIGURATION-627
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-627
> Project: Commons Configuration
> Issue Type: Bug
> Affects Versions: 2.0
> Environment: JDK 1.8, Maven 3.3.9
> Reporter: Martin
> Priority: Minor
>
> Creating an *XMLConfiguration* from a file with a builder:
> {code:java}
> builder =
> new FileBasedConfigurationBuilder<XMLConfiguration>(
> XMLConfiguration.class)
> .configure(params.xml()
> .setFileName(
> propsFile.getCanonicalPath())
> .setValidating(false));
> config = builder.getConfiguration();
> {code}
> Causes a non-halting exception originating in *org.apache.commons.configuration2.beanutils.BeanHelper*, method
> *private static boolean isPropertyWriteable(Object bean, String propName)* with parameters *XMLConfiguration*, *"validating"*.
> The exception:
> {noformat}
> May 04, 2016 3:29:26 PM org.apache.commons.beanutils.FluentPropertyBeanIntrospector introspect
> WARNING: Error when creating PropertyDescriptor for public final void org.apache.commons.configuration2.AbstractConfiguration.setProperty(java.lang.String,java.lang.Object)! Ignoring this property.
> java.beans.IntrospectionException: bad write method arg count: public final void org.apache.commons.configuration2.AbstractConfiguration.setProperty(java.lang.String,java.lang.Object)
> at java.beans.PropertyDescriptor.findPropertyType(PropertyDescriptor.java:657)
> at java.beans.PropertyDescriptor.setWriteMethod(PropertyDescriptor.java:327)
> at java.beans.PropertyDescriptor.<init>(PropertyDescriptor.java:139)
> at org.apache.commons.beanutils.FluentPropertyBeanIntrospector.createFluentPropertyDescritor(FluentPropertyBeanIntrospector.java:177)
> at org.apache.commons.beanutils.FluentPropertyBeanIntrospector.introspect(FluentPropertyBeanIntrospector.java:140)
> at org.apache.commons.beanutils.PropertyUtilsBean.fetchIntrospectionData(PropertyUtilsBean.java:2234)
> at org.apache.commons.beanutils.PropertyUtilsBean.getIntrospectionData(PropertyUtilsBean.java:2215)
> at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:950)
> at org.apache.commons.beanutils.PropertyUtilsBean.isWriteable(PropertyUtilsBean.java:1466)
> at org.apache.commons.configuration2.beanutils.BeanHelper.isPropertyWriteable(BeanHelper.java:521)
> at org.apache.commons.configuration2.beanutils.BeanHelper.initProperty(BeanHelper.java:357)
> at org.apache.commons.configuration2.beanutils.BeanHelper.initBeanProperties(BeanHelper.java:273)
> at org.apache.commons.configuration2.beanutils.BeanHelper.initBean(BeanHelper.java:192)
> at org.apache.commons.configuration2.beanutils.BeanHelper$BeanCreationContextImpl.initBean(BeanHelper.java:669)
> at org.apache.commons.configuration2.beanutils.DefaultBeanFactory.initBeanInstance(DefaultBeanFactory.java:162)
> at org.apache.commons.configuration2.beanutils.DefaultBeanFactory.createBean(DefaultBeanFactory.java:116)
> at org.apache.commons.configuration2.beanutils.BeanHelper.createBean(BeanHelper.java:459)
> at org.apache.commons.configuration2.beanutils.BeanHelper.createBean(BeanHelper.java:479)
> at org.apache.commons.configuration2.beanutils.BeanHelper.createBean(BeanHelper.java:492)
> at org.apache.commons.configuration2.builder.BasicConfigurationBuilder.createResultInstance(BasicConfigurationBuilder.java:447)
> at org.apache.commons.configuration2.builder.BasicConfigurationBuilder.createResult(BasicConfigurationBuilder.java:417)
> at org.apache.commons.configuration2.builder.BasicConfigurationBuilder.getConfiguration(BasicConfigurationBuilder.java:285)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)