[
https://issues.apache.org/jira/browse/CONFIGURATION-365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ralph Goers resolved CONFIGURATION-365.
---------------------------------------
Resolution: Cannot Reproduce
Please provide more information on how to reproduce this problem. As noted,
there are unit tests that test this exact scenario that pass.
> Bean handling not allowing an XPathExpressionEngine
> ---------------------------------------------------
>
> Key: CONFIGURATION-365
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-365
> Project: Commons Configuration
> Issue Type: Bug
> Environment: OSGi / Felix
> Reporter: Rob Walker
>
> Trying to set an XPathExpressionEngine in the config file:
> ===
> <xml
> config-name="config.product.xml"
> fileName="${sys:bundle.root}/etc/${sys:launch.target}.properties.xml"
> >
> <expressionEngine
> config-class="org.apache.commons.configuration.tree.xpath.XPathExpressionEngine"/>
> </xml>
> ===
> And it throws an exception:
> ====
> Caused by: org.apache.commons.configuration.ConfigurationException:
> org.apache.commons.configuration.ConfigurationRuntimeException:
> java.lang.IllegalArgumentException: Cannot invoke
> org.apache.commons.configuration.HierarchicalConfiguration.setExpressionEngine
> on
> bean class 'class org.apache.commons.configuration.XMLConfiguration' -
> argument type mismatch - had objects of type "org.apache.comm
> ons.configuration.tree.xpath.XPathExpressionEngine" but expected signature
> "org.apache.commons.configuration.tree.ExpressionEngine"
> at
> org.apache.commons.configuration.DefaultConfigurationBuilder.createConfigurationAt(DefaultConfigurationBuilder.java:752)
> at
> org.apache.commons.configuration.DefaultConfigurationBuilder.initCombinedConfiguration(DefaultConfigurationBuilder.java:6
> 28)
> at
> org.apache.commons.configuration.DefaultConfigurationBuilder.getConfiguration(DefaultConfigurationBuilder.java:560)
> at
> com.ascert.vt.modules.propsmgr.PropsMgrMainOSGI.<init>(PropsMgrMainOSGI.java:102)
> ... 13 more
> Caused by: org.apache.commons.configuration.ConfigurationRuntimeException:
> java.lang.IllegalArgumentException: Cannot invoke org.apa
> che.commons.configuration.HierarchicalConfiguration.setExpressionEngine on
> bean class 'class org.apache.commons.configuration.XMLCon
> figuration' - argument type mismatch - had objects of type
> "org.apache.commons.configuration.tree.xpath.XPathExpressionEngine" but e
> xpected signature "org.apache.commons.configuration.tree.ExpressionEngine"
> at
> org.apache.commons.configuration.beanutils.BeanHelper.createBean(BeanHelper.java:252)
> at
> org.apache.commons.configuration.beanutils.BeanHelper.createBean(BeanHelper.java:269)
> at
> org.apache.commons.configuration.beanutils.BeanHelper.createBean(BeanHelper.java:283)
> at
> org.apache.commons.configuration.DefaultConfigurationBuilder.createConfigurationAt(DefaultConfigurationBuilder.java:747)
> ... 16 more
> Caused by: java.lang.IllegalArgumentException: Cannot invoke
> org.apache.commons.configuration.HierarchicalConfiguration.setExpressio
> nEngine on bean class 'class
> org.apache.commons.configuration.XMLConfiguration' - argument type mismatch -
> had objects of type "org.
> apache.commons.configuration.tree.xpath.XPathExpressionEngine" but expected
> signature "org.apache.commons.configuration.tree.Express
> ionEngine"
> ===
> Since XPathExpressionEngine implements ExpressionEngine, this looks like a
> reflection bug to me i.e. not finding a method with a signature for
> implemented interfaces as opposed to just subclasses.
> Not sure if this is OSGi / Felix classloading related, but don't think so
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.