我必须在我的系统上设置一个现有项目(根本没有支持)。它使用jboss作为服务器和eap和war部署。
我创建了所有的战争和耳朵,并在jboss的部署文件夹中复制了这些,但是当我启动jboss时,我收到以下错误 -
10:27:44,208 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.subunit.myProjectName.ear"."myProjectName2.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."myProject-core-ear-2.1.0.ear"."myProject-client.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment "myProject-client.war" of deployment "myProject-core-ear-2.1.0.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_74]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_74]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_74]
Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.lhsystems.myProject.server.rest.service.ClientPort with ClassLoader ModuleClassLoader for Module "deployment.myProject-core-ear-2.1.0.ear.myProject-client.war:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
... 5 more
Caused by: java.lang.NoClassDefFoundError: javax/ws/rs/container/AsyncResponse
at java.lang.Class.getDeclaredMethods0(Native Method) [rt.jar:1.8.0_74]
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) [rt.jar:1.8.0_74]
at java.lang.Class.getDeclaredMethods(Class.java:1975) [rt.jar:1.8.0_74]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:65) [jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
... 10 more
Caused by: java.lang.ClassNotFoundException: javax.ws.rs.container.AsyncResponse from [Module "deployment.myProjectName.ear.myProjectName:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.6.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.6.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.6.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.6.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.6.Final-redhat-1]
... 15 more
我正在寻找这个课程的罐子。它应该在我的JDK还是某些第三方Web服务库中? 我们在项目中使用resteasy,但我也无法在resteasy jar中找到这个类。 注意:我们没有使用Apache CXF。
任何帮助将不胜感激。 感谢。
答案 0 :(得分:0)
您是否使用maven构建工具打包应用程序? 我想你必须在你的构建中包含一个合适的第三方jar。 对于maven,它看起来像
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0.1</version>
</dependency>
对于任何其他构建工具(gradle,SBT),您可以访问 https://mvnrepository.com/artifact/javax.ws.rs/javax.ws.rs-api/2.0.1