Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem about running jms stanalone client for producer-consumer example from j2ee 1.5 tutorial

 
Laurence Yip
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

It's my first time to post my questions on javaranch and please indicate any format/standard mismatch during my question asking!

I've just started to learning on-line j2ee1.5 tutorial from oracle sun and i 'd like to use JBOSS AS 5.1.0 to run their code examples, but unfortunatley encountered many much problems....

From running simple JMS standalone client for producer-consumer example, i've tried to set the code-specified jms topic & queue on jboss by adding a new file to: %JBOSS_HOME%\server\default\deploy\messaging....

/*%JBOSS_HOME%\server\default\deploy\messaging\my-destinations-service.xml*/



/*%JBOSS_HOME%\server\default\deploy\messaging\connection-factories-service.xml(without any changed here)*/

/* Producer.java */


/* SynchConsumer.java */


Below is my capture for server.log


But when i tried to run the producer.jar:
> java -jar producer.jar queue 3
the following exception occured:
java.lang.NoClassDefFoundError: javax/jms/JMSException
Caused by: java.lang.ClassNotFoundException: javax.jms.JMSException
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)
Could not find the main class: Producer. Program will exit.
Exception in thread "main"

Anyone can help....thanks in advance....LAW
 
Laurence Yip
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
solved....thanks a lot.....ALL....!!!
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hayato, I'm grlad that you solved your problem, but could you describe what you did to solve the problem so that when others come across this post they will also benefit from the solution? Thank you!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic