aspose file tools*
The moose likes JBoss/WildFly and the fly likes Problem about running jms stanalone client for producer-consumer example from j2ee 1.5 tutorial Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Problem about running jms stanalone client for producer-consumer example from j2ee 1.5 tutorial" Watch "Problem about running jms stanalone client for producer-consumer example from j2ee 1.5 tutorial" New topic
Author

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

Laurence Yip
Greenhorn

Joined: Sep 21, 2012
Posts: 14
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

Joined: Sep 21, 2012
Posts: 14
solved....thanks a lot.....ALL....!!!
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

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!


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem about running jms stanalone client for producer-consumer example from j2ee 1.5 tutorial