Hello, 

I'm testing the tutorial
http://www.liquid-reality.de/display/liquid/2011/12/22/Karaf+Tutorial+Part+4+-+CXF+Services+in+OSGi
 
that Christian wrote. This tutorial show us a best practice.

I got the projects :
- Model
- proxy
- server
- webui

I didn't retrieve the "proxy-rest" project at the moment.

I tested the proxy project using the method called "getAll" in SOAPUI (in
SOAPUI, I typed the URL http://localhost:8181/cxf/personService?wsdl and
then, I call the "getAll" method).
It works fine!

Nevertheless, when I try to test the webui project, it doesn't work. When I
type the url http://localhost:8181/personui ,the message below appears:

HTTP ERROR 500

Problem accessing /personui. Reason:

    Server Error

Caused by:

java.lang.IllegalStateException: getService() returned null for
[net.lr.tutorial.karaf.cxf.personservice.model.PersonService]
        at
org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:250)
        at
org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:56)
        at
org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:306)
        at Proxybffb88b4_dcbf_4eaa_9298_5cac62195fc8.getAll(Unknown Source)
        at
net.lr.tutorial.karaf.cxf.personservice.webui.PersonServlet.doGet(PersonServlet.java:21)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
        at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
        at
org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
        at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
        at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
        at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
        at
org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:287)
        at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
        at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
        at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at
org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
        at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:499)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
        at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
        at
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
        at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:745)



For me, it seems to be normal because the class called
"net.lr.tutorial.karaf.cxf.personservice.model.PersonService" hasn't got
method called "getAll()".
The method called "getAll" appears in the class called
"net.lr.tutorial.karaf.cxf.personservice.impl.PersonServiceImpl".

It seems that the goal of the tutorial is not to allow the webui access to
the server, isn't it? So, how to do to allow to the webui to get all the
registered persons?

Thank you in advance for your answer.

Regards,

PS: I use Karaf 4.0.8 and cxf 3.1.10




--
View this message in context: 
http://karaf.922171.n3.nabble.com/Problem-with-a-tutorial-of-Christian-Schneider-tp4049518.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to