[rabbitmq-discuss] ConnectionFactory Class not found in Java
Michael Oki
mikeoki.oki at gmail.com
Wed Jul 24 11:56:57 BST 2013
Hello peeps, where can I get all the files that were used in the Rabbit MQ
example?
On Sunday, July 15, 2012 4:03:46 AM UTC+1, George wrote:
>
> I am attempting to run a Java class I developed called Send to publish
> messages. It breaks on creating a connection. This is on a Windows server
> with the RabbitMQ service running successfully - I can use it fine with
> Node.
>
> Here is my Java compile statement:
> C:\java>javac -classpath
> commons-io-1.2.jar;commons-cli-1.1.jar;junit.jar;rabbitmq-client.jar;rabbitmq-client-tests.jar
> Send.java
>
> Here is the code
> import com.rabbitmq.client.ConnectionFactory;
> import com.rabbitmq.client.Connection;
> import com.rabbitmq.client.Channel;
> import com.rabbitmq.client.*;
>
> public class Send {
>
> public static void main(String[] argv) throws Exception {
>
> ConnectionFactory factory = new ConnectionFactory();
>
> }
> }
>
> Here are the results
> C:\java>java Send
> Exception in thread "main" java.lang.NoClassDefFoundError:
> com/rabbitmq/client/ConnectionFactory
> at Send.main(Send.java:10)
> Caused by: java.lang.ClassNotFoundException:
> com.rabbitmq.client.ConnectionFactory
> at java.net.URLClassLoader$1.run(Unknown Source)
> 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)
>
> Has anyone encountered and resolved this issue? Two thoughts I have are
> ConnectionFactory is dependent on classes not in my compile command and
> that ConnectionFactory has no parameter-less definitions.
>
> Thanks for any help,
>
> George
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130724/bfdf54ca/attachment.htm>
More information about the rabbitmq-discuss
mailing list