I have been having issues with trying to get a reference between two
system components in the same module working (see Tuscany-43, 45 and
46). I've worked around most but I am now seeing a problem when it tries
to resolve the reference:
org.apache.tuscany.core.context.TargetException: Component not found
[org.apache.tuscany.core.loader.SCDLModelLoaderRegistry]
Context stack trace: [tuscany.system]
at
org.apache.tuscany.core.system.context.SystemAggregateContextImpl.locateInstance(SystemAggregateContextImpl.java:475)
at
org.apache.tuscany.core.injection.ReferenceTargetFactory.getInstance(ReferenceTargetFactory.java:129)
at
org.apache.tuscany.core.injection.FieldInjector.inject(FieldInjector.java:40)
at
org.apache.tuscany.core.injection.PojoObjectFactory.getInstance(PojoObjectFactory.java:64)
at
org.apache.tuscany.core.system.context.SystemComponentContext.getInstance(SystemComponentContext.java:110)
at
org.apache.tuscany.core.context.scope.ModuleScopeContext.initComponentContexts(ModuleScopeContext.java:173)
at
org.apache.tuscany.core.context.scope.ModuleScopeContext.onEvent(ModuleScopeContext.java:65)
at
org.apache.tuscany.core.system.context.SystemAggregateContextImpl.fireEvent(SystemAggregateContextImpl.java:427)
at
org.apache.tuscany.core.client.TuscanyRuntime.<init>(TuscanyRuntime.java:131)
at
org.apache.tuscany.core.client.TuscanyRuntime.<init>(TuscanyRuntime.java:76)
at
org.apache.tuscany.samples.helloworld.HelloWorldServiceComponentTestCase.testGeetings(HelloWorldServiceComponentTestCase.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
When looking up in the scopeIndex it seems to be attempting to resolve
against the "tuscany.system" context but the components are defined in
the "org.apache.tuscany.core.system" context.
Is the parent "tuscany.system" wrong here, and if so how do we associate
the ReferenceTargetFactory with the right one?
--
Jeremy