You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Jason Chaffee <jc...@ebates.com> on 2010/04/13 22:08:19 UTC

jax-rs service not showing up

My OSGI bundle is active and I am not seeing any errors in the log or in
the webconsole for my buddle.  Yet, when I access
http://localhost:8181/cxf/ it only shows the examples service.  Not sure
what is wrong here because there are no errors in the logs.  How can I
debug this?

 

Thanks,

 

Jason


RE: jax-rs service not showing up (Please help!)

Posted by Jason Chaffee <jc...@ebates.com>.
It is now showing up...not sure how that happened. I just started adding import-packages on a guess and it worked.  However, it isn't showing up correctly.  It only shows the relative path and the service doesn't work.  Does anyone have any ideas why this is happening?

Here is what services list shows (http://localhost:8181/cxf/):

Available RESTful services:
  Endpoint address: http://localhost:8181/cxf/crm
  WADL : http://localhost:8181/cxf/crm?_wadl&type=xml

  Endpoint address: /cbsp
  WADL : /cbsp?_wadl&type=xml


Notice how my custom service doesn't have the "http://localhost:8181/cxf" and if I try to hit http://localhost:8181/cxf/cbsp or the url in the listing, they both fail.  The above URL with "not found" and the service URL that should work with the following:

java.lang.RuntimeException: org.apache.cxf.interceptor.Fault
	at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:99)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:292)
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:109)
	at org.apache.cxf.transport.http_osgi.OsgiDestination.doMessage(OsgiDestination.java:79)
	at org.apache.cxf.transport.http_osgi.OsgiServletController.invokeDestination(OsgiServletController.java:327)
	at org.apache.cxf.transport.http_osgi.OsgiServletController.invoke(OsgiServletController.java:151)
	at org.apache.cxf.transport.http_osgi.OsgiServlet.invoke(OsgiServlet.java:53)
	at org.apache.cxf.transport.http_osgi.SpringOsgiServlet.invoke(SpringOsgiServlet.java:48)
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:108)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
	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:765)
	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:64)
	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.headerComplete(HttpConnection.java:923)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.apache.cxf.interceptor.Fault
	at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:66)
	... 27 more
Caused by: java.lang.IllegalArgumentException
	at java.net.URI.create(URI.java:842)
	at org.apache.cxf.jaxrs.utils.HttpUtils.toAbsoluteUri(HttpUtils.java:143)
	at org.apache.cxf.jaxrs.impl.UriInfoImpl.getBaseUri(UriInfoImpl.java:79)
	at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleRequest(WadlGenerator.java:121)
	at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:184)
	at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:88)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
	... 26 more
Caused by: java.net.URISyntaxException: Malformed escape pair at index 22: http://0:0:0:0:0:0:0:1%0:8181/cbsp
	at java.net.URI$Parser.fail(URI.java:2809)
	at java.net.URI$Parser.scanEscape(URI.java:2939)
	at java.net.URI$Parser.scan(URI.java:2962)
	at java.net.URI$Parser.parseAuthority(URI.java:3103)
	at java.net.URI$Parser.parseHierarchical(URI.java:3058)
	at java.net.URI$Parser.parse(URI.java:3014)
	at java.net.URI.<init>(URI.java:578)
	at java.net.URI.create(URI.java:840)
	... 32 more


This has been incredibly difficult to debug because there are ZERO errors in the logs, yet it doesn't work...sigh.  

Again, any help is appreciated.

Jason


-----Original Message-----
From: Jason Chaffee [mailto:jchaffee@ebates.com]
Sent: Tue 4/13/2010 1:08 PM
To: users@servicemix.apache.org
Subject: jax-rs service not showing up
 
My OSGI bundle is active and I am not seeing any errors in the log or in
the webconsole for my buddle.  Yet, when I access
http://localhost:8181/cxf/ it only shows the examples service.  Not sure
what is wrong here because there are no errors in the logs.  How can I
debug this?

 

Thanks,

 

Jason