java.lang.ClassNotFoundException: nu.xom.Serializer not found by org.apache.servicemix.bundles.json-lib
Environment
- Red Hat JBoss Fuse
- 6.1.0
- 6.2.1
Issue
When bundle deploy to standalone fuse container, it started with any issue, but when it deploy to fabric fuse container, bundle failed to start.
Caused by: java.lang.ClassNotFoundException: nu.xom.Serializer not found by org.apache.servicemix.bundles.json-lib [938]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_51]
... 178 more
In the pom.xml, xom and camel-xmljson library dependency already added. camel-xmljson features already installed.
Resolution
- In Fuse 6.1, you need to add mvn:xom/xom/1.2.5 separately to resolve the issue. In 6.2, xom is removed from camel-xmljson feature due to license related issues.
- In Red Hat JBoss Fuse 6.2.1, user would have to follow below procedure for proper deployment.
JBossFuse:karaf@root> install -s mvn:xom/xom/1.2.5
Bundle ID: 294
JBossFuse:karaf@root> features:install camel-xmljson
#Deploy my custom bundle
JBossFuse:karaf@root> osgi:install -s mvn:com.mycompany/camel-blueprint-cbr/1.0.0-SNAPSHOT
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
