2 Replies Latest reply: Sep 22, 2011 8:15 PM by Leon Doud RSS

    Installing JBossWS CXF 3.4.0 with JBoss AS 5.1

    Leon Doud Newbie

      Hello,

       

      I've installed JBossWS CXF 3.4.0 with JBoss AS 5.1.  Specifically, I've installed it using "ant -Dspring=true deploy-jboss510" and generally following the instructions from the following web page.

       

      http://community.jboss.org/wiki/JBossWS-Installation

       

      The problem I have is that I needed to manually install the "org.springframework.web-3.0.5.RELEASE.jar" in addition to the above installation for my web services to work.  I put this jar file in my .../jboss-5.1.0.GA/server/default/lib directory.  I downloaded the 3.0.5 version of Spring Framework from:

      http://www.springsource.com/download/community

       

      I didn't develop the service.  The developers worked in a Tomcat'like enviroment and had never run their service outside their IDE.  I had to rework the web.xml to run their web service (they implemented it as a pojo).  Previously the web.xml started the Spring servlet that ran their pojo.  The reworked web.xml just has their pojo listed as servlet, and the path for the servlet defined as "/*".

       

      I also had to rework their abc-beans.xml to jbossws-cxf.xml, and add the "InvokerJSE" as described here:

      http://community.jboss.org/wiki/JBossWS-StackCXFUserGuide#Server_Side_Integration_Customization

       

      Just to repeat, it works, but why did I have to add the "org.springframework.web-3.0.5.RELEASE.jar" to the server/default/lib?  I'm guessing something went wrong with the install of JBossWS CXF 3.4.0.

       

      Here is the stack trace that happens if I don't manually add the "org.springframework.web-3.0.5.RELEASE.jar" after the JBossWS CXF 3.4.0 install:

       

      Caused by: java.lang.NoClassDefFoundError: org/springframework/web/context/ServletContextAware

              at java.lang.ClassLoader.defineClass1(Native Method)

              at java.lang.ClassLoader.defineClass(ClassLoader.java:634)

              at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:63)

              at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:572)

              at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:532)

              at java.security.AccessController.doPrivileged(Native Method)

              at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:530)

              at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:507)

              at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:134)

              at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131)

              at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:452)

              at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:251)

              at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:150)

              at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:265)

              at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1119)

              at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:798)

              at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:266)

              at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)

              at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)

              at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1256)

              at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1227)

              ... 41 more

      Caused by: java.lang.ClassNotFoundException: org.springframework.web.context.ServletContextAware

              at java.net.URLClassLoader$1.run(URLClassLoader.java:217)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.net.URLClassLoader.findClass(URLClassLoader.java:205)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:321)

              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:266)

              at java.lang.Class.forName0(Native Method)

              at java.lang.Class.forName(Class.java:264)

              at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:292)

              at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1119)

              at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:798)

              at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:266)

              ... 63 more

       

      Thanks in advance,

      Leon