[jboss-jira] [JBoss JIRA] Commented: (JBMICROCONT-380) MC chooses the wrong constructor to build a bean from metadata
Adrian Brock (JIRA)
jira-events at lists.jboss.org
Thu Nov 6 10:29:20 EST 2008
[ https://jira.jboss.org/jira/browse/JBMICROCONT-380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12437306#action_12437306 ]
Adrian Brock commented on JBMICROCONT-380:
------------------------------------------
One such hack would be to add an
isNeedsTypeToDetermineValue()
to ValueMetaData or a mixin interface that means the same thing.
> MC chooses the wrong constructor to build a bean from metadata
> --------------------------------------------------------------
>
> Key: JBMICROCONT-380
> URL: https://jira.jboss.org/jira/browse/JBMICROCONT-380
> Project: JBoss Microcontainer
> Issue Type: Bug
> Affects Versions: JBossMC.2.0.0.CR5
> Reporter: Carlo de Wolf
> Priority: Critical
>
> Given the following piece of xml, MC can pick the wrong constructor to instantiate BeanMetaDataDeployer:
> <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
> <constructor><parameter><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
> </bean>
> java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.reflect.Constructor expected=[org.jboss.dependency.spi.Controller] actual=[org.jboss.kernel.Kernel]
> at org.jboss.reflect.plugins.introspection.ReflectionUtils.handleErrors(ReflectionUtils.java:395)
> at org.jboss.reflect.plugins.introspection.ReflectionUtils.newInstance(ReflectionUtils.java:153)
> at org.jboss.reflect.plugins.introspection.ReflectConstructorInfoImpl.newInstance(ReflectConstructorInfoImpl.java:106)
> at org.jboss.joinpoint.plugins.BasicConstructorJoinPoint.dispatch(BasicConstructorJoinPoint.java:80)
> at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.createTarget(AOPConstructorJoinpoint.java:276)
> at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.dispatch(AOPConstructorJoinpoint.java:97)
> at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
> ...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list