I'm getting a java.lang.ClassNotFoundException: javax.ejb.EJBObject
error when I'm running my application as a JAR file. When running it in Eclipse everything is working fine.
The application properly access the main class and the main method. But when it tries to load the application context it cannot resolve a reference to an EJB bean. I then get the following error:
Error creating bean with name 'bc' defined in class path resource [blabla.xml]:
Initialization of bean failed;
nested exception is
java.lang.NoClassDefFoundError: javax/ejb/EJBObject
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
...
Caused by:
java.lang.ClassNotFoundException: javax.ejb.EJBObject
I've included all runtime-scoped dependencies with Maven in the JAR file.
Do you know any further information regarding this error?