1

I am using QPid with Eclipse and Tomcat. Created a Dynamic Web Application and set the QPID_HOME, QPID_WORK environment variables.

Trying out the Hello.java example mentioned here:-

https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/

But i am getting these errors while running this file :-

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/qpid/url/URLSyntaxException
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.init(Unknown Source)
    at javax.naming.InitialContext.<init>(Unknown Source)
    at myApp.runTest(myApp.java:25)
    at myApp.main(myApp.java:15)
Caused by: java.lang.ClassNotFoundException: org.apache.qpid.url.URLSyntaxException
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
 ... 9 more
Francis Upton IV
  • 19,322
  • 3
  • 53
  • 57
chhavi
  • 11
  • 2

1 Answers1

4

It looks like you are missing:

qpid-common-0.10.jar

Available from http://qpid.apache.org/download.html

or

<dependency>
   <groupId>org.apache.qpid</groupId>
   <artifactId>qpid-common</artifactId>
   <version>0.10</version>
</dependency>

if you are using maven.

Reimeus
  • 158,255
  • 15
  • 216
  • 276
  • Yes, i was missing the qpid-common-0.10.jar Now, its working fine. Thanks a lot. You saved my day. – chhavi Jul 24 '12 at 04:34