Search code examples
javaspringjmsjmstemplatespring-jms

Spring Configuration file error


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.


Solution

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