我正在研究一个必须在带有SIP(mobicent)的JBoss 7.1上运行的war模块。
我的项目结构:
package: sip.multimediaconference
-JaxRsActivator.java
-MultimediaConferenceImpl.java
-ServletSipMultimediaConfernece.java
...
MultimediaConferemcImple.java
@Path("MultimediaConference")
public class MultimediaConferenceImpl implements MultimediaConference {
...
@GET
@Path("/test")
@Produces(MediaType.TEXT_PLAIN)
public String say() {
return "Hello Jersey";
}
...
通过
http://localhost:8080/ConfFirstConvert/rest/MultimediaConference/test
我应该显示“Hello Jersey”。但与此相反,我得到两个错误:
15:37:56,523 INFO [org.jboss.resteasy.spi.ResteasyDeployment] (http-localhost/127.0.0.1:8080-1) Deploying javax.ws.rs.core.Application: class sip.multimediaconference.JaxRsActivator
15:37:56,525 WARN [org.jboss.modules] (http-localhost/127.0.0.1:8080-1) Failed to define class sip.multimediaconference.MultimediaConferenceImpl in Module "deployment.ConfFirstConvert.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link sip/multimediaconference/MultimediaConferenceImpl (Module "deployment.ConfFirstConvert.war:main" from Service Module Loader)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)
at org.jboss.modules.Module.loadModuleClass(Module.java:527)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:361) [resteasy-jaxrs-2.3.3.Final.jar:]
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:225) [resteasy-jaxrs-2.3.3.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:67) [resteasy-jaxrs-2.3.3.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36) [resteasy-jaxrs-2.3.3.Final.jar:]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.16.Final.jar:]
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:952) [jbossweb-7.0.16.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) [jbossweb-7.0.16.Final.jar:]
at org.mobicents.servlet.sip.startup.SipStandardContextValve.invoke(SipStandardContextValve.java:255)
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.2.Final.jar:7.1.2.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.16.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.16.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.16.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.16.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.16.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [jbossweb-7.0.16.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.16.Final.jar:]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
Caused by: java.lang.NoClassDefFoundError: org/csapi/wsdl/parlayx/multimedia_conference/v4_0/_interface/MultimediaConference
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_25]
at java.lang.ClassLoader.defineClass(ClassLoader.java:788) [rt.jar:1.7.0_25]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_25]
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)
... 25 more
Caused by: java.lang.ClassNotFoundException: org.csapi.wsdl.parlayx.multimedia_conference.v4_0._interface.MultimediaConference from [Module "deployment.ConfFirstConvert.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 30 more
我检查了我的maven依赖项并且它们都是正确的,eclipse还在 org中使用 MultimediaConferenc.class 列出了 parlayx_bundle4-1.1.-SNAPSHOT.jar 。 csapi.wsdl.parlayx.multimedia_conference.v4_0._interface
第二个错误是:
15:37:56,532 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ConfFirstConvert]] (http-localhost/127.0.0.1:8080-1) StandardWrapper.Throwable: java.lang.RuntimeException: java.lang.ClassNotFoundException: sip.multimediaconference.MultimediaConferenceImpl from [Module "deployment.ConfFirstConvert.war:main" from Service Module Loader]
at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:365) [resteasy-jaxrs-2.3.3.Final.jar:]
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:225) [resteasy-jaxrs-2.3.3.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:67) [resteasy-jaxrs-2.3.3.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36) [resteasy-jaxrs-2.3.3.Final.jar:]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.16.Final.jar:]
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:952) [jbossweb-7.0.16.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) [jbossweb-7.0.16.Final.jar:]
at org.mobicents.servlet.sip.startup.SipStandardContextValve.invoke(SipStandardContextValve.java:255)
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.2.Final.jar:7.1.2.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.16.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.16.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.16.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.16.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.16.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [jbossweb-7.0.16.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.16.Final.jar:]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
Caused by: java.lang.ClassNotFoundException: sip.multimediaconference.MultimediaConferenceImpl from [Module "deployment.ConfFirstConvert.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:361) [resteasy-jaxrs-2.3.3.Final.jar:]
... 16 more
15:37:56,537 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ConfFirstConvert].[sip.multimediaconference.JaxRsActivator]] (http-localhost/127.0.0.1:8080-1) Allocate exception for servlet sip.multimediaconference.JaxRsActivator: java.lang.ClassNotFoundException: sip.multimediaconference.MultimediaConferenceImpl from [Module "deployment.ConfFirstConvert.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:361) [resteasy-jaxrs-2.3.3.Final.jar:]
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:225) [resteasy-jaxrs-2.3.3.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:67) [resteasy-jaxrs-2.3.3.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36) [resteasy-jaxrs-2.3.3.Final.jar:]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.16.Final.jar:]
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:952) [jbossweb-7.0.16.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) [jbossweb-7.0.16.Final.jar:]
at org.mobicents.servlet.sip.startup.SipStandardContextValve.invoke(SipStandardContextValve.java:255)
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.2.Final.jar:7.1.2.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.16.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.16.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.16.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.16.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.16.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [jbossweb-7.0.16.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.16.Final.jar:]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
我没有得到它因为所有的罐子,类在正确的地方可用。有人有想法吗?
感谢您的帮助!
-G。
答案 0 :(得分:1)
问题出现导致parlayx捆绑不在战争中。我提供的范围是错误的。正确的范围是“编译”。现在一切甚至REST都按预期工作了!