You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2016/06/13 18:42:30 UTC

[jira] [Resolved] (ARIES-1572) Problem wiring beans with constructor parameter containing Generics

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

Guillaume Nodet resolved ARIES-1572.
------------------------------------
       Resolution: Fixed
         Assignee: Guillaume Nodet
    Fix Version/s: blueprint-core-1.6.3

Committing to https://svn.apache.org/repos/asf/aries/trunk ...
	M	blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/AggregateConverter.java
	M	blueprint/blueprint-core/src/test/java/org/apache/aries/blueprint/container/BeanRecipeTest.java
Committed r1748298


> Problem wiring beans with constructor parameter containing Generics
> -------------------------------------------------------------------
>
>                 Key: ARIES-1572
>                 URL: https://issues.apache.org/jira/browse/ARIES-1572
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: blueprint-core-1.6.1
>            Reporter: Setya
>            Assignee: Guillaume Nodet
>            Priority: Blocker
>             Fix For: blueprint-core-1.6.3
>
>
> Wiring beans with constructor parameter that contains generics will fail with the following exception:
> org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to find a matching constructor on class com.modulariti.eventstore.OrientDbEventEntryStore for arguments [org.apache.aries.blueprint.container.BeanRecipe$UnwrapperedBeanHolder@1d73edea, org.apache.aries.blueprint.container.BeanRecipe$UnwrapperedBeanHolder@2608acc1] when instanciating bean eventEntryStore
> at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromType(BeanRecipe.java:354)[13:org.apache.aries.blueprint.core:1.6.1]
> at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:282)[13:org.apache.aries.blueprint.core:1.6.1]
> at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:830)[13:org.apache.aries.blueprint.core:1.6.1]
> at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)[13:org.apache.aries.blueprint.core:1.6.1]
> at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[13:org.apache.aries.blueprint.core:1.6.1]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_71]
> at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[13:org.apache.aries.blueprint.core:1.6.1]
> at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:255)[13:org.apache.aries.blueprint.core:1.6.1]
> at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:186)[13:org.apache.aries.blueprint.core:1.6.1]
> at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:724)[13:org.apache.aries.blueprint.core:1.6.1]
> at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:411)[13:org.apache.aries.blueprint.core:1.6.1]
> at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)[13:org.apache.aries.blueprint.core:1.6.1]
> at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)[13:org.apache.aries.blueprint.core:1.6.1]
> at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)[13:org.apache.aries.blueprint.core:1.6.1]
> at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:265)[13:org.apache.aries.blueprint.core:1.6.1]
> at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:255)[13:org.apache.aries.blueprint.core:1.6.1]
> at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[22:org.apache.aries.util:1.1.1]
> at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[22:org.apache.aries.util:1.1.1]
> at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[22:org.apache.aries.util:1.1.1]
> at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[22:org.apache.aries.util:1.1.1]
> at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[22:org.apache.aries.util:1.1.1]
> at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1179)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:731)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:486)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.activateBundle(Felix.java:2216)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.startBundle(Felix.java:2144)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.updateBundle(Felix.java:2484)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:1018)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:1004)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.karaf.bundle.command.Update.doExecute(Update.java:49)[24:org.apache.karaf.bundle.core:4.0.5]
> at org.apache.karaf.bundle.command.BundleCommand.execute(BundleCommand.java:46)[24:org.apache.karaf.bundle.core:4.0.5]
> at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[44:org.apache.karaf.shell.core:4.0.5]
> at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[44:org.apache.karaf.shell.core:4.0.5]
> at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[44:org.apache.karaf.shell.core:4.0.5]
> at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[44:org.apache.karaf.shell.core:4.0.5]
> at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[44:org.apache.karaf.shell.core:4.0.5]
> at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[44:org.apache.karaf.shell.core:4.0.5]
> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[44:org.apache.karaf.shell.core:4.0.5]
> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[44:org.apache.karaf.shell.core:4.0.5]
> at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[44:org.apache.karaf.shell.core:4.0.5]
> at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:270)[44:org.apache.karaf.shell.core:4.0.5]
> at java.lang.Thread.run(Thread.java:745)[:1.7.0_71]
> This is how the classes are declared: 
> public interface EventSqlSchema<T>
> public class GenericEventSqlSchema<T> implements EventSqlSchema<T>
> public class OrientDbEventSqlSchema extends GenericEventSqlSchema<byte[]>
> And below is the configuration: 
> <bean id="sqlSchema" class="com.modulariti.eventstore.OrientDbEventSqlSchema">
> </bean>
> Regards,
> Setya



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)