Notice this line:
org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.checkDeclaredApplicationClassAsServlet(JaxrsScanningProcessor.java:310)
So the problem is JaxrsScanningProcessor can not load
CXFNonSpringServlet. This is because AS 7 JAX-RS is configured to use
RESTEasy by default. Two options I can think of:
1. Modify modules/org/jboss/as/jaxrs/main/module.xml to add dependencies
on CXF modules so that JaxrsScanningProcessor can use CXF as JAX-RS
stack as an alternative.
To go with this approach, you will have to install CXF in AS 7 by
yourself, then define cxf modules similar to what
org/jboss/resteasy/resteasy-jaxrs/main/module.xml does.
2. Disable JaxrsScanningProcessor so that Guvnor can use CXF to load
JAX-RS resources using CXF's own way.
This approach is what we did in AS 6. We configured CXF to use its own
non-standard way to load JAX-RS resources other than using the standard
javax.ws.rs.core.Application. But for some unknown reasons, this
approach seems not working for AS 7 anymore.
I can take a further look once I have time.
Cheers,
Jervis
On 2011/7/18 7:26, cross.cy wrote:
Hi, I'm trying to deploy Guvnor 5.2 in JBoss AS 7.0. JBoss is
running in
standalone mode. However i came across with the following error which failed
the deployment:
09:19:33,330 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2)
MSC00001: Failed to start service
jboss.deployment.unit."guvnor.war".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."guvnor.war".POST_MODULE: Failed to process phase
POST_MODULE of deployment "guvnor.war"
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
at
org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[:1.6.0_24]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[:1.6.0_24]
at java.lang.Thread.run(Thread.java:680) [:1.6.0_24]
Caused by: java.lang.LinkageError: Failed to link
org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet (Module
"deployment.guvnor.war:main" from Service Module Loader)
at
org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401)
at
org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)
at
org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)
at org.jboss.modules.Module.loadModuleClass(Module.java:588)
at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
at
org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.checkDeclaredApplicationClassAsServlet(JaxrsScanningProcessor.java:310)
at
org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.scanWebDeployment(JaxrsScanningProcessor.java:164)
at
org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.deploy(JaxrsScanningProcessor.java:113)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
... 5 more
Caused by: java.lang.NoClassDefFoundError:
org/apache/cxf/transport/servlet/CXFNonSpringServlet
at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_24]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [:1.6.0_24]
at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [:1.6.0_24]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
[:1.6.0_24]
at
org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397)
... 16 more
Caused by: java.lang.ClassNotFoundException:
org.apache.cxf.transport.servlet.CXFNonSpringServlet from [Module
"deployment.guvnor.war:main" from Service Module Loader]
at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
... 21 more
I then downloaded cxf-rt-transports-http.jar and tried to put it in both
standalone/lib/ext folder and the modules folder but I still got the same
error. Could anyone please help? Thanks!
--
View this message in context:
http://drools.46999.n3.nabble.com/errors-of-deploying-Guvnor-5-2-0-to-JBo...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users