camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From enigma <send2she...@gmail.com>
Subject Re: CamelBlueprintTestSupport No bean could be found in the registry
Date Thu, 04 Feb 2016 22:36:14 GMT
After debugging the Junit test, the object references were null and hence the
exception - "IllegalStateException: The service registration is no longer
valid." was thrown. 

I did get the camel-archetype-blueprint  v2.16.2. I see that the following
of adding service method call is invoked. The implementation class for the
Hello Interface is present in the same project and it is available.  

services.put( Hello.class.getName(), asService(new HelloBean(), null,
null));


In my case, there are 2 OSGI Bundles (B1, B2). There is interface S1 and
implementation of it in B1. The OSGI Bundle B2 is referencing Bundle B1 for
Service1. The implementation class for Service1 is not exposed to B2. Only
Interface of S1 is available for B2.  I am writing Junit Test method in B2
for testing a scenario which invokes Service1 from B2. How can I pass the
correct object reference from B2 in the aService method call? 

Any suggestions? 



--
View this message in context: http://camel.465427.n5.nabble.com/CamelBlueprintTestSupport-No-bean-could-be-found-in-the-registry-tp5777228p5777244.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message