1

I am trying to run a simple program using a spring configuration file. In the configuration I am creating a bean for the JMS template. When I run it from eclipse everything works perfect but if I try to run it from the command line I get the following error.

Error creatign bean with name JMSTEMPLATE definded in class path resource [config.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/jms/JMSException

Does anyone know why this could be? I've double checked my class path and it is fine.

skaffman
  • 398,947
  • 96
  • 818
  • 769
jim
  • 2,155
  • 2
  • 14
  • 6

2 Answers2

3

You are forgetting to include the jms.jar in your classpath.

Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
  • There was a small typo that took me forever to find, but this was the root of it all. – jim Jul 19 '11 at 13:39
1

Are you including JMS jars in your classpath? This error suggests that they are missing at runtime.

brabster
  • 42,504
  • 27
  • 146
  • 186