Hi all. I'm trying to install an osgi bundle in Servicemix 5.0.1.
I have tested my code without osgiify it, and that works. Furthermore, I have tried to create a simple ogsi bundle, and install it in Servicemix; that is also successful. When I turn my actual code into an osgi bundle it seems to go wrong. I'm using Netbeans 8 and Maven. The problem is that I don't get any error messages - when I build the bundle everything goes fine, and I can also install the bundle without any errors in the Servicemix log (log:set DEBUG). I can even see that the bundle is in the list of installed bundles (osgi:list) - it says that the bundle is installed (it doesn't say active). the problem is that the bundle does not work - I can see that it doesn't do what it was supposed to do (post some values on a web page somewhere). Additionally, Servicemix starts to behave oddly. It doesn't seem consistent, but sometimes the osgi:list command suddenly doesnt exist no more (command not found). This also goes for log:display. Furthermore the bundle won't be removed from the bundle list even if I write osgi:uninstall xxx. Finally, Servicemix will not shut down (osgi:shutdown) - it just freezes (this can also happen with the other commands). One last thing is that I can see that the bundle don't start up because my BundleActivator does not execute the start method (I have made it do a System.out.println). I'm guessing that my problem is in the pom file. Content is here: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>StandAloneDslRoute</groupId> <artifactId>StandAloneDslRoute</artifactId> <packaging>bundle</packaging> <version>1.0</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.osgi.core</artifactId> <version>1.0.0</version> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>2.12.3</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.6</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.7.7</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-xmljson</artifactId> <version>2.12.3</version> </dependency> <dependency> <groupId>org.json</groupId> <artifactId>org.json</artifactId> <version>chargebee-1.0</version> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-http4</artifactId> <version>2.12.3</version> </dependency> </dependencies> <build> <defaultGoal>install</defaultGoal> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.3.7</version> <extensions>true</extensions> <configuration> <instructions> <Embed-Dependency>*</Embed-Dependency> <_exportcontents>*</_exportcontents> <Export-Package>myroutepack.*</Export-Package> <Bundle-Activator>osgirelated.RouteOSGIActivator</Bundle-Activator> </instructions> </configuration> </plugin> </plugins> </build> </project> Any ideas? Regards Lasse Vestergaard -- View this message in context: http://servicemix.396122.n5.nabble.com/Debugging-osgi-bundle-with-Servicemix-tp5720458.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
