7 Replies Latest reply on Mar 18, 2011 1:47 PM by steve bliesner

    Cannot deploy a JSP that calls a webservice in Servicemix

    steve bliesner Newbie

      I am currently trying to deploy a JSP in Servicemix (4.3.1).  The page comes up, but when I try to access a webservice (deployed in Servicemix) from the JSP, I get one of the following erros:

       

      java.lang.NoClassDefFoundError: Could not initialize class org.apache.cxf.staxutils.StaxUtils

       

      or

       

      java.lang.ClassCastException: com.sun.xml.internal.stream.XMLInputFactoryImpl cannot be cast to javax.xml.stream.XMLInputFactory

       

      =======================

      Stack trace for NoClassDefFoundError

       

      HTTP ERROR 500

      Problem accessing /metar-jsp/index.jsp. Reason:

       

          Error reading 'metarReport' on type com.boeing.aatm.soaim.services.metar.jsp.MetarServiceBean

       

      Caused by:

      javax.el.ELException: Error reading 'metarReport' on type com.boeing.aatm.soaim.services.metar.jsp.MetarServiceBean

           at javax.el.BeanELResolver.getValue(BeanELResolver.java:66)

           at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)

           at org.apache.el.parser.AstValue.getValue(AstValue.java:118)

           at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)

           at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:925)

           at org.apache.jsp.index_jsp._jspx_meth_c_005fif_005f3(index_jsp.java:664)

           at org.apache.jsp.index_jsp._jspService(index_jsp.java:184)

           at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

           at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)

           at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)

           at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)

           at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)

           at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)

           at org.ops4j.pax.web.jsp.JspServletWrapper$2.call(JspServletWrapper.java:132)

           at org.ops4j.pax.web.jsp.JspServletWrapper$2.call(JspServletWrapper.java:127)

           at org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader(ContextClassLoaderUtils.java:60)

           at org.ops4j.pax.web.jsp.JspServletWrapper.service(JspServletWrapper.java:124)

           at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)

           at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)

           at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:64)

           at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)

           at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)

           at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.handle(HttpServiceContext.java:111)

           at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:68)

           at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

           at org.mortbay.jetty.Server.handle(Server.java:326)

           at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)

           at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)

           at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)

           at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)

           at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)

           at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)

           at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

      Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.cxf.staxutils.StaxUtils

           at org.apache.cxf.bus.spring.TunedDocumentLoader.loadFastinfosetDocument(TunedDocumentLoader.java:146)

           at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.fastInfosetLoadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:164)

           at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.loadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:126)

           at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)

           at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)

           at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:109)

           at org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusApplicationContext.java:263)

           at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)

           at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)

           at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)

           at org.apache.cxf.bus.spring.BusApplicationContext.(StaxUtils.java:77)

           ... 61 more

       

       

      Thanks