// Make a bus factory so that the worker and front end, if
co-resident, don't share.
bus = BusFactory.newInstance().createBus();
// set the class loader so that the TCCL is reliably 'us' when we get called.
bus.setExtension(bundleContext.getBundle().adapt(BundleWiring.class).getClassLoader(),
ClassLoader.class);
JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
sf.setBus(bus);
sf.setServiceBean(this);
sf.setAddress("/worker");
server = sf.create();On Wed, Dec 30, 2015 at 1:54 AM, Jean-Baptiste Onofré <[email protected]> wrote: > How did you deploy the CXF endpoint ? > > Can you share the blueprint or activator code where you register the > endpoint ? > > Regards > JB > > > On 12/30/2015 12:15 AM, Benson Margulies wrote: >> >> /rest/worker/process is a CXF rest endpoint URL of mine. >> >> With Karaf 4.0.2, if I make this endpoint asynchronous, and I have the >> jolokia feature installed, I get the following backtrace from time to >> time. None of my calls to my endpoint fail, I just get these >> backtraces. >> >> Jolokia should be just it's own restful endpoint, so how is it >> involved in mine? And why does switching on async trigger all the >> trouble? >> >> >> 2015-12-29 14:32:14,328 | WARN | tp1821513140-131 | HttpChannel >> | 150 - org.eclipse.jetty.util - 9.2.10.v20150310 | >> /rest/worker/process >> java.lang.IllegalStateException: Committed >> at >> org.eclipse.jetty.server.Response.resetBuffer(Response.java:1253)[147:org.eclipse.jetty.server:9.2.10.v20150310] >> at >> org.eclipse.jetty.server.Response.sendError(Response.java:567)[147:org.eclipse.jetty.server:9.2.10.v20150310] >> at >> org.eclipse.jetty.server.Response.sendError(Response.java:544)[147:org.eclipse.jetty.server:9.2.10.v20150310] >> at >> javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:167)[51:javax.servlet-api:3.1.0] >> at >> org.jolokia.osgi.security.BasicAuthenticationHttpContext.handleSecurity(BasicAuthenticationHttpContext.java:49)[164:org.jolokia.osgi:1.3.0] >> at >> org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:68)[191:org.ops4j.pax.web.pax-web-jetty:4.2.2] >> at >> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[147:org.eclipse.jetty.server:9.2.10.v20150310] >> at >> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[146:org.eclipse.jetty.security:9.2.10.v20150310] >> at >> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[147:org.eclipse.jetty.server:9.2.10.v20150310] >> at >> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[147:org.eclipse.jetty.server:9.2.10.v20150310] >> at >> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:271)[191:org.ops4j.pax.web.pax-web-jetty:4.2.2] >> at >> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[148:org.eclipse.jetty.servlet:9.2.10.v20150310] >> at >> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[147:org.eclipse.jetty.server:9.2.10.v20150310] >> at >> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[147:org.eclipse.jetty.server:9.2.10.v20150310] >> at >> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[147:org.eclipse.jetty.server:9.2.10.v20150310] >> at >> org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:99)[191:org.ops4j.pax.web.pax-web-jetty:4.2.2] >> at >> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[147:org.eclipse.jetty.server:9.2.10.v20150310] >> at >> org.eclipse.jetty.server.Server.handleAsync(Server.java:553)[147:org.eclipse.jetty.server:9.2.10.v20150310] >> at >> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)[147:org.eclipse.jetty.server:9.2.10.v20150310] >> at >> org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:261)[147:org.eclipse.jetty.server:9.2.10.v20150310] >> at >> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[150:org.eclipse.jetty.util:9.2.10.v20150310] >> at >> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[150:org.eclipse.jetty.util:9.2.10.v20150310] >> > > -- > Jean-Baptiste Onofré > [email protected] > http://blog.nanthrax.net > Talend - http://www.talend.com
