You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Leos Literak <li...@centrum.cz> on 2008/04/24 22:44:42 UTC
servlet transport bug?
I debugged CXF little and realized, that I'm confused what address must
be passed to Endpoint.publish().
Endpoint.publish("http://localhost:8080/services/users", impl);
There is no exception, everything looks ok, but it does not work. I
debugged ServletController.invoke() and transport.getDestinations()
contains "/http://localhost:8080/sluzby/users", so the adress "/users"
is never found.
Because of starting slash in destinations I attempted to set path
instead of hostname, but it failed with exception:
Endpoint.publish("/users", impl);
2008-04-24 22:28:05.641::WARN: Nested in
javax.servlet.ServletException:
org.apache.cxf.service.factory.ServiceConstructionException:
org.apache.cxf.service.factory.ServiceConstructionException
at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:135)
at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:160)
at
org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:304)
at
org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:232)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:183)
at
org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:74)
at javax.xml.ws.Endpoint.publish(Endpoint.java:156)
Caused by: java.net.MalformedURLException: no protocol: /users
at java.net.URL.<init>(URL.java:567)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.<init>(JettyHTTPDestination.java:84)
at
org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.createDestination(JettyHTTPTransportFactory.java:116)
at
org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.getDestination(JettyHTTPTransportFactory.java:103)
at
org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:74)
at
org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:90)
at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:69)
at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:114)
So am I doing something wrong or is it 2.0.5 bug?
Thanks for info, what to do now
Leos
Re: servlet transport bug?
Posted by Rafael Ribeiro <ra...@gmail.com>.
I faced the same problem and using the separate modules (without jetty)
instead of the big jar resolved the issue.
2008/4/24, Daniel Kulp <dk...@apache.org>:
>
>
> From that stack trace, there is a more serious issue. That stack trace
> shows that the http-jetty transport is registered to handle http stuff,
> not the servlet transport. That's definitely a problem as the jetty
> transport would need the full URL. But with the servlet, it wouldn't.
>
> My suggestion is for right now to check things out would be not use the
> big cxf jar and instead replace it with the module jars from the modules
> directory, but do NOT include the http-jetty jar. Thus, you'll know
> it's not being picked up. If that works, we at least know where to
> start. :-)
>
> Dan
>
>
>
> On Thursday 24 April 2008, Leos Literak wrote:
> > I debugged CXF little and realized, that I'm confused what address
> > must be passed to Endpoint.publish().
> >
> > Endpoint.publish("http://localhost:8080/services/users", impl);
> >
> > There is no exception, everything looks ok, but it does not work. I
> > debugged ServletController.invoke() and transport.getDestinations()
> > contains "/http://localhost:8080/sluzby/users", so the adress "/users"
> > is never found.
> >
> > Because of starting slash in destinations I attempted to set path
> > instead of hostname, but it failed with exception:
> >
> > Endpoint.publish("/users", impl);
> >
> > 2008-04-24 22:28:05.641::WARN: Nested in
> > javax.servlet.ServletException:
> > org.apache.cxf.service.factory.ServiceConstructionException:
> > org.apache.cxf.service.factory.ServiceConstructionException
> > at
> > org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.jav
> >a:135) at
> > org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryB
> >ean.java:160) at
> > org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:304)
> > at
> > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:232)
> > at
> > org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:183) at
> > org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(Provide
> >rImpl.java:74) at javax.xml.ws.Endpoint.publish(Endpoint.java:156)
> > Caused by: java.net.MalformedURLException: no protocol: /users
> > at java.net.URL.<init>(URL.java:567)
> > at java.net.URL.<init>(URL.java:464)
> > at java.net.URL.<init>(URL.java:413)
> > at
> > org.apache.cxf.transport.http_jetty.JettyHTTPDestination.<init>(JettyH
> >TTPDestination.java:84) at
> > org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.createDe
> >stination(JettyHTTPTransportFactory.java:116) at
> > org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.getDesti
> >nation(JettyHTTPTransportFactory.java:103) at
> > org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTr
> >ansportFactory.java:74) at
> > org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:90)
> > at
> > org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:69) at
> > org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.jav
> >a:114)
> >
> >
> > So am I doing something wrong or is it 2.0.5 bug?
> >
> > Thanks for info, what to do now
> >
> > Leos
>
>
>
>
> --
> J. Daniel Kulp
> Principal Engineer, IONA
> dkulp@apache.org
> http://www.dankulp.com/blog
>
Re: servlet transport bug?
Posted by Daniel Kulp <dk...@apache.org>.
From that stack trace, there is a more serious issue. That stack trace
shows that the http-jetty transport is registered to handle http stuff,
not the servlet transport. That's definitely a problem as the jetty
transport would need the full URL. But with the servlet, it wouldn't.
My suggestion is for right now to check things out would be not use the
big cxf jar and instead replace it with the module jars from the modules
directory, but do NOT include the http-jetty jar. Thus, you'll know
it's not being picked up. If that works, we at least know where to
start. :-)
Dan
On Thursday 24 April 2008, Leos Literak wrote:
> I debugged CXF little and realized, that I'm confused what address
> must be passed to Endpoint.publish().
>
> Endpoint.publish("http://localhost:8080/services/users", impl);
>
> There is no exception, everything looks ok, but it does not work. I
> debugged ServletController.invoke() and transport.getDestinations()
> contains "/http://localhost:8080/sluzby/users", so the adress "/users"
> is never found.
>
> Because of starting slash in destinations I attempted to set path
> instead of hostname, but it failed with exception:
>
> Endpoint.publish("/users", impl);
>
> 2008-04-24 22:28:05.641::WARN: Nested in
> javax.servlet.ServletException:
> org.apache.cxf.service.factory.ServiceConstructionException:
> org.apache.cxf.service.factory.ServiceConstructionException
> at
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.jav
>a:135) at
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryB
>ean.java:160) at
> org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:304)
> at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:232)
> at
> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:183) at
> org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(Provide
>rImpl.java:74) at javax.xml.ws.Endpoint.publish(Endpoint.java:156)
> Caused by: java.net.MalformedURLException: no protocol: /users
> at java.net.URL.<init>(URL.java:567)
> at java.net.URL.<init>(URL.java:464)
> at java.net.URL.<init>(URL.java:413)
> at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.<init>(JettyH
>TTPDestination.java:84) at
> org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.createDe
>stination(JettyHTTPTransportFactory.java:116) at
> org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.getDesti
>nation(JettyHTTPTransportFactory.java:103) at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTr
>ansportFactory.java:74) at
> org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:90)
> at
> org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:69) at
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.jav
>a:114)
>
>
> So am I doing something wrong or is it 2.0.5 bug?
>
> Thanks for info, what to do now
>
> Leos
--
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog