Hi All, I'm writing an app on ONOS, and I need a third-party bundle. But the JAR package doesn't contain OSGi meta-data in its META-INF/MANIFEST.MF. I followed the instructions in the page, and converted it to an OSGi bundle. And then I deployed it into my Karaf deploy directory.
http://www.vogella.com/tutorials/EclipseJarToPlugin/article.html The bundle is installed properly by Karaf when ONOS started. 2015-12-11 16:45:37,825 | INFO | raf-3.0.4/deploy | fileinstall | 7 - org.apache.felix.fileinstall - 3.5.0 | Installing bundle org.pacesys.openstack4j / 2.0.9 2015-12-11 16:45:44,931 | INFO | raf-3.0.4/deploy | fileinstall | 7 - org.apache.felix.fileinstall - 3.5.0 | Started bundle: file:/home/sdn/Applications/apache-karaf-3.0.4/deploy/org.pacesys.openstack4j_2.0.9.jar When I activate my new App in ONOS, my app initiate properly. However, when I call the bundle's API, it crashes. I wonder how to integrate a third-party bundle into ONOS. karaf.log 2015-12-11 16:49:56,917 | INFO | tp1179238011-423 | OpenStackConnector | 178 - org.onosproject.onos-app-xuanwulake - 1.3.0.SNAPSHOT | launchVM, name = dynFW, type = vFW 2015-12-11 16:49:57,195 | ERROR | tp1179238011-423 | ContainerResponse | 131 - com.sun.jersey.jersey-server - 1.19.0 | The exception contained within MappableContainerException could not be mapped to a response, re-throwing to the HTTP container java.lang.NoClassDefFoundError: javax/xml/parsers/DocumentBuilderFactory at org.glassfish.jersey.message.internal.MessagingBinders$MessageBodyProviders.configure(MessagingBinders.java:140) at org.glassfish.hk2.utilities.binding.AbstractBinder.bind(AbstractBinder.java:171) at org.glassfish.hk2.utilities.binding.AbstractBinder.install(AbstractBinder.java:315) at org.glassfish.jersey.client.ClientBinder.configure(ClientBinder.java:116) at org.glassfish.hk2.utilities.binding.AbstractBinder.bind(AbstractBinder.java:171) at org.glassfish.jersey.internal.inject.Injections.bind(Injections.java:157) at org.glassfish.jersey.internal.inject.Injections._createLocator(Injections.java:147) at org.glassfish.jersey.internal.inject.Injections.createLocator(Injections.java:137) at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:385) at org.glassfish.jersey.client.ClientConfig$State.access$000(ClientConfig.java:87) at org.glassfish.jersey.client.ClientConfig$State$3.get(ClientConfig.java:119) at org.glassfish.jersey.client.ClientConfig$State$3.get(ClientConfig.java:116) at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:322) at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:722) at org.glassfish.jersey.client.ClientRequest.getConfiguration(ClientRequest.java:281) at org.glassfish.jersey.client.JerseyInvocation.validateHttpMethodAndEntity(JerseyInvocation.java:125) at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:98) at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:91) at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:413) at org.openstack4j.connectors.jersey2.HttpCommand.execute(HttpCommand.java:79) ... Best Regards, Zhenhua
