You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alexander Lemyagov (JIRA)" <ji...@apache.org> on 2018/10/08 17:22:00 UTC

[jira] [Updated] (BEANUTILS-513) Error when getting configuration

     [ https://issues.apache.org/jira/browse/BEANUTILS-513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Lemyagov updated BEANUTILS-513:
-----------------------------------------
    Environment: Java 8.

> Error when getting configuration
> --------------------------------
>
>                 Key: BEANUTILS-513
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-513
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: Bean / Property Utils
>    Affects Versions: 1.9.3
>         Environment: Java 8.
>            Reporter: Alexander Lemyagov
>            Priority: Major
>              Labels: config
>
> I use Apache Commans Configuration 2 and a read config file:
>  
> {code:java}
> Parameters parameters = new Parameters();
> this.configFileBuilder =
>  new FileBasedConfigurationBuilder<FileBasedConfiguration>(PropertiesConfiguration.class)
>  .configure(parameters.fileBased().setListDelimiterHandler(new DefaultListDelimiterHandler(';'))
>  .setFile(MUSICMALL_CONFIG_FILE).setThrowExceptionOnMissing(true));
> this.configuration = this.configFileBuilder.getConfiguration();{code}
> And when I call *getConfiguration* method I get exception:
> {code:java}
> 2018-10-08 20:13:18 [JavaFX Application Thread] DEBUG org.apache.commons.beanutils.FluentPropertyBeanIntrospector:149#introspect - Exception is: 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:178)
>  at org.apache.commons.beanutils.FluentPropertyBeanIntrospector.introspect(FluentPropertyBeanIntrospector.java:141)
>  at org.apache.commons.beanutils.PropertyUtilsBean.fetchIntrospectionData(PropertyUtilsBean.java:2245)
>  at org.apache.commons.beanutils.PropertyUtilsBean.getIntrospectionData(PropertyUtilsBean.java:2226)
>  at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:954)
>  at org.apache.commons.beanutils.PropertyUtilsBean.isWriteable(PropertyUtilsBean.java:1478)
>  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){code}
> What wrong?
> Config example:
> {noformat}
> initialized = false
> ftp.host=site.com.ua
> ftp.port=22
> ftp.user=root
> ftp.password=root
> name=
> object.number=120
> sync.time=30,59{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)