You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by patinouche <pa...@free.fr> on 2008/03/06 21:17:26 UTC

Re: Servlet.service() for servlet CXFServlet exception

Hi

I tried the example in Tomcat 6.0 and Jetty 6.1.8 and i got the same
NullPointerException.

I don't know if the problem was resolved.

thanks
patrice


Sergey Beryozkin wrote:
> 
> Hi
> 
>> thanks again for your insights on the matter.
> 
> I wish I could be more helpful than just advising you to debug it all
> yourslef :-)
> 
> Have a look in the cxf systests module, you'll find jax-rs system tests
> there.
> 
> Did you try to run your application in a standalone Tomcat ? 
> 
> Cheers, Sergey
> 
> 
> 
> ----- Original Message ----- 
> From: "rm-ramos" <rm...@criticalsoftware.com>
> To: <cx...@incubator.apache.org>
> Sent: Tuesday, February 19, 2008 4:31 PM
> Subject: Re: Servlet.service() for servlet CXFServlet exception
> 
> 
>> 
>> Hi Sergey, and thanks again for your insights on the matter.
>> 
>> The fact is that is I launch my server from a main() method, using a
>> JAXRSServerFactoryBean as described on the cxf's user manual, everything
>> runs smoothly and I have no problem accessing the data from a web
>> browser,
>> for ex.
>> 
>> Don't think the problem (back to JBoss) is the content-type either, been
>> doing some experiments with 'Poster' (the firefox extension) and the
>> results
>> haven't been any different.
>> 
>> I couldn't find the sample you talked about,
>> BookServerResourceCreatedSpring. Can you please tell me where to find it?
>> 
>> Thanks again,
>> Rui Ramos
>> 
>> 
>> 
>> Hi
>> 
>> It seems to be a lower-level CXF issue, ChainInitiationObserver.java:93
>> shows this code in my snapshot :
>> 
>> exchange.put(Bus.class, bus);
>> 
>> which is harmless....Perhaps the fact that a content type is set to null
>> causes the problem.
>> 
>> Still it's likely that Endpoint which ChainInitiationObserver deals with
>> has
>> not been set up properly...
>> Is there any chance you can try to run your server using a simple main(),
>> without JBoss involved ?
>> 
>> For ex, have a look at BookServerResourceCreatedSpring. It runs a server
>> using a /jaxrs_spring resource folder which has beans.xml, 
>> so just update it to refer to your web-app folder and try to get
>> resources
>> from a browser. It will help narrow the problem.
>> 
>> Cheers, Sergey
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/JAX-RS-%22No-service-found%22-using-Spring-and-JBoss-tp15461660p15561555.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
> 
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
> 
> 

-- 
View this message in context: http://www.nabble.com/JAX-RS-%22No-service-found%22-using-Spring-and-JBoss-tp15461660p15882984.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Servlet.service() for servlet CXFServlet exception

Posted by Daniel Kulp <dk...@apache.org>.
Can you make sure you grab the latest 2.1 snapshot and try again?   I 
really cannot see how there can possibly be a NullPointerException on 
line 93 of ChainInitiationObserver.   The line is just:
        exchange.put(Bus.class, bus);
which could only NPE if exchange is null, but that cannot be as the lines 
above it would then NPE.   Thus, I THINK something is out of sync with 
our sources which will make debugging this not-easy.   Tracing back 
through the history, it looks like it may be picking up a 2.0.3 or older 
ChainInitiationObserver class, which would be bad.   

The only other thing I can suggest is to enable jpda debugging or similar 
and trace through this in jboss and actually trace into that method and 
figure out what really is null.

Dan




On Thursday 06 March 2008, patinouche wrote:
> Hi
>
> I tried the example in Tomcat 6.0 and Jetty 6.1.8 and i got the same
> NullPointerException.
>
> I don't know if the problem was resolved.
>
> thanks
> patrice
>
> Sergey Beryozkin wrote:
> > Hi
> >
> >> thanks again for your insights on the matter.
> >
> > I wish I could be more helpful than just advising you to debug it
> > all yourslef :-)
> >
> > Have a look in the cxf systests module, you'll find jax-rs system
> > tests there.
> >
> > Did you try to run your application in a standalone Tomcat ?
> >
> > Cheers, Sergey
> >
> >
> >
> > ----- Original Message -----
> > From: "rm-ramos" <rm...@criticalsoftware.com>
> > To: <cx...@incubator.apache.org>
> > Sent: Tuesday, February 19, 2008 4:31 PM
> > Subject: Re: Servlet.service() for servlet CXFServlet exception
> >
> >> Hi Sergey, and thanks again for your insights on the matter.
> >>
> >> The fact is that is I launch my server from a main() method, using
> >> a JAXRSServerFactoryBean as described on the cxf's user manual,
> >> everything runs smoothly and I have no problem accessing the data
> >> from a web browser,
> >> for ex.
> >>
> >> Don't think the problem (back to JBoss) is the content-type either,
> >> been doing some experiments with 'Poster' (the firefox extension)
> >> and the results
> >> haven't been any different.
> >>
> >> I couldn't find the sample you talked about,
> >> BookServerResourceCreatedSpring. Can you please tell me where to
> >> find it?
> >>
> >> Thanks again,
> >> Rui Ramos
> >>
> >>
> >>
> >> Hi
> >>
> >> It seems to be a lower-level CXF issue,
> >> ChainInitiationObserver.java:93 shows this code in my snapshot :
> >>
> >> exchange.put(Bus.class, bus);
> >>
> >> which is harmless....Perhaps the fact that a content type is set to
> >> null causes the problem.
> >>
> >> Still it's likely that Endpoint which ChainInitiationObserver deals
> >> with has
> >> not been set up properly...
> >> Is there any chance you can try to run your server using a simple
> >> main(), without JBoss involved ?
> >>
> >> For ex, have a look at BookServerResourceCreatedSpring. It runs a
> >> server using a /jaxrs_spring resource folder which has beans.xml,
> >> so just update it to refer to your web-app folder and try to get
> >> resources
> >> from a browser. It will help narrow the problem.
> >>
> >> Cheers, Sergey
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/JAX-RS-%22No-service-found%22-using-Spring-an
> >>d-JBoss-tp15461660p15561555.html Sent from the cxf-user mailing list
> >> archive at Nabble.com.
> >
> > ----------------------------
> > IONA Technologies PLC (registered in Ireland)
> > Registered Number: 171387
> > Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
> > Ireland



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog