0 Replies Latest reply on Mar 3, 2013 8:11 PM by Bhushan Rane

    error in intializing json natural configuration with jboss 7.1.1 (jbossws-cxf-4.1.1)

    Bhushan Rane Newbie

      Hi All,

      I am trying to access REST webservices for which json is also a type of input. I am using jaxb annotations on the pojo classes for webservices. While posting request following error is thrown.

       

      15:20:05,784 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/sdp_v1].[RESTServlet]] (http-0.0.0.0-0.0.0.0-8080-5) Servlet.service() for servlet RESTServlet threw exception: java.lang.RuntimeException: java.lang.RuntimeException: NATURAL JSON notation configured, but JAXB RI 2.1.10 not found. For the recent builds to get this working correctly, you need even at least JAXB version 2.1.12. Please add it to your classpath!

              at com.cisco.sdp.core.rest.common.utils.JAXBContextResolver.getContext(JAXBContextResolver.java:36) [classes:]

              at com.cisco.sdp.core.rest.common.utils.JAXBContextResolver.getContext(JAXBContextResolver.java:13) [classes:]

              at com.cisco.sdp.core.rest.common.utils.UnmarshallerResolver.getContext(UnmarshallerResolver.java:54) [classes:]

              at com.cisco.sdp.core.rest.common.utils.UnmarshallerResolver.getContext(UnmarshallerResolver.java:35) [classes:]

              at com.sun.jersey.core.provider.jaxb.AbstractJAXBProvider.getUnmarshaller(AbstractJAXBProvider.java:130) [jersey-core-1.8.jar:1.8]

              at com.sun.jersey.core.provider.jaxb.AbstractJAXBProvider.getUnmarshaller(AbstractJAXBProvider.java:117) [jersey-core-1.8.jar:1.8]

              at com.sun.jersey.core.provider.jaxb.AbstractRootElementProvider.readFrom(AbstractRootElementProvider.java:111) [jersey-core-1.8.jar:1.8]

              at com.sun.jersey.spi.container.ContainerRequest.getEntity(ContainerRequest.java:474) [jersey-server-1.8.jar:1.8]

              at com.sun.jersey.server.impl.model.method.dispatch.EntityParamDispatchProvider$EntityInjectable.getValue(EntityParamDispatchProvider.java:123) [jersey-server-1.8.jar:1.8]

              at com.sun.jersey.server.impl.inject.InjectableValuesProvider.getInjectableValues(InjectableValuesProvider.java:46) [jersey-server-1.8.jar:1.8]

              at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$EntityParamInInvoker.getParams(AbstractResourceMethodDispatchProvider.java:153) [jersey-server-1.8.jar:1.8]

              at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:203) [jersey-server-1.8.jar:1.8]

              at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) [jersey-server-1.8.jar:1.8]

              at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) [jersey-server-1.8.jar:1.8]

              at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) [jersey-server-1.8.jar:1.8]

              at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.8.jar:1.8]

              at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) [jersey-server-1.8.jar:1.8]

              at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469) [jersey-server-1.8.jar:1.8]

              at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400) [jersey-server-1.8.jar:1.8]

              at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) [jersey-server-1.8.jar:1.8]

              at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) [jersey-server-1.8.jar:1.8]

              at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) [jersey-server-1.8.jar:1.8]

              at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) [jersey-server-1.8.jar:1.8]

              at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) [jersey-server-1.8.jar:1.8]

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

              at com.cisco.sdp.core.rest.common.rs.filter.RestWSFilter.doFilter(RestWSFilter.java:31) [classes:]

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489) [jbossweb-7.0.13.Final.jar:]

              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_35]

      Caused by: java.lang.RuntimeException: NATURAL JSON notation configured, but JAXB RI 2.1.10 not found. For the recent builds to get this working correctly, you need even at least JAXB version 2.1.12. Please add it to your classpath!

              at com.sun.jersey.api.json.JSONConfiguration.natural(JSONConfiguration.java:447) [jersey-json-1.8.jar:1.8]

              at com.cisco.sdp.core.rest.common.utils.JAXBContextResolver.getContext(JAXBContextResolver.java:31) [classes:]

              ... 41 more

       

      Any idea what I am missing here? (I am packaging jersey jars in the web application ear.)