• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
solved....thanks a lot.....ALL....!!!
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic