Hello,

    Out system uses a custom class-loader but, because of the stack-trace (below) we receive in some circumstances, I suspect that CXF does not use our ClassLoader which should be the default by the time we initialize CXF.  We have a *CxfWebServiceServlet* which extends the *CXFNonSpringServlet* for deploying JaxWS websevices and looking at the source it uses the BUS to get a ClassLoader derived from the BusExtensions.

    How can I ensure that our ClassLoader is always used?  Can I push our ClassLoader into the BUS before we start initializing the servlet? Do I need to configure/create a BusExtension for this and if so, how? Do you have any examples or can you point me at some useful documentation?


    Here is the exception:

   [13:51:13.810+0300] SYSERR  javax.xml.ws.WebServiceException:
   java.lang.reflect.UndeclaredThrowableException
   [13:51:13.811+0300] SYSERR      at
   org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:375)
   [13:51:13.811+0300] SYSERR      at
   org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:255)
   [13:51:13.811+0300] SYSERR      at
   
org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:136)
   [13:51:13.811+0300] SYSERR      at
   javax.xml.ws.Endpoint.publish(Endpoint.java:240)
   [13:51:13.812+0300] SYSERR      at
   
com.foo.server.jetty.servlet.CxfWebServiceServlet.publishCXF(CxfWebServiceServlet.java:77)
   ... REMOVED LINES GENERATING THE WEB SERVICE CODE AND COMPILE ETC ...
   [13:51:13.813+0300] SYSERR      at
   
com.foo.server.jetty.JettyContextListener.contextInitialized(JettyContextListener.java:89)
   [13:51:13.814+0300] SYSERR      at
   
org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800)
   [13:51:13.814+0300] SYSERR      at
   
org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444)
   [13:51:13.814+0300] SYSERR      at
   
org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
   [13:51:13.814+0300] SYSERR      at
   
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)
   [13:51:13.815+0300] SYSERR      at
   org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
   [13:51:13.815+0300] SYSERR      at
   org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
   [13:51:13.815+0300] SYSERR      at
   
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
   [13:51:13.815+0300] SYSERR      at
   org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
   [13:51:13.815+0300] SYSERR      at
   com.basis.server.jetty.BBjWebAppContext.doStart(BBjWebAppContext.java:229)
   [13:51:13.815+0300] SYSERR      at
   
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
   [13:51:13.816+0300] SYSERR      at
   
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
   [13:51:13.816+0300] SYSERR      at
   
org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
   [13:51:13.816+0300] SYSERR      at
   
org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
   [13:51:13.816+0300] SYSERR      at
   
org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:163)
   [13:51:13.816+0300] SYSERR      at
   
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
   [13:51:13.817+0300] SYSERR      at
   
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
   [13:51:13.817+0300] SYSERR      at
   
org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
   [13:51:13.817+0300] SYSERR      at
   
org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
   [13:51:13.817+0300] SYSERR      at
   
org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:163)
   [13:51:13.817+0300] SYSERR      at
   
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
   [13:51:13.818+0300] SYSERR      at
   
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
   [13:51:13.818+0300] SYSERR      at
   
org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
   [13:51:13.818+0300] SYSERR      at
   
org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
   [13:51:13.818+0300] SYSERR      at
   
org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:140)
   [13:51:13.818+0300] SYSERR      at
   
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
   [13:51:13.818+0300] SYSERR      at
   
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
   [13:51:13.819+0300] SYSERR      at
   org.eclipse.jetty.server.Server.start(Server.java:387)
   [13:51:13.819+0300] SYSERR      at
   
org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
   [13:51:13.819+0300] SYSERR      at
   
org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
   [13:51:13.819+0300] SYSERR      at
   org.eclipse.jetty.server.Server.doStart(Server.java:354)
   [13:51:13.819+0300] SYSERR      at
   
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
   ... REMOVED LINES - SYSTEM START ...
   [13:51:13.821+0300] SYSERR  Caused by:
   java.lang.reflect.UndeclaredThrowableException
   [13:51:13.821+0300] SYSERR      at
   com.sun.proxy.$Proxy25.visitLabel(Unknown Source)
   [13:51:13.821+0300] SYSERR      at
   
org.apache.cxf.jaxws.WrapperClassGenerator.createWrapperClass(WrapperClassGenerator.java:213)
   [13:51:13.821+0300] SYSERR      at
   
org.apache.cxf.jaxws.WrapperClassGenerator.generate(WrapperClassGenerator.java:122)
   [13:51:13.821+0300] SYSERR      at
   
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.generatedWrapperBeanClass(JaxWsServiceFactoryBean.java:675)
   [13:51:13.822+0300] SYSERR      at
   
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.getExtraClass(JaxWsServiceFactoryBean.java:645)
   [13:51:13.822+0300] SYSERR      at
   
org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:461)
   [13:51:13.822+0300] SYSERR      at
   
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:696)
   [13:51:13.822+0300] SYSERR      at
   
org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:527)
   [13:51:13.822+0300] SYSERR      at
   
org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:261)
   [13:51:13.823+0300] SYSERR      at
   
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:199)
   [13:51:13.823+0300] SYSERR      at
   
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102)
   [13:51:13.823+0300] SYSERR      at
   org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:168)
   [13:51:13.823+0300] SYSERR      at
   
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
   [13:51:13.823+0300] SYSERR      at
   org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:460)
   [13:51:13.823+0300] SYSERR      at
   org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:338)
   [13:51:13.823+0300] SYSERR      ... 55 more
   [13:51:13.824+0300] SYSERR  Caused by:
   java.lang.NoSuchMethodException:
   org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)
   [13:51:13.824+0300] SYSERR      at
   java.lang.Class.getMethod(Class.java:1786)
   [13:51:13.824+0300] SYSERR      at
   
org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:85)
   [13:51:13.824+0300] SYSERR      ... 70 more

JettyContextListener initializes the CxfWebServiceServlet


--
Best regards,

Richard Stollar

Reply via email to