Topic
  • 5 replies
  • Latest Post - ‏2012-05-14T03:54:28Z by SystemAdmin
SystemAdmin
SystemAdmin
7 Posts

Pinned topic OpenCMIS library issue only in OSGi embedded web module

‏2012-02-27T10:30:08Z |
Hi,

I'm using Websphere AS 7.0.0.21 to run OSGi embedded web application deployed using ear file along with other war modules. I have OpenCMIS client(0.6.0 version) which does not work from OSGI loaded web module in webservices mode. However, it works in vanilla web application.

The steps I have already followed are:
1. Changed classloader to "Parent last" in particular web module and also in ear level.
2. Disabled default WS engine with "-Dcom.ibm.websphere.webservices.DisableIBMJAXWSEngine=true" at server level as well as application level(Manifest files)
3. Included OpenCmis jars inside WEB-INF/lib folder as it was not getting loaded from OSGI bundle. Also tried to load OSGI jar from shared library references.

In spite of above changes, I get the same error. Please suggest some ideas to work around this issue.
Caused by: org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Error: javax.xml.bind.JAXBException: class org.apache.chemistry.opencmis.commons.impl.jaxb.GetObjectByPath nor any of its super class is known to this context.
at org.apache.chemistry.opencmis.client.bindings.spi.webservices.ObjectServiceImpl.getObjectByPath(ObjectServiceImpl.java:304)
at com.hpexstream.lal.document.impl.dao.CMISDAO.getObjectData(CMISDAO.java:118)
at com.hpexstream.lal.document.impl.dao.CMISDAO.getDocument(CMISDAO.java:533)
... 98 more
Caused by: javax.xml.ws.WebServiceException: javax.xml.bind.JAXBException: class org.apache.chemistry.opencmis.commons.impl.jaxb.GetObjectByPath nor any of its super class is known to this context.
at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:175)
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:128)
at org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.execute(AxisInvocationController.java:586)
at org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.doInvoke(AxisInvocationController.java:130)
at org.apache.axis2.jaxws.core.controller.impl.InvocationControllerImpl.invoke(InvocationControllerImpl.java:93)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:364)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:185)
at $Proxy87.getObjectByPath(Unknown Source)
at org.apache.chemistry.opencmis.client.bindings.spi.webservices.ObjectServiceImpl.getObjectByPath(ObjectServiceImpl.java:298)
... 100 more
Caused by: javax.xml.bind.JAXBException: class org.apache.chemistry.opencmis.commons.impl.jaxb.GetObjectByPath nor any of its super class is known to this context.
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:568)
at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:484)
at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:326)
at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:255)
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:86)
at com.ibm.xml.xlxp2.jaxb.marshal.MarshallerProxy.marshal(MarshallerProxy.java:100)
at org.apache.axis2.datasource.jaxb.JAXBDSContext$1.run(JAXBDSContext.java:470)
at org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:76)
at org.apache.axis2.datasource.jaxb.JAXBDSContext.marshalByElement(JAXBDSContext.java:455)
at org.apache.axis2.datasource.jaxb.JAXBDSContext.marshal(JAXBDSContext.java:414)
at org.apache.axis2.jaxws.message.databinding.impl.JAXBBlockImpl._outputFromBO(JAXBBlockImpl.java:189)
at org.apache.axis2.jaxws.message.impl.BlockImpl.outputTo(BlockImpl.java:372)
at org.apache.axis2.jaxws.message.impl.BlockImpl.serialize(BlockImpl.java:296)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:808)
at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:975)
at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:1016)
at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:271)
at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:233)
at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:1016)
at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:488)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:88)
at com.ibm.ws.websvcs.transport.http.SOAPOverHTTPSender.writeMessage(SOAPOverHTTPSender.java:3271)
at com.ibm.ws.websvcs.transport.http.SOAPOverHTTPSender.sendChunkedRequest(SOAPOverHTTPSender.java:888)
at com.ibm.ws.websvcs.transport.http.SOAPOverHTTPSender.sendSOAPRequest(SOAPOverHTTPSender.java:807)
at com.ibm.ws.websvcs.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:611)
at com.ibm.ws.websvcs.transport.http.HTTPTransportSender.invoke(HTTPTransportSender.java:364)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:531)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.execute(AxisInvocationController.java:581)
... 106 more
Updated on 2012-05-14T03:54:28Z at 2012-05-14T03:54:28Z by SystemAdmin
  • Florian_Mueller
    Florian_Mueller
    2 Posts

    Re: OpenCMIS library issue only in OSGi embedded web module

    ‏2012-03-05T22:18:15Z  
    Hi,

    There is an OpenCMIS package specifically for WebSphere [1].
    It is not part of the official release but available as a nightly build [2].

    • Florian
    [1] https://svn.apache.org/repos/asf/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings-websphere/
    [2] https://builds.apache.org/job/Chemistry%20-%20OpenCMIS%20-%20install/ws/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings-websphere/target/
  • SystemAdmin
    SystemAdmin
    7 Posts

    Re: OpenCMIS library issue only in OSGi embedded web module

    ‏2012-03-11T06:36:44Z  
    Hi,

    There is an OpenCMIS package specifically for WebSphere [1].
    It is not part of the official release but available as a nightly build [2].

    • Florian
    [1] https://svn.apache.org/repos/asf/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings-websphere/
    [2] https://builds.apache.org/job/Chemistry%20-%20OpenCMIS%20-%20install/ws/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings-websphere/target/
    Hi Florian,

    Thanks for the response.

    I'm also using OpenCMIS 0.6.0 build and Websphere specific bindings jar (Also tried nightly build 0.7.0). The issue appears only with the OSGi embedded web application even though I have placed openCMIS jars in WEB-INF/lib folder along with bundle inside OSGi container. Also, the issue is only with webservices mode and not in atompub mode. Tried loading the openCMIS jars by placing in shared lib, and classes folder inside profile home but of no use. I have also marked "Parent Last" class loader configuration and also added the JVM property to disable default IBM WS engine.

    However, both atompub and webservices mode works fine with non OSGi (normal) web application. Very strange that it is not binding CmisExtensionType class for OSGi embedded web application. If the

    When I place OpenCMIS jars in WEB-INF/lib along with osgi container, it returns following error :

    Caused by: javax.xml.ws.WebServiceException: javax.xml.bind.JAXBException: class org.apache.chemistry.opencmis.commons.impl.jaxb.GetObjectByPath nor any of its super class is known to this context.

    Please suggest what I can do to bind this class and make webservices mode work in OSGi enabled web application.
  • Florian_Mueller
    Florian_Mueller
    2 Posts

    Re: OpenCMIS library issue only in OSGi embedded web module

    ‏2012-03-11T18:16:24Z  
    Hi Florian,

    Thanks for the response.

    I'm also using OpenCMIS 0.6.0 build and Websphere specific bindings jar (Also tried nightly build 0.7.0). The issue appears only with the OSGi embedded web application even though I have placed openCMIS jars in WEB-INF/lib folder along with bundle inside OSGi container. Also, the issue is only with webservices mode and not in atompub mode. Tried loading the openCMIS jars by placing in shared lib, and classes folder inside profile home but of no use. I have also marked "Parent Last" class loader configuration and also added the JVM property to disable default IBM WS engine.

    However, both atompub and webservices mode works fine with non OSGi (normal) web application. Very strange that it is not binding CmisExtensionType class for OSGi embedded web application. If the

    When I place OpenCMIS jars in WEB-INF/lib along with osgi container, it returns following error :

    Caused by: javax.xml.ws.WebServiceException: javax.xml.bind.JAXBException: class org.apache.chemistry.opencmis.commons.impl.jaxb.GetObjectByPath nor any of its super class is known to this context.

    Please suggest what I can do to bind this class and make webservices mode work in OSGi enabled web application.
    Are you using the OpenCMIS client OSGi package?
    OpenCMIS is known to work in OSGi environments and is know to work in WebSphere. But the combination of both has not been tested yet.
    • Florian
  • SystemAdmin
    SystemAdmin
    7 Posts

    Re: OpenCMIS library issue only in OSGi embedded web module

    ‏2012-03-12T08:29:10Z  
    Are you using the OpenCMIS client OSGi package?
    OpenCMIS is known to work in OSGi environments and is know to work in WebSphere. But the combination of both has not been tested yet.
    • Florian
    Yes. I did use both chemistry-opencmis-osgi-client-0.7.0-SNAPSHOT.jar as well as chemistry-opencmis-osgi-client-0.6.0.jar which contains websphere specific binding jar. With the same OSGi embedded war file, OpenCMIS webservices mode connection works fine in Weblogic, JBoss and Tomcat.

    Only difference I found is with latest version, I hit the below error.

    javax.xml.bind.JAXBException: org.apache.chemistry.opencmis.commons.impl.jaxb.CmisExtensionType is not known to this context
    at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:316)
    at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:242)
    at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:86)
    at com.ibm.xml.xlxp2.jaxb.marshal.MarshallerProxy.marshal(MarshallerProxy.java:100)
    at org.apache.axis2.datasource.jaxb.JAXBDSContext$5.run(JAXBDSContext.java:954)
    at org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:76)
    at org.apache.axis2.datasource.jaxb.JAXBDSContext.marshalByType(JAXBDSContext.java:846)
    at org.apache.axis2.datasource.jaxb.JAXBDSContext.marshal(JAXBDSContext.java:420)
    at org.apache.axis2.jaxws.message.databinding.impl.JAXBBlockImpl._outputFromBO(JAXBBlockImpl.java:189)
    at org.apache.axis2.jaxws.message.impl.BlockImpl.outputTo(BlockImpl.java:372)
    at org.apache.axis2.jaxws.message.impl.BlockImpl.serialize(BlockImpl.java:296)
    at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:725)
    at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:967)
    at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:996)
    at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:967)
    at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:996)
    at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:271)
    at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:233)
    at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:996)
    at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:484)
    at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:88)
    at com.ibm.ws.websvcs.transport.http.SOAPOverHTTPSender.writeMessage(SOAPOverHTTPSender.java:3265)
    at com.ibm.ws.websvcs.transport.http.SOAPOverHTTPSender.sendChunkedRequest(SOAPOverHTTPSender.java:894)
    at com.ibm.ws.websvcs.transport.http.SOAPOverHTTPSender.sendSOAPRequest(SOAPOverHTTPSender.java:813)
    at com.ibm.ws.websvcs.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:603)
    at com.ibm.ws.websvcs.transport.http.HTTPTransportSender.invoke(HTTPTransportSender.java:364)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:531)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
    at org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.execute(AxisInvocationController.java:581)
    ... 86 more
    Caused by: javax.xml.bind.JAXBException: org.apache.chemistry.opencmis.commons.impl.jaxb.CmisExtensionType is not known to this context
    at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:236)
    at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:251)
    at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:119)
    at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:102)
    at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInfoImpl.java:281)
    at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:288)
    at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:47)
    at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:484)
    at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:313)
    ... 116 more
    Caused by: javax.xml.bind.JAXBException: org.apache.chemistry.opencmis.commons.impl.jaxb.CmisExtensionType is not known to this context
    at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:583)
    at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:116)
    ... 122 more
  • SystemAdmin
    SystemAdmin
    7 Posts

    Re: OpenCMIS library issue only in OSGi embedded web module

    ‏2012-05-14T03:54:28Z  
    Yes. I did use both chemistry-opencmis-osgi-client-0.7.0-SNAPSHOT.jar as well as chemistry-opencmis-osgi-client-0.6.0.jar which contains websphere specific binding jar. With the same OSGi embedded war file, OpenCMIS webservices mode connection works fine in Weblogic, JBoss and Tomcat.

    Only difference I found is with latest version, I hit the below error.

    javax.xml.bind.JAXBException: org.apache.chemistry.opencmis.commons.impl.jaxb.CmisExtensionType is not known to this context
    at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:316)
    at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:242)
    at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:86)
    at com.ibm.xml.xlxp2.jaxb.marshal.MarshallerProxy.marshal(MarshallerProxy.java:100)
    at org.apache.axis2.datasource.jaxb.JAXBDSContext$5.run(JAXBDSContext.java:954)
    at org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:76)
    at org.apache.axis2.datasource.jaxb.JAXBDSContext.marshalByType(JAXBDSContext.java:846)
    at org.apache.axis2.datasource.jaxb.JAXBDSContext.marshal(JAXBDSContext.java:420)
    at org.apache.axis2.jaxws.message.databinding.impl.JAXBBlockImpl._outputFromBO(JAXBBlockImpl.java:189)
    at org.apache.axis2.jaxws.message.impl.BlockImpl.outputTo(BlockImpl.java:372)
    at org.apache.axis2.jaxws.message.impl.BlockImpl.serialize(BlockImpl.java:296)
    at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:725)
    at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:967)
    at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:996)
    at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:967)
    at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:996)
    at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:271)
    at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:233)
    at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:996)
    at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:484)
    at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:88)
    at com.ibm.ws.websvcs.transport.http.SOAPOverHTTPSender.writeMessage(SOAPOverHTTPSender.java:3265)
    at com.ibm.ws.websvcs.transport.http.SOAPOverHTTPSender.sendChunkedRequest(SOAPOverHTTPSender.java:894)
    at com.ibm.ws.websvcs.transport.http.SOAPOverHTTPSender.sendSOAPRequest(SOAPOverHTTPSender.java:813)
    at com.ibm.ws.websvcs.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:603)
    at com.ibm.ws.websvcs.transport.http.HTTPTransportSender.invoke(HTTPTransportSender.java:364)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:531)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
    at org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.execute(AxisInvocationController.java:581)
    ... 86 more
    Caused by: javax.xml.bind.JAXBException: org.apache.chemistry.opencmis.commons.impl.jaxb.CmisExtensionType is not known to this context
    at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:236)
    at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:251)
    at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:119)
    at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:102)
    at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInfoImpl.java:281)
    at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:288)
    at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:47)
    at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:484)
    at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:313)
    ... 116 more
    Caused by: javax.xml.bind.JAXBException: org.apache.chemistry.opencmis.commons.impl.jaxb.CmisExtensionType is not known to this context
    at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:583)
    at com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:116)
    ... 122 more
    Tried changing the message xsd file and classes like JaxBHelper and Converter. But my changes did make no effect and finally, I have to put my CMIS connection classes out of OSGI container to make it work in "webservices" mode. Hope this will be taken care by OpenCMIS team in forth coming releases.