felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Mollenkopf <adam.mollenk...@gmail.com>
Subject Trouble running iPOJO annotation "example of usage" with Java 7
Date Fri, 28 Oct 2011 16:16:34 GMT

I'm attempting to get the iPOJO 'Example of Usage' sample code
http://felix.apache.org/site/how-to-use-ipojo-annotations.html#HowtouseiPOJOAnnotations-Anexampleofusage
to work with Java 7 and am running into an issue when building with Java 7
(works fine with Java 6).

Felix Version:  4.0.1
Java Version:  jdk1.7.0
Ant Version:  1.8.2

I updated the tasks folder with the latest
org.apache.felix.ipojo.annotations-1.8.0.jar
org.apache.felix.ipojo.ant-1.8.0.jar

When I build and start with Java 6 everything works fine, when I build and
start with Java 7 I get the following:
C:\felix-framework-4.0.1>java -jar bin\felix.jar
____________________________
Welcome to Apache Felix Gogo

g! start
file:/ipojo-annotations/hello.service/target/hello.service-1.0.0.jar
g! start
file:/ipojo-annotations/hello.client.annotation/target/hello.client.annotation-1.0.0.jar
g! start
file:/ipojo-annotations/hello.impl.annotation/target/hello.impl.annotation-1.0.0.jar
g! [ERROR]  : [AnnotatedHelloClient-0] createInstance -> The POJO
constructor invocation failed : Expecting a stackmap frame at branch targe
t 12 in method ipojo.example.hello.client.HelloClient.__getm_end()Z at
offset 4
java.lang.VerifyError: Expecting a stackmap frame at branch target 12 in
method ipojo.example.hello.client.HelloClient.__getm_end()Z at offs
et 4
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
        at java.lang.Class.getConstructor0(Unknown Source)
        at java.lang.Class.getDeclaredConstructor(Unknown Source)
        at
org.apache.felix.ipojo.InstanceManager.createObject(InstanceManager.java:650)
        at
org.apache.felix.ipojo.InstanceManager.getPojoObject(InstanceManager.java:844)
        at
org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.__stateChanged(LifecycleCallbackHandler.java:156)
        at
org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.stateChanged(LifecycleCallbackHandler.java)
        at
org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:471)
        at
org.apache.felix.ipojo.InstanceManager.stateChanged(InstanceManager.java:1314)
        at
org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:496)
        at
org.apache.felix.ipojo.HandlerManager.stateChanged(HandlerManager.java:239)
        at org.apache.felix.ipojo.Handler.setValidity(Handler.java:174)
        at
org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__checkContext(DependencyHandler.java:186)
        at
org.apache.felix.ipojo.handlers.dependency.DependencyHandler.checkContext(DependencyHandler.java)
        at
org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__validate(DependencyHandler.java:149)
        at
org.apache.felix.ipojo.handlers.dependency.DependencyHandler.validate(DependencyHandler.java)
        at
org.apache.felix.ipojo.util.DependencyModel.validate(DependencyModel.java:642)
        at
org.apache.felix.ipojo.util.DependencyModel.computeDependencyState(DependencyModel.java:310)
        at
org.apache.felix.ipojo.util.DependencyModel.manageArrival(DependencyModel.java:394)
        at
org.apache.felix.ipojo.util.DependencyModel.addedService(DependencyModel.java:335)
        at
org.apache.felix.ipojo.util.Tracker$Tracked.trackAdding(Tracker.java:725)
        at
org.apache.felix.ipojo.util.Tracker$Tracked.track(Tracker.java:686)
        at
org.apache.felix.ipojo.util.Tracker$Tracked.serviceChanged(Tracker.java:647)
        at
org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:932)
        at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:793)
        at
org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:543)
        at
org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4252)
        at org.apache.felix.framework.Felix.registerService(Felix.java:3275)
        at
org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:346)
        at
org.apache.felix.ipojo.IPojoContext.registerService(IPojoContext.java:338)
        at
org.apache.felix.ipojo.handlers.providedservice.ProvidedService.registerService(ProvidedService.java:345)
        at
org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.__stateChanged(ProvidedServiceHandler.java:494)
        at
org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.stateChanged(ProvidedServiceHandler.java)
        at
org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:471)
        at
org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:353)
        at
org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:166)
        at
org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:301)
        at
org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:238)
        at
org.apache.felix.ipojo.InstanceCreator$ManagedInstance.create(InstanceCreator.java:343)
        at
org.apache.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:89)
        at org.apache.felix.ipojo.Extender.parse(Extender.java:269)
        at
org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
        at org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
        at
org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:682)
        at java.lang.Thread.run(Unknown Source)
ERROR: Bundle hello.client.annotation [22] EventDispatcher: Error during
dispatch. (java.lang.RuntimeException: Cannot create a POJO instanc
e, the POJO constructor invocation has thrown an exception : Expecting a
stackmap frame at branch target 12 in method ipojo.example.hello.cl
ient.HelloClient.__getm_end()Z at offset 4)
java.lang.RuntimeException: Cannot create a POJO instance, the POJO
constructor invocation has thrown an exception : Expecting a stackmap fr
ame at branch target 12 in method
ipojo.example.hello.client.HelloClient.__getm_end()Z at offset 4
        at
org.apache.felix.ipojo.InstanceManager.createObject(InstanceManager.java:707)
        at
org.apache.felix.ipojo.InstanceManager.getPojoObject(InstanceManager.java:844)
        at
org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.__stateChanged(LifecycleCallbackHandler.java:156)
        at
org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.stateChanged(LifecycleCallbackHandler.java)
        at
org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:471)
        at
org.apache.felix.ipojo.InstanceManager.stateChanged(InstanceManager.java:1314)
        at
org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:496)
        at
org.apache.felix.ipojo.HandlerManager.stateChanged(HandlerManager.java:239)
        at org.apache.felix.ipojo.Handler.setValidity(Handler.java:174)
        at
org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__checkContext(DependencyHandler.java:186)
        at
org.apache.felix.ipojo.handlers.dependency.DependencyHandler.checkContext(DependencyHandler.java)
        at
org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__validate(DependencyHandler.java:149)
        at
org.apache.felix.ipojo.handlers.dependency.DependencyHandler.validate(DependencyHandler.java)
        at
org.apache.felix.ipojo.util.DependencyModel.validate(DependencyModel.java:642)
        at
org.apache.felix.ipojo.util.DependencyModel.computeDependencyState(DependencyModel.java:310)
        at
org.apache.felix.ipojo.util.DependencyModel.manageArrival(DependencyModel.java:394)
        at
org.apache.felix.ipojo.util.DependencyModel.addedService(DependencyModel.java:335)
        at
org.apache.felix.ipojo.util.Tracker$Tracked.trackAdding(Tracker.java:725)
        at
org.apache.felix.ipojo.util.Tracker$Tracked.track(Tracker.java:686)
        at
org.apache.felix.ipojo.util.Tracker$Tracked.serviceChanged(Tracker.java:647)
        at
org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:932)
        at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:793)
        at
org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:543)
        at
org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4252)
        at org.apache.felix.framework.Felix.registerService(Felix.java:3275)
        at
org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:346)
        at
org.apache.felix.ipojo.IPojoContext.registerService(IPojoContext.java:338)
        at
org.apache.felix.ipojo.handlers.providedservice.ProvidedService.registerService(ProvidedService.java:345)
        at
org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.__stateChanged(ProvidedServiceHandler.java:494)
        at
org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.stateChanged(ProvidedServiceHandler.java)
        at
org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:471)
        at
org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:353)
        at
org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:166)
        at
org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:301)
        at
org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:238)
        at
org.apache.felix.ipojo.InstanceCreator$ManagedInstance.create(InstanceCreator.java:343)
        at
org.apache.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:89)
        at org.apache.felix.ipojo.Extender.parse(Extender.java:269)
        at
org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
        at org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
        at
org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:682)
        at java.lang.Thread.run(Unknown Source)

Is iPOJO supposed to work with Java 7?
Any ideas or suggested would be greatly appreciated?
Adam M.



-- 
View this message in context: http://old.nabble.com/Trouble-running-iPOJO-annotation-%22example-of-usage%22-with-Java-7-tp32739346p32739346.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message