2 Replies Latest reply on Aug 14, 2009 2:22 PM by Peter Chandler

    javax.xml.transform.dom.DOMSource and saxon9-dom.jar

    Peter Chandler Master

      I am having some problems with versions/compatibility of javax.xml.transform.dom and net.sf.saxon.saxon-dom version 9.

       

      I place saxon9-dom.jar in my bundle-classpath and then get java.lang.IllegalArgumentException(below). There is a incompatibility between  javax.xml.transform.dom.DOMSource and saxon9-dom.jar in servicemix.

       

      My question is does servicemix export javax.xml.transform.dom from any of their bundles?

      Does FUSE have a saxon9-dom bundle available?

       

      Also, I tried import/using the javax.xml.transform.dom from the JVM and got a "loader constraint violation"(below). javax.xml.transform.dom is built into the rt.jar so why can't I just import it?

       

      Any suggestions are welcome,

       

      Thanks,

       

      Peter.

       

       

      java.lang.IllegalArgumentException: When a DOMSource is used, saxon9-dom.jar must be on the classpath

      net.sf.saxon.Configuration.unravel()  in file: Configuration.java at line: 2700

      org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath.selectNodes()  in file: XBeansXPath.java at line: 112

      org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath.selectPath()  in file: XBeansXPath.java at line: 148

      org.apache.xmlbeans.impl.store.Path$DelegatePathImpl$DelegatePathEngine.next()  in file: Path.java at line: 541

      org.apache.xmlbeans.impl.store.Cursor._toSelection()  in file: Cursor.java at line: 931

      org.apache.xmlbeans.impl.store.Cursor._toNextSelection()  in file: Cursor.java at line: 920

      org.apache.xmlbeans.impl.store.Cursor._hasNextSelection()  in file: Cursor.java at line: 912

      org.apache.xmlbeans.impl.store.Cursor.hasNextSelection()  in file: Cursor.java at line: 2652

      org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath()  in file: XmlObjectBase.java at line: 464

      org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath()  in file: XmlObjectBase.java at line: 446

      ... my code.

       

       

      ERROR: EventDispatcher: Error during dispatch. (java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.transform.dom.DOMSource.) for resolved class, javax/xml/transform/dom/DOMSource, have different Class objects for the type org/w3c/dom/Node used in the signature

              at org.apache.servicemix.jbi.runtime.impl.utils.DOMUtil.asXML(DOMUtil.java:108)

              at org.apache.servicemix.jbi.runtime.impl.ComponentContextImpl.activateEndpoint(ComponentContextImpl.java:115)

              at org.apache.servicemix.common.endpoints.ProviderEndpoint.activate(ProviderEndpoint.java:59)

              at org.apache.servicemix.wsn.component.WSNEndpoint.activate(WSNEndpoint.java:98)

              at org.apache.servicemix.common.DefaultServiceUnit.init(DefaultServiceUnit.java:54)

              at org.apache.servicemix.common.DefaultComponent.doInit(DefaultComponent.java:348)

              at org.apache.servicemix.wsn.component.WSNComponent.doInit(WSNComponent.java:182)

              at org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCycle.java:203)

              at org.apache.servicemix.jbi.deployer.artifacts.ComponentImpl$ComponentWrapper.init(ComponentImpl.java:248)

              at org.apache.servicemix.jbi.runtime.impl.ComponentRegistryImpl.doRegister(ComponentRegistryImpl.java:97)

              at org.apache.servicemix.jbi.runtime.impl.ComponentRegistryImpl.doRegister(ComponentRegistryImpl.java:37)

              at org.apache.servicemix.nmr.core.ServiceRegistryImpl.register(ServiceRegistryImpl.java:47)

              at org.apache.servicemix.nmr.osgi.OsgiServiceRegistryTracker.addingService(OsgiServiceRegistryTracker.java:79)

              at org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.java:1030)

              at org.osgi.util.tracker.ServiceTracker$Tracked.track(ServiceTracker.java:1008)

              at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:933)