2013-08-07 65 views
2

我正在開發一個必須在SIP(mobicent)上運行於JBoss 7.1的war模塊。帶有SIP Servlet的JBoss REST - 未找到類java.lang.LinkageError

我的項目結構:

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 

我應該得到的 「你好澤西」 顯示。但是,相反的,我得到兩個錯誤:

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依賴,他們是正確的日食也列出了parlayx_bundle4-1.1.-SNAPSHOT.jarMultimediaConferenc.class組織.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.

回答

1

問題出現導致parlayx包不在戰爭中。我的範圍與「提供」是錯誤的。正確的範圍是「編譯」。現在所有的東西甚至REST都按預期工作!