I am trying to deploy the RESTful webservices on liberty profile 8.5.5.2. I have enabled the jaxrs-1.1 feature in server and I am using Java 1.7. When I start the server it gives me following error:
[ERROR ] Uncaught.init.exception.thrown.by.servlet
JAX-RS Servlet
accessms
java.lang.NoClassDefFoundError: org/apache/wink/server/handlers/HandlersFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at com.ibm.ws.classloading.internal.AppClassLoader.definePackageAndClass(AppClassLoader.java:275)
at [internal classes]
at org.apache.wink.server.internal.DeploymentConfiguration.initHandlers(DeploymentConfiguration.java:456)
at org.apache.wink.server.internal.DeploymentConfiguration.init(DeploymentConfiguration.java:169)
at org.apache.wink.server.internal.servlet.RestServlet.getDeploymentConfiguration(RestServlet.java:184)
at org.apache.wink.server.internal.servlet.RestServlet.createRequestProcessor(RestServlet.java:129)
at org.apache.wink.server.internal.servlet.RestServlet.init(RestServlet.java:94)
at javax.servlet.GenericServlet.init(GenericServlet.java:161)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:325)
at [internal classes]
[ERROR ] SRVE0266E: Error occured while initializing servlets: javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception created by servlet
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:395)
at [internal classes]
Caused by: java.lang.NoClassDefFoundError: org/apache/wink/server/handlers/HandlersFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at com.ibm.ws.classloading.internal.AppClassLoader.definePackageAndClass(AppClassLoader.java:275)
at [internal classes]
at org.apache.wink.server.internal.DeploymentConfiguration.initHandlers(DeploymentConfiguration.java:456)
at org.apache.wink.server.internal.DeploymentConfiguration.init(DeploymentConfiguration.java:169)
at org.apache.wink.server.internal.servlet.RestServlet.getDeploymentConfiguration(RestServlet.java:184)
at org.apache.wink.server.internal.servlet.RestServlet.createRequestProcessor(RestServlet.java:129)
at org.apache.wink.server.internal.servlet.RestServlet.init(RestServlet.java:94)
at javax.servlet.GenericServlet.init(GenericServlet.java:161)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:325)
... 1 more
Following is the entry in my web.xml file:
<servlet>
<servlet-name>JAX-RS Servlet</servlet-name>
<servlet-class>org.apache.wink.server.internal.servlet.RestServlet</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>com.example.RestfulResourceLoader</param-value>
</init-param>
<init-param>
<param-name>propertiesLocation</param-name>
<param-value>mobilehandler.properties</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>JAX-RS Servlet</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
What other configuration I need to do in order remove this error?
WebSphere Liberty supports JAX-RS 1.1, so you dont need to provide servlet class, just use the following fragment in web.xml:
<servlet>
<servlet-name>javax.ws.rs.core.Application</servlet-name>
</servlet>
<servlet-mapping>
<servlet-name>javax.ws.rs.core.Application</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
See also:
Configuring JAX-RS applications using JAX-RS 1.1 methods
UPDATE
The HandlersFactory is from third party libraries, try to add the following classloader (in the server.xml) to your application to make library visible.
<webApplication... >
<classloader apiTypeVisibility="spec,ibm-api,api,third-party">
</classloader>
</webApplication>
Related
My project is a dynamic web project,not maven project.
It gets errors when startting tomcat:
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/springmvc]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 6 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/web/context/WebApplicationContext
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2499)
at java.lang.Class.getDeclaredFields(Class.java:1811)
at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:270)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:139)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:415)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:892)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5412)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
I think it's caused by web.xml,codes below:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>Archetype Created Web Application</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>file:WebContent/WEB-INF/spring-mybatis.xml</param-value>
</context-param>
<!-- Spring MVC servlet -->
<servlet>
<servlet-name>SpringMVC</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>file:WebContent/WEB-INF/spring-mvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>SpringMVC</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<async-supported>true</async-supported>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>
I have googled before,most of them dont configure context-param and servlet,but I have configured them.And I have added jar files in lib.
This is my file structure:
-WEB-INF
--spring-mvc.xml
--spring-mybatis.xml
--web.xml
Are there someting wrongs with the contextConfigLocation?I also tried /WEB-INF/spring-mybatis.xml,but it not worked.
Recommended Options
Use Maven/Gradle project to build your project in your IDE and let them to take care of your dependencies.
When you are using spring framework it is always recommended to use Bill of Materials to avoid ClassNotFound exception.
Spring-boot is very popular, if you wish you can choose that option too to avoid XML configurations.
I think you are mission some jar to be added please make sure that you have below jars added... According to spring-webmvc 3.1.2 need following jar: I have given the same answer earlier so refer the below jar
aopalliance-1.0.jar
commons-logging-1.1.1.jar
spring-webmvc-3.1.2.RELEASE.jar
spring-asm-3.1.2.RELEASE.jar
spring-beans-3.1.2.RELEASE.jar
spring-core-3.1.2.RELEASE.jar
spring-context-3.1.2.RELEASE.jar
spring-aop-3.1.2.RELEASE.jar
spring-expression-3.1.2.RELEASE.jar
spring-context-support-3.1.2.RELEASE.jar
spring-web-3.1.2.RELEASE.jar
I have deployed a JAX-WS Web Service on a WAS 8.5 server. While starting this app gives following error:-
com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: null
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:432)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1175)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
Caused by: java.lang.NullPointerException
at org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer.mappingExists(JerseyServletContainerInitializer.java:331)
at org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer.addServletWithApplication(JerseyServletContainerInitializer.java:272)
at org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer.onStartupImpl(JerseyServletContainerInitializer.java:176)
at org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer.onStartup(JerseyServletContainerInitializer.java:143)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerInitializers(WebAppImpl.java:613)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:409)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
... 101 more
Below is the web.xml:-
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>My Event</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/applicationContext.xml
WEB-INF/classes/configs/*.xml
</param-value>
</context-param>
<!--<context-param>
<param-name>contextClass</param-name>
<param-value>com.javaetmoi.core.spring.JBoss5XmlWebApplicationContext</param-value>
</context-param>-->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>jerseyServlet</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer
</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>com.myapp.event.ws.JerseyConfig</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>jerseyServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
I am unable to find out what is causing the issue.
It's a Websphere Bug. The IBM implementation of javax.servlet.ServletRegistration.getMappings() returns null. This is not valid. It should return a empty collection. See https://github.com/eclipse-ee4j/jersey/issues/2978 (Old: https://java.net/jira/browse/JERSEY-2706)
There is a Websphere-Fix, but it has to be enabled.
A new WebContainer custom property needs to be set to enable the behavior provided by this APAR:
http://www-01.ibm.com/support/docview.wss?uid=swg1PI23529
You have to set the WebContainer custom property com.ibm.ws.webcontainer.emptyServletMappings to true. See http://www-01.ibm.com/support/docview.wss?rss=180&uid=swg21284395
I created a FAQ using spring boot. it needs to be deployed to a tomcat 6 server (servlet 2.5). I need to configure the current parent java app(war) web.xml to point all request to url pattern "/faq/*" for example, to my spring boot FAQ app. I've copied the FAQ.jar file into the lib folder of the parent app. But I'm not sure how to configure/register the spring boot servlet and servlet mapping within the web.xml of the parent application.
Using the spring boot legacy sample.. I placed my spring boot app in the parent app lib folder along with the dependency jar files. I added this code block to the web.xml of the parent app.
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>faq.Application</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.boot.legacy.context.web.SpringBootContextLoaderListener
</listener-class>
</listener>
<filter>
<filter-name>metricFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>metricFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>SpringServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextAttribute</param-name>
<param-value>org.springframework.web.context.WebApplicationContext.ROOT</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>SpringServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
But when I start up Tomcat, I get the following error.
Jun 30, 2014 12:17:23 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.boot.legacy.context.web.SpringBootContextLoaderListener
java.lang.IllegalAccessError: tried to access method org.springframework.core.io.support.SpringFactoriesLoader.loadFactoryNames(Ljava/lang/Class;Ljava/lang/ClassLoader;)Ljava/util/List; from class org.springframework.boot.SpringApplication
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:355)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:346)
at org.springframework.boot.SpringApplication.initialize(SpringApplication.java:222)
at org.springframework.boot.SpringApplication.(SpringApplication.java:198)
at org.springframework.boot.builder.SpringApplicationBuilder.(SpringApplicationBuilder.java:83)
at org.springframework.boot.legacy.context.web.SpringBootContextLoaderListener.initWebApplicationContext(SpringBootContextLoaderListener.java:48)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1617)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Jun 30, 2014 12:17:23 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
KevyKev
Spring Boot doesn't support Servlet 2.5 officially, but it doesn't take a lot to make it work. You might find this useful: https://github.com/scratches/spring-boot-legacy. Sample here: https://github.com/scratches/spring-boot-sample-gae.
I'm trying to deploy a war containing spring webservices. But I am getting a weird error like this:
following error weblogic.application.ModuleException: [HTTP:101216]Servlet: "spring-ws" failed to preload on startup in Web application: "myApp-1.0.0-SNAPSHOT.war".
javax.servlet.ServletException: Servlet class: 'org.springframework.ws.transport.http.MessageDispatcherServlet' doesn't have a default constructor
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:261)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1976)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1950)
I've tried giving a default constructor in the endpoint class.
Below are the steps which I followed:
web.xml has this entry:
<servlet>
<servlet-name>spring-ws</servlet-name>
<servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
<init-param>
<param-name>transformWsdlLocations</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>spring-ws</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
web-inf folder has spring-ws-servlet.xml file which has the entries for component scan, enabling the annotations and the wsdl entry like this:
<sws:static-wsdl id="MyService"
location="classpath:/services/myService/1.0/MyService.wsdl" />
Please let me know if I'm missing anything here....
Thank you.
It is likely that the jar files Weblogic is using to initialize the Spring classes and those expected to be used are in conflict.
To force the Weblogic container to use the jar files bundled with the war file you have to specify a WEB-INF/weblogic.xml file with the following content
<weblogic-web-app>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
see this thread
I am trying to run example which had Spring security included, but I removed that part from my web.xml. Now it looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/cxf.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<display-name>CXF Servlet</display-name>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<!--
<init-param><param-name>contextConfigLocation</param-name><param-value>
WEB-INF/cxf.xml
WEB-INF/applicationContext-security.xml
</param-value></init-param>
-->
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>fsmsc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>spring.profiles.active</param-name>
<param-value>test-profile</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/static/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/cxf/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>fsmsc</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
When I deploy, I get this error:
SEVERE: Exception sending context initialized event to listener instance of class
org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError:
org/codehaus/jettison/mapped/TypeConverter at
java.lang.Class.getDeclaredConstructors0(Native Method) at
java.lang.Class.privateGetDeclaredConstructors(Class.java:2398) at
java.lang.Class.getDeclaredConstructors(Class.java:1838) at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:229)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:962)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:935)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662) Caused by:
java.lang.ClassNotFoundException:
org.codehaus.jettison.mapped.TypeConverter at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
... 32 more
NoClassDefFoundError means you don't have that class (org/codehaus/jettison/mapped/TypeConverter) on your classpath. That class is contained on jettison jar, which is a dependency of CXF.
To resolve your problem check if the war file or your project dependencies have jettison on it.
More: looks like jettison is declared with provided scope on cxf-rt-rs-extension-providers pom.xml. This means you have to manually add jettison dependency directly to your pom.xml. I check that with last version of CXF: 2.7.3.