Why is XOM library missing in Fuse 6.2?

Solution Verified - Updated -

Issue

  • Trying to install a bundle, involving Apache Camel framework and using the camel:xmljson directive inside the XML configuration, I encountered the following error:

    12:03:39,773 | ERROR | tenderThread-101 | ContextLoaderListener            | 174 - org.springframework.osgi.extender - 1.2.1 | Applica
    tion context refresh failed (OsgiBundleXmlApplicationContext(bundle=packages-in, config=osgibundle:/META-INF/spring/*.xml))
    java.lang.NoClassDefFoundError: nu/xom/Element
           at java.lang.ClassLoader.defineClass1(Native Method)[:1.8.0_05]
           at java.lang.ClassLoader.defineClass(ClassLoader.java:760)[:1.8.0_05]
           at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2318)
           at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1524)
           at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:77)
           at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1993)
    …
    …
    Caused by: java.lang.ClassNotFoundException: nu.xom.Element not found by org.apache.servicemix.bundles.json-lib [265]
           at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1556)[org.apache.felix.framework-4.4.1.jar:]
           at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:77)[org.apache.felix.framework-4.4.1.jar:]
           at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1993)[org.apache.felix.framework-4.4.1.jar:]
           at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_05]
           ... 72 more
    
  • Searching inside all application server’s folders of JBoss Fuse 6.2 I could not find a library containing such a class as nu.xom.Element. It should be there because bundle camel-xmljson is provided directly as a Service Bus’s feature.

  • The project I’ve installed has been simply ported from JBoss Fuse v. 6.0 to v 6.2. In previous version the installation works fine, and the project worked fine. I took a look inside JBoss Fuse 6.0.0 system lib:

    ./system/xom/xom/1.2.5/xom-1.2.5.jar
    

    But I couldn't find it in 6.2.0.

  • The feature camel-xmljson is, by default, uninstalled. So it does need to be installed (I did via Karaf Cosole). Do I need to install some other feature in order to make this one correctly working? Or is this a bug of the Service Bus?

Environment

  • Red Hat JBoss Fuse
    • 6.2.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In