This is the stack trace you may see on your server.log:
Caused by: java.lang.ClassNotFoundException: org.springframework.beans.BeansException from [Module "org.apache.cxf:main" from local module loader @15cda3f (roots: /opt/dev/servers/jboss-as-7.1.1.Final/modules)]
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.performLoadClassChecked(ConcurrentClassLoader.java:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 96 more
If you have JBoss EAP and a license, just update it. But if you are on JBoss 7.1.1, you have two options to workaround this problem:
- One is updating JBoss WS to the upcoming 4.1.0 release (still in beta and it seems it has not been released publicly).
- Your best option is to add a Spring module to your JBoss instance and then add a dependency on Spring to the CXF module:
How to add a Spring module to JBoss AS 7?
First thing to do is to choose the best version of Spring. Prefer the latest one (in the time of this writing, 3.1.1). But if your application is using 3.0.x, pick the latest version of this branch.
- On the jboss-as-7.1.1-Final folder, create this path:
- modules/org/springframework/spring/main
- on Unix, you can do this using $ mkdir -p <path>
- Add the following module.xml to this newly created folder
- Download these JARs and add them to this newly created folder
- cglib-nodep-2.2.2.jar
- aopalliance-1.0.0.jar
- spring-aop-3.1.1.RELEASE.jar
- spring-asm-3.1.1.RELEASE.jar
- spring-beans-3.1.1.RELEASE.jar
- spring-context-3.1.1.RELEASE.jar
- spring-context-support-3.1.1.RELEASE.jar
- spring-core-3.1.1.RELEASE.jar
- spring-expression-3.1.1.RELEASE.jar
- spring-jdbc-3.1.1.RELEASE.jar
- spring-orm-3.1.1.RELEASE.jar
- spring-oxm-3.1.1.RELEASE.jar
- spring-tx-3.1.1.RELEASE.jar
- spring-web-3.1.1.RELEASE.jar
- Open this file
- jboss-as-7.1.1-Final/modules/org/apache/cxf/main/module.xml
- At the end of this file, make sure you have this module dependency:
- <module name="org.springframework.spring" />
Restart your application server.
Um comentário:
Grande Miojo!
Eu tava com esse mesmo problema e voce me deu a solução...
Ziba.
Postar um comentário