我们在尝试在wildfly中部署JPDL时遇到以下错误。
2015-10-13 14:41:23,280 ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-3) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deploymentManager' defined in class path resource [com/servicelive/orderfulfillment/contexts/jBPMContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.servicelive.orderfulfillment.jbpm.WFProcessDeploymentManager]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:288) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1045) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:949) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) [spring-context-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) [spring-context-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) [spring-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) [spring-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:193) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.servicelive.orderfulfillment.jbpm.WFProcessDeploymentManager]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:121) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:280) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
... 23 more
Caused by: java.lang.NullPointerException
at org.hibernate.collection.PersistentMap.keySet(PersistentMap.java:250) [hibernate-3.3.2.GA.jar:]
at org.jbpm.pvm.internal.repository.DeploymentImpl.getResourceNames(DeploymentImpl.java:155) [jbpm-4.0.0.xby2patched.jar:]
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) [:1.8.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_51]
at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_51]
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197) [hibernate-3.3.2.GA.jar:]
at org.jbpm.pvm.internal.repository.DeploymentImpl_$$_javassist_27.getResourceNames(DeploymentImpl_$$_javassist_27.java) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.jpdl.internal.repository.JpdlDeployer.deploy(JpdlDeployer.java:52) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:46) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.pvm.internal.repository.RepositorySessionImpl.getObject(RepositorySessionImpl.java:119) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute(ProcessDefinitionQueryImpl.java:72) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:64) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.list(ProcessDefinitionQueryImpl.java:141) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.jpdl.internal.repository.JpdlDeployer.checkKey(JpdlDeployer.java:112) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.jpdl.internal.repository.JpdlDeployer.deploy(JpdlDeployer.java:83) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:46) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy(RepositorySessionImpl.java:55) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:46) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:32) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.pvm.internal.spring.CommandTransactionCallback.doInTransaction(CommandTransactionCallback.java:50) [jbpm-4.0.0.xby2patched.jar:]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131) [spring-tx-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:79) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55) [jbpm-4.0.0.xby2patched.jar:]
at org.jbpm.pvm.internal.repository.DeploymentImpl.deploy(DeploymentImpl.java:89) [jbpm-4.0.0.xby2patched.jar:]