Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Cannot Reproduce
-
3.0.2
-
None
-
None
-
Windows 7 64bits, Java jdk 1.7.0_u71, maven 3.2.5, no admin rights on the platform.
Description
I've tried to apply the Blueprint tutorial with a simple MyHelloService service implemented as MyHelloServiceImpl and exposed to a client that gets this service as a reference. Both starting the service and client bundles is clean, but when the client calls the simple and unique method hello() of the service at startup (blueprint "init-method") I got :
Caused by: java.lang.ClassCastException: Proxy8b5c6c04_36f0_4691_ad01_007e338b9cc9 cannot be cast to com.mycompany.blueprint.app.MyHelloService
at Proxydc340f70_a828_4e83_b591_845608690a75.hello(Unknown Source)
at com.mycompany.blueprint.client.MyActivator.startUp(MyActivator.java:11)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_71]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_71]
at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)
at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)
at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)
It seems to me that the implementation is registered twice under two proxies (proxy names are different at exception throw), which causes the error, apparently.
I have tried the example at home under Windows8 64bits (with admin rights) with no error.