gpt4 book ai didi

java - Jboss 7.1.1 : NamingException class can't be found

转载 作者:太空宇宙 更新时间:2023-11-04 06:46:43 26 4
gpt4 key购买 nike

此 RESTservice 项目部署在带有 Liferay SDK 6.2 的 Jboss 7.1.1 上。'javax.api' 已作为依赖项添加到 jboss-deployment-struct.xml,但仍然出现此错误:

    09:11:28,741 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."RESTtest.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."RESTtest.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "RESTtest.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.runWorker(Unknown Source) [rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_51]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_51]
Caused by: java.lang.RuntimeException: Error getting reflective information for class de.foo.soa.myfoo.sales.MyfooSalesSF with ClassLoader ModuleClassLoader for Module "de.foo.soa.myfoo.modules:main" from local module loader @41c61c91 (roots: C:\fooTest\liferay-portal-JBOSS6.2-ce-ga2\jboss-7.1.1\modules)
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-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: javax/naming/NamingException
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_51]
at java.lang.Class.privateGetDeclaredFields(Unknown Source) [rt.jar:1.7.0_51]
at java.lang.Class.getDeclaredFields(Unknown Source) [rt.jar:1.7.0_51]
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-server-7.1.1.Final.jar:7.1.1.Final]
... 10 more
Caused by: java.lang.ClassNotFoundException: javax.naming.NamingException from [Module "de.foo.soa.myfoo.modules:main" from local module loader @41c61c91 (roots: C:\fooTest\liferay-portal-JBOSS6.2-ce-ga2\jboss-7.1.1\modules)]
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.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

09:11:28,748 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "RESTtest.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"RESTtest.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"RESTtest.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"RESTtest.war\""}}
09:11:28,757 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment RESTtest.war in 9ms
09:11:28,758 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."RESTtest.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."RESTtest.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "RESTtest.war"

查看 javax/api 的 module.xml 表明 javax/naming/NamingException 已作为依赖项添加,因此一切都应该没问题:

        <dependencies>
<system export="true">
<paths>
...
<path name="javax/naming"/>
<path name="javax/naming/directory"/>
<path name="javax/naming/event"/>
<path name="javax/naming/ldap"/>
<path name="javax/naming/spi"/>
...
</paths>
</system>
</dependencies>

我期待任何建设性的建议。

最佳答案

您似乎已将 javax api 依赖项添加到部署的 jboss-deployment-struct.xml 中,但如果您查看异常消息:

ClassNotFoundException: javax.naming.NamingException from
[Module "de.foo.soa.myfoo.modules:main"

“de.foo.soa.myfoo.modules”模块中缺少它,而不是您的部署中缺少它。模块 module.xml 文件是您需要添加依赖项的位置。

关于java - Jboss 7.1.1 : NamingException class can't be found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23865063/

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