Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-3251

NoClassDefFoundError while integrating with WSO2

    XMLWordPrintableJSON

Details

    Description

      Hi

      Common classes related to Apache framework are packed in qpid-common-0.10.jar. WSO2-ESB is an enterprise service bus built on top of Apache framework. So it shares apache common classes.
      While integrating QPid and WSO2, we had to copy Qpid client classes into WSO2 Server classpath. On WSO2 This resulted in "NoClassDefFoundError" error. I checked that "AMQCodecFactory" does indeed exist in "qpid-common-0.10.jar". We suspect that the problem is due to classes (common to Apache common) being replicated. WSO2 has built a custom qpid-common-merger.jar to fix this problem in earlier releases. Link - http://people.apache.org/~lahiru/qpid-common-merged-0.6.jar This is described in http://wso2.org/library/knowledge-base/2010/11/wso2-esb-apache-qpid-setup-guide.

      We suggest decomposing qpid-common-0.10.jar into smaller and more coherent packages. This would enable users to select specific jars while integrating with other Apache applications. This will eliminate the need of dismantling qpid-common-x.x.jar and building a qpid-common-merged-x.x.jar.

      WSO2 defect link -
      https://wso2.org/jira/browse/ESBJAVA-770

      WSO2 Server start up exception stack trace -

      [2011-05-06 10:59:44,475] ERROR - NativeWorkerPool Uncaught exception
      java.lang.NoClassDefFoundError: org/apache/qpid/codec/AMQCodecFactory
      at org.apache.qpid.client.protocol.AMQProtocolHandler.<init>(AMQProtocol
      Handler.java:191)
      at org.apache.qpid.client.AMQConnection.<init>(AMQConnection.java:382)
      at org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConne
      ctionFactory.java:276)
      at org.apache.axis2.transport.jms.JMSUtils.createConnection(JMSUtils.jav
      a:579)
      at org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask
      .createConnection(ServiceTaskManager.java:803)
      at org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask
      .getConnection(ServiceTaskManager.java:688)
      at org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask
      .receiveMessage(ServiceTaskManager.java:487)
      at org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask
      .run(ServiceTaskManager.java:412)
      at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(Native
      WorkerPool.java:58)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
      utor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

      Thanks
      Swaroop Rath

      Attachments

        Activity

          People

            Unassigned Unassigned
            swaroopr Swaroop Rath
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 336h
                336h
                Remaining:
                Remaining Estimate - 336h
                336h
                Logged:
                Time Spent - Not Specified
                Not Specified