java 无法启动服务 jboss.deployment.unit - StartException
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26178879/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Failed to start service jboss.deployment.unit - StartException
提问by Century
I am quite new to web applications but I'm trying to fix an application that has worked previously, using my (very) basic understanding of web applications. This application has been built by someone else who I can no longer ask for help. I hope that you can point me in the right direction. After several days of use of Google I still haven't found a solution.
我对 Web 应用程序很陌生,但我正在尝试使用我对 Web 应用程序的(非常)基本了解来修复以前工作过的应用程序。此应用程序是由我无法再寻求帮助的其他人构建的。我希望你能指出我正确的方向。经过几天的谷歌使用,我仍然没有找到解决方案。
I am using Jboss 7 and the jboss-eap Runtime Server that is provided. Installed JDK is 1.7.0_60 (due to other program who refuses to work with a newer version...); however, I get the same problem with JDK 1.8.0_20. I also use Maven 3.0.4 and Hibernate (can't find which version).
我正在使用 Jboss 7 和提供的 jboss-eap 运行时服务器。安装的 JDK 是 1.7.0_60(由于其他程序拒绝使用较新版本......);但是,我在 JDK 1.8.0_20 上遇到了同样的问题。我还使用 Maven 3.0.4 和 Hibernate(找不到哪个版本)。
The application seems to deploy almost completely, but at the end I get a StartException error and several causes (Nullpointers and IllegalState). I am not sure where to look. Is something wrong with the Hibernate configurations or is it a different problem?
该应用程序似乎几乎完全部署,但最后我收到一个 StartException 错误和几个原因(Nullpointers 和 IllegalState)。我不知道在哪里看。Hibernate 配置有问题还是其他问题?
Any help is greatly appreciated! If you need more information, just ask. (as I am quite new, I hope you could be quite specific about where to look for certain files etc if applicable).
任何帮助是极大的赞赏!如果您需要更多信息,请询问。(因为我很新,我希望你能非常具体地说明在哪里寻找某些文件等,如果适用的话)。
Regards, Century
问候,世纪
Exception stack:
异常堆栈:
(I've changed some names to 'test' for privacy reasons)
(出于隐私原因,我已将一些名称更改为“测试”)
13:41:55,745 INFO [org.hibernate.cfg.Configuration] (ServerService Thread Pool -- 50) HHH000041: Configured SessionFactory: null
13:41:56,354 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 50) HHH000400: Using dialect: org.hibernate.dialect.SQLServerDialect
13:41:56,593 WARN [org.hibernate.mapping.RootClass] (ServerService Thread Pool -- 50) HHH000038: Composite-id class does not override equals(): test.model.Class1
13:41:56,594 WARN [org.hibernate.mapping.RootClass] (ServerService Thread Pool -- 50) HHH000039: Composite-id class does not override hashCode(): test.model.Class2
13:41:56,619 INFO [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (ServerService Thread Pool -- 50) HHH000399: Using default transaction strategy (direct JDBC transactions)
13:41:56,631 INFO [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (ServerService Thread Pool -- 50) HHH000397: Using ASTQueryTranslatorFactory
13:41:56,751 INFO [org.hibernate.validator.internal.util.Version] (ServerService Thread Pool -- 50) HV000001: Hibernate Validator 4.3.1.Final-redhat-1
13:41:58,180 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 50) MSC000001: Failed to start service jboss.deployment.unit."test.war".component.test.START: org.jboss.msc.service.StartException in service jboss.deployment.unit."test.war".component.test.START: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
at org.jboss.as.ee.component.ComponentStartService.run(ComponentStartService.java:57) [jboss-as-ee-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_60]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_60]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_60]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_60]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:163) [jboss-as-ee-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:85) [jboss-as-ee-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:126)
at org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:141)
at org.jboss.as.ee.component.ComponentStartService.run(ComponentStartService.java:54) [jboss-as-ee-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
... 6 more
Caused by: javax.ejb.EJBException: java.lang.NullPointerException
at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:165)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:250)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:344)
at org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:66)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161) [jboss-as-ee-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
... 10 more
Caused by: java.lang.NullPointerException
at test.process.test.init(test.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_60]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_60]
at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130) [jboss-as-ee-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:73)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:95) [jboss-as-ee-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:248)
... 19 more
采纳答案by Century
I have solved the issue, it was a database problem which resulted in an empty object, which caused the initial NullpointerException. The other exceptions were a consequence of the Nullpointer. With the object filled, the war deployed correctly.
我已经解决了这个问题,这是一个导致空对象的数据库问题,这导致了最初的 NullpointerException。其他异常是 Nullpointer 的结果。填充对象后,War正确展开。