All,
I am trying to get Spring + jbpm + JPA + JTA integration on websphere.
I have kept the jbpm.jar in the WEB-INF\lib directory.. still I keep getting this exception trace…
[7/5/11 15:08:57:091 IST] 00000011
webapp E
com.ibm.ws.webcontainer.webapp.WebApp
notifyServletContextCreated SRVE0283E:
Exception caught while initializing
context: {0}
java.lang.NoClassDefFoundError:
org.jbpm.api.ProcessEngine at
java.lang.Class.getDeclaredFieldsImpl(Native
Method) at
java.lang.Class.getDeclaredFields(Class.java:550)
at
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:372)
at
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:320)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:798)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:493)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at
com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1707)
at
com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:380)
at
com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:299)
at
com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:100)
at
com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:166)
at
com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:731)
at
com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:616)
at
com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:376)
at
com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:668)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1122)
at
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1319)
at
com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:610)
at
com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:944)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:725)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1266)
at
com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:4582)
at
com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:4760)
at
com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1271)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2043)
at
com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:439)
at
com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at
com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:382)
at
com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:653)
at
com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:615)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1177)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at
java.lang.reflect.Method.invoke(Method.java:611)
at
sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at
java.lang.reflect.Method.invoke(Method.java:611)
at
sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
at
javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1085)
at
javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:966)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:773)
at
com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1332)
at
com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at
com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1225)
at
com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
at
com.ibm.ws.management.connector.rmi.RMIConnectorService.invoke(RMIConnectorService.java:282)
at
com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie.invoke(_RMIConnectorService_Tie.java:395)
at
com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie._invoke(_RMIConnectorService_Tie.java:160)
at
com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:623)
at
com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:476)
at
com.ibm.rmi.iiop.ORB.process(ORB.java:513)
at
com.ibm.CORBA.iiop.ORB.process(ORB.java:1574)
at
com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2845)
at
com.ibm.rmi.iiop.Connection.doWork(Connection.java:2718)
at
com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)
at
com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
Caused by:
java.lang.ClassNotFoundException:
org.jbpm.api.ProcessEngine at
java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at
com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:150)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:653)
at
com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:90)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:619)
at
com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
at
com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
at
com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:541)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:619)
… 73 more
is there anything special set-up in spring that needs to be done to find classes in classpath?
Please help.
Spring requires nothing special to be done.
Since this is a web app, it might be that you need a higher-level class loader because that JAR is required by the app server itself.
There’s a hierarchy of class loaders in app servers: bootstrap->server->application. When you put a JAR in WEB-INF/lib it’s picked up by the application class loader. You might try putting the
org.jbpm.api.ProcessEngineJAR in the server /lib and trying it again.