gpt4 book ai didi

jsf-2 - JBoss AS7 - 无法处理部署的 POST_MODULE 阶段

转载 作者:行者123 更新时间:2023-12-01 02:02:55 25 4
gpt4 key购买 nike

当我部署我的项目 (jsf) 时,我的 JBoss AS7 总是出现以下错误。在 JBoss 6 上一切正常。该错误消息的原因是什么?你知道我该如何解决吗?

JBoss AS7 控制台

21:25:17,026 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "myproject.war"
21:25:17,662 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."seminarpla
ner.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myproject.war".POST_MODULE: Failed to proce
ss phase POST_MODULE of deployment "myproject.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final
.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2
.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]
Caused by: java.lang.RuntimeException: Error getting reflective information for class at.uhs.myproject.util.HibernateTransactionFilter w
ith ClassLoader ModuleClassLoader for Module "deployment.myproject.war:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-serve
r-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70)

at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final
.jar:7.1.1.Final]
... 5 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/Session
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.6.0_31]
at java.lang.Class.privateGetDeclaredFields(Class.java:2291) [rt.jar:1.6.0_31]
at java.lang.Class.getDeclaredFields(Class.java:1743) [rt.jar:1.6.0_31]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.1.1.Final.jar
:7.1.1.Final]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-serve
r-7.1.1.Final.jar:7.1.1.Final]
... 10 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.Session from [Module "deployment.myproject.war:main" from Service Module Load
er]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
... 15 more

21:25:17,708 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "myproject.war" was rolled bac
k with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"myproject.war\".POST_MODULE" => "org.jboss.msc.servic
e.StartException in service jboss.deployment.unit.\"myproject.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"sem
inarplaner.war\""}}
21:25:17,756 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment myproject.war in 48ms
21:25:17,758 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."myproject.war".POST_MODULE: org.jboss.msc.service.Star
tException in service jboss.deployment.unit."myproject.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "seminarplane
r.war"

21:25:17,764 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was
rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"myproject.war\".
POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myproject.war\".POST_MODULE: Failed to process
phase POST_MODULE of deployment \"myproject.war\""}}}}

最佳答案

我的问题终于有了答案。我不得不编辑 jboss/standalone/configuration/standalone.xml文件并添加以下内容(添加数据源):

    <subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/myDatasource" pool-name="myDatasource" enabled="true" use-java-context="true">
<connection-url>jdbc:postgresql://localhost/mydatabase</connection-url>
<driver>org.postgresql</driver>
<pool>
<min-pool-size>2</min-pool-size>
<max-pool-size>50</max-pool-size>
<prefill>false</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<security>
<user-name>myUser</user-name>
</security>
<validation>
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
</datasource>
<drivers>
<driver name="org.postgresql" module="org.postgresql">
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>

关于jsf-2 - JBoss AS7 - 无法处理部署的 POST_MODULE 阶段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13652783/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com