Aniruddh,<br><br>You haven't included commons-io in your classpath.<br><br>Paul.<br><br><div class="gmail_quote">On Tue, Sep 8, 2009 at 7:40 AM, aniruddh narayan <span dir="ltr"><<a href="mailto:aniruddh.narayan@yahoo.co.in">aniruddh.narayan@yahoo.co.in</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
HI paul..<div>as u told i canged the source file ie(HelloServer.java) to my present working directory C:\ ,Also deleted the package com.rabbitmq.examples;...the file is compiling fine and a .class file is being produced (but thing as they are not supposed to work ver easily...[:)])..the following error is displayed when trying to run the file</div>
<div><br></div><div><div class="im"><div><br></div><div>C:\>javac HelloServer.java</div><div><br></div><div>C:\>java HelloServer</div></div><div>Main thread caught exception: java.io.IOException</div><div>java.io.IOException</div>
<div> at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:121)</div><div> at com.rabbitmq.client.impl.AMQConnection.open(AMQConnection.java:363)</div><div> at
com.rabbitmq.client.impl.AMQConnection.<init>(AMQConnection.java:208)</div><div><br></div><div> at com.rabbitmq.client.impl.AMQConnection.<init>(AMQConnection.java:178)</div><div><br></div><div> at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory</div>
<div>.java:165)</div><div> at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory</div><div>.java:213)</div><div> at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory</div>
<div>.java:227)</div><div> at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory</div><div>.java:238)</div><div> at HelloServer.main(HelloServer.java:45)</div><div>Caused by: com.rabbitmq.client.ShutdownSignalException: connection error; reason</div>
<div>:
java.lang.NoClassDefFoundError: org/apache/commons/io/input/ProxyInputStream</div><div> at com.rabbitmq.client.impl.AMQConnection.shutdown(AMQConnection.java:59</div><div>9)</div><div> at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.jav</div>
<div>a:465)</div><div>Caused by: java.lang.NoClassDefFoundError: org/apache/commons/io/input/ProxyInpu</div><div>tStream</div><div class="im"><div> at java.lang.ClassLoader.defineClass1(Native Method)</div><div> at java.lang.ClassLoader.defineClass(ClassLoader.java:620)</div>
<div> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12</div><div>4)</div><div> at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)</div><div> at
java.net.URLClassLoader.access$100(URLClassLoader.java:56)</div><div> at java.net.URLClassLoader$1.run(URLClassLoader.java:195)</div><div> at java.security.AccessController.doPrivileged(Native Method)</div>
<div> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)</div><div> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)</div><div> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)</div>
<div> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)</div><div> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)</div></div><div> at com.rabbitmq.client.impl.MethodArgumentReader.<init>(MethodArgumentRe</div>
<div>ader.java:70)</div><div>
at com.rabbitmq.client.impl.AMQImpl.readMethodFrom(AMQImpl.java:5710)</div><div> at com.rabbitmq.client.impl.AMQCommand$Assembler.handleFrame(AMQCommand.</div><div>java:275)</div><div> at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:107)</div>
<div> at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.jav</div><div>a:439)</div></div><div><br></div><div>....also my server is running fine and showing the message "broker running"....</div>
<div><br><br>--- On <b>Tue, 8/9/09, Paul Jones <i><<a href="mailto:pauljones23@gmail.com" target="_blank">pauljones23@gmail.com</a>></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">
<br>From: Paul Jones <<a href="mailto:pauljones23@gmail.com" target="_blank">pauljones23@gmail.com</a>><br>Subject: Re: [rabbitmq-discuss] re java client error<br>To: "aniruddh narayan" <<a href="mailto:aniruddh.narayan@yahoo.co.in" target="_blank">aniruddh.narayan@yahoo.co.in</a>><br>
Cc:
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a><br>Date: Tuesday, 8 September, 2009, 11:22 AM<div><div></div><div class="h5"><br><br><div>Aniruddh,<br><br>Ok. So the wrong name message means that you compiled the HelloServer example slightly wrong. Perhaps the quickest thing to do would be to change the source file, and remove the package declaration at the top. Then, if you recompile, java HelloServer should work just fine.<br>
<br>Have you considered my suggestion about an IDE? Given the trouble it takes just to get single class files to work, I'm sure you can see how troublesome it could be to try to get something more complicated to work. An IDE also gives you the ability to debug the code, and step through it as it does its thing.<br>
<br>Also, would you be able to reply to emails instead of starting new threads? In threaded mail readers (such as gmail), this conversation keeps coming in as new mail conversations.<br><br>Thanks,<br>Paul.<br><br><div class="gmail_quote">
On Tue, Sep 8, 2009 at 6:26 AM, aniruddh narayan <span dir="ltr"><<a rel="nofollow" href="http://mc/compose?to=aniruddh.narayan@yahoo.co.in" target="_blank">aniruddh.narayan@yahoo.co.in</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
Hi paul..the previous was a typo error....anyway included the (.) current directory to the classpath.....but in vain....following is the output<div><br></div><div><div><br></div><div>C:\>javac HelloServer.java</div><div>
<br></div><div>C:\>java HelloServer</div><div>Exception in thread "main" java.lang.NoClassDefFoundError: HelloServer (wrong na</div><div>me: com/rabbitmq/examples/HelloServer)</div><div> at java.lang.ClassLoader.defineClass1(Native Method)</div>
<div> at java.lang.ClassLoader.defineClass(ClassLoader.java:620)</div><div> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12</div><div>4)</div><div> at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)</div>
<div>
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)</div><div> at java.net.URLClassLoader$1.run(URLClassLoader.java:195)</div><div> at java.security.AccessController.doPrivileged(Native Method)</div>
<div> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)</div><div> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)</div><div> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)</div>
<div> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)</div><div> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)</div><div><br></div><div>C:\>java com.rabbitmq.examples.HelloServer</div>
<div>Exception in thread "main" java.lang.NoClassDefFoundError:
com/rabbitmq/examples</div><div>/HelloServer</div><div><br></div><div>Ani</div><div><br></div><div><br></div></div></td></tr></tbody></table></blockquote></div>
</div></div></div></blockquote></div></td></tr></tbody></table><div class="hm"><br>
<hr size="1"> See the Web's breaking stories, chosen by people like you. Check out <a href="http://in.rd.yahoo.com/tagline_buzz_1/*http://in.buzz.yahoo.com/" target="_blank"> Yahoo! Buzz</a>.</div></blockquote>
</div><br>