The client hangs but the server reports this error which is just saying the DAO is null (Error below).

This is the debug output from the client.

08-May-2009 09:32:08 org.apache.cxf.interceptor.LoggingOutInterceptor $LoggingCallback onClose
INFO: Outbound Message
---------------------------
Address: http://localhost:8080/services/helloWorld
Encoding: UTF-8
Content-Type: text/xml
Headers: {SOAPAction=[""], Accept=[*/*]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/ "><soap:Body><ns2:loadUser xmlns:ns2="http:// webservices.demsys.org/"><arg0>3</arg0></ns2:loadUser></soap:Body></ soap:Envelope>
--------------------------------------
08-May-2009 09:32:08 org.apache.cxf.interceptor.LoggingOutInterceptor $LoggingCallback onClose
INFO: Outbound Message
---------------------------
Address: http://localhost:8080/services/helloWorld
Encoding: UTF-8
Content-Type: text/xml
Headers: {SOAPAction=[""], Accept=[*/*]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/ "><soap:Body><ns2:loadUser xmlns:ns2="http:// webservices.demsys.org/"><arg0>3</arg0></ns2:loadUser></soap:Body></ soap:Envelope>
--------------------------------------
08-May-2009 09:32:08 org.apache.cxf.interceptor.LoggingInInterceptor logging
INFO: Inbound Message
----------------------------
Encoding: UTF-8
Content-Type: text/xml; charset=utf-8
Headers: {content-type=[text/xml; charset=utf-8], Content- Length=[227], Server=[Jetty(6.1.6)]} Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/ "><soap:Body><soap:Fault><faultcode>soap:Server</ faultcode><faultstring>Fault occurred while processing.</faultstring></ soap:Fault></soap:Body></soap:Envelope>
--------------------------------------





-----------Error from server---------------------------------

08-May-2009 09:32:08 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Application has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault
at org .apache .cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java: 148) at org .apache .cxf .jaxws .AbstractJAXWSMethodInvoker .createFault(AbstractJAXWSMethodInvoker.java:83) at org .apache .cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:114) at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java: 55) at org .apache .cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:68) at org.apache.cxf.interceptor.ServiceInvokerInterceptor $1.run(ServiceInvokerInterceptor.java:57) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java: 441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at org .apache .cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) at org .apache .cxf .interceptor .ServiceInvokerInterceptor .handleMessage(ServiceInvokerInterceptor.java:95) at org .apache .cxf .phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) at org .apache .cxf .transport .ChainInitiationObserver.onMessage(ChainInitiationObserver.java:89) at org .apache .cxf .transport.servlet.ServletDestination.invoke(ServletDestination.java:99) at org .apache .cxf .transport .servlet.ServletController.invokeDestination(ServletController.java:337) at org .apache .cxf.transport.servlet.ServletController.invoke(ServletController.java: 182) at org .apache .cxf .transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java: 163) at org .apache .cxf .transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java: 141)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1093) at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java: 129) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 404) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
        at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 505) at org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.java:842)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org .mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 395) at org.mortbay.thread.BoundedThreadPool $PoolThread.run(BoundedThreadPool.java:450)
Caused by: java.lang.NullPointerException
at org.demsys.webservices.HelloWorldImpl.loadUser(HelloWorldImpl.java: 35)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at sun .reflect .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25)
        at java.lang.reflect.Method.invoke(Method.java:597)
at org .apache .cxf .service .invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:166) at org .apache .cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:82)
        ... 35 more

On 8 May 2009, at 09:18, Willem Jiang wrote:

Just a quick question.
Does the error be thrown from Tomcat or Client?

Willem

Raphael F. wrote:
Ok I have progressed with the help of Sergey & Daniel.

So now, I'm able to launch my webapp on jetty standalone server using
jetty-runner jar, as described here :
http://blogs.webtide.com/janb/entry/jetty_runner

I've modified my web.xml file (look @ this file[1]) in my .war so that
CXFServlet be used by the server. The problem I can't have resolve
currently is that once my WAR is deployed on Tomcat, when I try to
launch my client app (via an executable JAR or via classical maven
command) which test the service by connecting to the URL, I get only
this error :
"Description: Requested resource (CXFServlet servlet is not available)
is not available."

I have look at forums and mailing lists, but nothing i've seen can help me.

Does someone already see this error and knows how to resolve it ?

Thanks by advance, Raphaƫl.

[1] My web.xml, little truncated for being more readable :
http://rafb.net/p/8cYw3O21.html


2009/5/5 Daniel Kulp <[email protected]>:
Most likely, you'll need to add a folder:

src/main/webapp/WEB-INF

to your maven project and add into it your own web.xml that would contain the setups and stuff for your CXF servlet, your bean mappings, etc... That should allow the resulting war to have the required/proper mapping to make it
directly deployable into tomcat/jetty/etc..

Actually, if you set your "packaging" in maven pom to "war" so "mvn install" will generate the war, then you can run it directly using the jetty or tomcat maven plugins. (mvn jetty:run) Also, the maven eclipse plugin would recognize the war packaging and wire it into the eclipse runners and such.

Dan


On Tue May 5 2009 10:26:21 am Raphael F. wrote:
Hello all,

I'd like to launch my CXF based application into a web server (Tomcat for instance, or any other if needed) just by moving a WAR file into webapps directory and deploying with server's manager, so that a user
of my app can deploy it without Maven or else dev tool. I have
generated a WAR file from my application which I usually deploy with
maven command (after having used "mvn install" command) :
mvn -Pserver

The "mvn war:war" command has generated a WAR file with all classes
and libraries used, but it contains a /WEB-INF/web.xml file with
following :

   <!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd"; >

   <web-app>
     <display-name>Archetype Created Web Application</display-name>
   </web-app>


A /META-INF/MANIFEST.MF file :

   Manifest-Version: 1.0

   Created-By: Apache Maven

   Built-By: rflores

   Build-Jdk: 1.6.0_0




A /META-INF/application.xml file :

   <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE application PUBLIC
         "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
         "http://java.sun.com/dtd/application_1_3.dtd";>
   <application>
     <display-name>ProticPortWeb</display-name>
   </application>

etc.

I never have used a WAR file in order to deploy an application on a
web server so I'm not really well-skilled with this technology, but I
expect it should provoke some problems with the used of Jetty light
server (actually implemented in a Server.java class like the example
"restul_http_binding" shows). So I have few questions :
- If I want to use a HTTP server to easily deploy my app by moving the
WAR in /webapps's Tomcat like directory, it seems that I have to
configure the WAR with one ore several XML files (what file,
MANIFEST.MF ? Application.xml ? web.xml ? Each one ?) instead of using
Server.java class like example above (class which I would remove I
think ?), so that the HTTP server knows the services to deploy, am I
true ?
- If I'm wrong, does Jetty server can be launched as this by the other
web server without removing the Server.java class ?
- A Maven oriented question (I should post it on Maven's user list I think) : Maven WAR plugin can generate a WAR file from maven project,
but deploying files (the ones I have shown above) do not contain
information about deployment for the server, does Maven can generate
it from adding information into pom.xml ?

Does one of you knows an easy way to deploy my app without Maven
commands ? Thanks.
--
Daniel Kulp
[email protected]
http://www.dankulp.com/blog






David Uttley
[email protected]
Tel: +447525909341

*Disclaimer*

*Confidentiality: *This e-mail and its attachments are intended for the above named only and may be confidential. If they have come to you in error you must take no action based on them, nor must you copy or show them to anyone; please reply to this e-mail and highlight the error. *Security Warning: *Please note that this e-mail has been created in the knowledge that Internet e-mail is not a 100% secure communications medium. We advise that you understand and observe this lack of security when e-mailing us. *Viruses: *Although we have taken steps to ensure that this e-mail and attachments are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free.






Reply via email to