1

When I am running qpid-server.bat, I am getting following error:

        C:\qpid\qpid-0.24\java\broker\bin>qpid-server.bat
        Warning: Qpid classpath not set. CLASSPATH set to C:\qpid\qpid-0.24\java\broker\lib\qpid-all.jar;C:\qpid\qpid-0.24\java\broker\lib\plugins\*;C:\qpid\qpid-0.24\java\broker\lib\opt\*
        Info: QPID_JAVA_GC not set. Defaulting to JAVA_GC -XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError
        Info: QPID_JAVA_MEM not set. Defaulting to JAVA_MEM -Xmx1024m
        Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/qpid/server/Main

Caused by: java.lang.ClassNotFoundException: org.apache.qpid.server.Main
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.apache.qpid.server.Main.  Program will exit.

I am not running any code. I am just starting qpid-server.bat and getting above error.

I would be really thankful if anyone would suggest me the solution.

D66
  • 11
  • 3

2 Answers2

1

After downloading the code from Apache "qpid-java-6.1.0", I also had errors running the broker. I found that the broker folder I was using was incorrect. I was able to run the broker by setting the system variable QPID_HOME to "C:\qpid\qpid-java-6.1.0\systests\target\qpid-broker\6.1.0" and running the "qpid-server.bat" in that location. You can then log into the broker at "http://localhost:8080" with user = admin and password = admin. I am not sure what the "systests" folder is or why the bin and lib files are here, but it works. Navigate to that folder and look at the files there. Let me know if there is a better folder I am supposed to be in. I then create a connection factory with the URL "amqp://admin:admin@clientid/?brokerlist='tcp://localhost:5672" and it works.

Rob
  • 126
  • 9
0

I have seen this problem caused by an incorrect setting of the QPID_HOME environment variable.

With a normal installation QPID_HOME needs to refer to the immediate parent of the lib directory. The batch file tries to determine QPID_HOME if it is not set, but will use its current value otherwise. Check you have not set it erroneously.

k-wall
  • 409
  • 3
  • 9