You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Peter Kilian <pi...@googlemail.com> on 2011/12/19 12:54:33 UTC

NPE in Pax Web

Hi,

i have a problem with Karaf 2.2.4 and Eclipse RAP. I develop a web
application with Eclipse RAP 1.5 M4 [1], more precisely i use the RWT
widget toolkit and the RWT-OSGi [2] integration bundle to create a OSGi
based application.

Starting my application on Karaf 2.2.4, i see in the log file that the
rwt-osgi integration bundle registers a special servlet
"/servlet_context_finder" and also my servlet.

Later the rwt-osgi integration bundle unregisters the servlet
"/servlet_context_finder", which cause to stop the the ServletModel. A call
to my application results then in a NPE:

2011-12-19 11:51:05,757 | DEBUG | 6076-49 - /reach | log
           | .eclipse.jetty.util.log.Slf4jLog   70 | 53 -
org.eclipse.jetty.util - 7.4.5.v20110725 | REQUEST /reach on
org.eclipse.jetty.server.nio.SelectChannelConnector$SelectChannelHttpConnection@16b01f
@127.0.0.1:8080<->127.0.0.1:52046
2011-12-19 11:51:05,757 | DEBUG | 6076-49 - /reach | ServerModel
           | eb.service.spi.model.ServerModel  269 | 68 -
org.ops4j.pax.web.pax-web-spi - 1.0.7 | Matching [/reach]...
2011-12-19 11:51:05,757 | DEBUG | 6076-49 - /reach | ServerModel
           | eb.service.spi.model.ServerModel  293 | 68 -
org.ops4j.pax.web.pax-web-spi - 1.0.7 | Path [/reach] matched to
{pattern=/reach/.*,model=ServletModel{id=org.ops4j.pax.web.service.spi.model.ServletModel-32,name=org.ops4j.pax.web.service.spi.model.ServletModel-32,urlPatterns=[/reach/*],alias=/reach,servlet=org.eclipse.rap.rwt.osgi.internal.CutOffContextPathWrapper@152cb9a
,initParams={},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-30,name=,httpContext=org.eclipse.rap.rwt.osgi.internal.HttpContextWrapper@fe4ac9
,contextParams={}}}}
2011-12-19 11:51:05,757 | WARN  | 6076-49 - /reach | log
           | .eclipse.jetty.util.log.Slf4jLog   50 | 53 -
org.eclipse.jetty.util - 7.4.5.v20110725 | /reach
java.lang.NullPointerException
at
org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:72)[70:org.ops4j.pax.web.pax-web-jetty:1.0.7]
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.Server.handle(Server.java:342)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1048)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601)[55:org.eclipse.jetty.http:7.4.5.v20110725]
at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)[55:org.eclipse.jetty.http:7.4.5.v20110725]
at
org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)[54:org.eclipse.jetty.io:7
.4.5.v20110725]
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)[54:org.eclipse.jetty.io:7
.4.5.v20110725]
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)[53:org.eclipse.jetty.util:7.4.5.v20110725]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_24]

I attached the log file. Sorry, if this is not the right mailing list.

Best Regards,

Peter Kilian

[1] http://www.eclipse.org/rap/
[2] http://www.codeaffine.com/2011/08/26/raprwt-osgi-integration/

Re: NPE in Pax Web

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Thanks for the update Achim,

I will make a try, but now, I remember that we did something around that :)

Regards
JB

On 12/19/2011 02:06 PM, Achim Nierbeck wrote:
> Hi Peter, JB
>
> this should be fixe with the lastest 1.1.2 and 2.0 version of pax-web
> (still snapshot)
> might also be fixed with 1.0.8 (didn't check this yet :) ) which is
> included in the next Karaf release 2.2.5
>
> regards, Achim
>
> 2011/12/19 Peter Kilian <pit.kilian@googlemail.com
> <ma...@googlemail.com>>
>
>     Hi Jean-Baptiste,
>
>     thank you for the fast response.
>
>     Best Regards
>
>     Peter
>
>
>     2011/12/19 Jean-Baptiste Onofré <jb@nanthrax.net
>     <ma...@nanthrax.net>>
>
>         Hi Peter,
>
>         thanks for the report. I will raise a Jira (at Karaf or Pax Web)
>         and work on the issue.
>
>         We are going to take a look but it will be at least for Karaf
>         2.2.6 as 2.2.5 is quite ready for a vote.
>
>         Regards
>         JB
>
>
>         On 12/19/2011 12:54 PM, Peter Kilian wrote:
>
>             Hi,
>
>             i have a problem with Karaf 2.2.4 and Eclipse RAP. I develop
>             a web
>             application with Eclipse RAP 1.5 M4 [1], more precisely i
>             use the RWT
>             widget toolkit and the RWT-OSGi [2] integration bundle to
>             create a OSGi
>             based application.
>
>             Starting my application on Karaf 2.2.4, i see in the log
>             file that the
>             rwt-osgi integration bundle registers a special servlet
>             "/servlet_context_finder" and also my servlet.
>
>             Later the rwt-osgi integration bundle unregisters the servlet
>             "/servlet_context_finder", which cause to stop the the
>             ServletModel. A
>             call to my application results then in a NPE:
>
>             2011-12-19 11:51:05,757 | DEBUG | 6076-49 - /reach | log
>                           | .eclipse.jetty.util.log.__Slf4jLog   70 | 53 -
>             org.eclipse.jetty.util - 7.4.5.v20110725 | REQUEST /reach on
>             org.eclipse.jetty.server.nio.__SelectChannelConnector$__SelectChannelHttpConnection@__16b01f@127.0.0.1:8080
>             <http://127.0.0.1:8080>
>             <http://127.0.0.1:8080><->127.__0.0.1:52046
>             <http://127.0.0.1:52046> <http://127.0.0.1:52046>
>
>             2011-12-19 11:51:05,757 | DEBUG | 6076-49 - /reach | ServerModel
>                           | eb.service.spi.model.__ServerModel  269 | 68 -
>             org.ops4j.pax.web.pax-web-spi - 1.0.7 | Matching [/reach]...
>             2011-12-19 11:51:05,757 | DEBUG | 6076-49 - /reach | ServerModel
>                           | eb.service.spi.model.__ServerModel  293 | 68 -
>             org.ops4j.pax.web.pax-web-spi - 1.0.7 | Path [/reach] matched to
>             {pattern=/reach/.*,model=__ServletModel{id=org.ops4j.pax.__web.service.spi.model.__ServletModel-32,name=org.__ops4j.pax.web.service.spi.__model.ServletModel-32,__urlPatterns=[/reach/*],alias=/__reach,servlet=org.eclipse.rap.__rwt.osgi.internal.__CutOffContextPathWrapper@__152cb9a,initParams={},context=__ContextModel{id=org.ops4j.pax.__web.service.spi.model.__ContextModel-30,name=,__httpContext=org.eclipse.rap.__rwt.osgi.internal.__HttpContextWrapper@fe4ac9,__contextParams={}}}}
>             2011-12-19 11:51:05,757 | WARN  | 6076-49 - /reach | log
>                           | .eclipse.jetty.util.log.__Slf4jLog   50 | 53 -
>             org.eclipse.jetty.util - 7.4.5.v20110725 | /reach
>             java.lang.NullPointerException
>             at
>             org.ops4j.pax.web.service.__jetty.internal.__JettyServerHandlerCollection.__handle(__JettyServerHandlerCollection.__java:72)[70:org.ops4j.pax.web.__pax-web-jetty:1.0.7]
>             at
>             org.eclipse.jetty.server.__handler.HandlerWrapper.handle(__HandlerWrapper.java:110)[59:__org.eclipse.jetty.server:7.4.__5.v20110725]
>             at
>             org.eclipse.jetty.server.__Server.handle(Server.java:342)__[59:org.eclipse.jetty.server:__7.4.5.v20110725]
>             at
>             org.eclipse.jetty.server.__HttpConnection.handleRequest(__HttpConnection.java:589)[59:__org.eclipse.jetty.server:7.4.__5.v20110725]
>             at
>             org.eclipse.jetty.server.__HttpConnection$RequestHandler.__headerComplete(HttpConnection.__java:1048)[59:org.eclipse.__jetty.server:7.4.5.v20110725]
>             at
>             org.eclipse.jetty.http.__HttpParser.parseNext(__HttpParser.java:601)[55:org.__eclipse.jetty.http:7.4.5.__v20110725]
>             at
>             org.eclipse.jetty.http.__HttpParser.parseAvailable(__HttpParser.java:214)[55:org.__eclipse.jetty.http:7.4.5.__v20110725]
>             at
>             org.eclipse.jetty.server.__HttpConnection.handle(__HttpConnection.java:411)[59:__org.eclipse.jetty.server:7.4.__5.v20110725]
>             at
>             org.eclipse.jetty.io.nio.__SelectChannelEndPoint.handle(__SelectChannelEndPoint.java:__535)[54:org.eclipse.jetty.io:7
>             <http://org.eclipse.jetty.io:7>__.4.5.v20110725]
>             at
>             org.eclipse.jetty.io.nio.__SelectChannelEndPoint$1.run(__SelectChannelEndPoint.java:40)__[54:org.eclipse.jetty.io:7.4.__5.v20110725]
>             at
>             org.eclipse.jetty.util.thread.__QueuedThreadPool$3.run(__QueuedThreadPool.java:529)[53:__org.eclipse.jetty.util:7.4.5.__v20110725]
>             at java.lang.Thread.run(Thread.__java:662)[:1.6.0_24]
>
>             I attached the log file. Sorry, if this is not the right
>             mailing list.
>
>             Best Regards,
>
>             Peter Kilian
>
>             [1] http://www.eclipse.org/rap/
>             [2]
>             http://www.codeaffine.com/__2011/08/26/raprwt-osgi-__integration/
>             <http://www.codeaffine.com/2011/08/26/raprwt-osgi-integration/>
>
>
>         --
>         Jean-Baptiste Onofré
>         jbonofre@apache.org <ma...@apache.org>
>         http://blog.nanthrax.net
>         Talend - http://www.talend.com
>
>
>
>
>
> --
>
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
> & Project Lead
> blog <http://notizblog.nierbeck.de/>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: NPE in Pax Web

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Peter, JB

this should be fixe with the lastest 1.1.2 and 2.0 version of pax-web
(still snapshot)
might also be fixed with 1.0.8 (didn't check this yet :) ) which is
included in the next Karaf release 2.2.5

regards, Achim

2011/12/19 Peter Kilian <pi...@googlemail.com>

> Hi Jean-Baptiste,
>
> thank you for the fast response.
>
> Best Regards
>
> Peter
>
>
> 2011/12/19 Jean-Baptiste Onofré <jb...@nanthrax.net>
>
>> Hi Peter,
>>
>> thanks for the report. I will raise a Jira (at Karaf or Pax Web) and work
>> on the issue.
>>
>> We are going to take a look but it will be at least for Karaf 2.2.6 as
>> 2.2.5 is quite ready for a vote.
>>
>> Regards
>> JB
>>
>>
>> On 12/19/2011 12:54 PM, Peter Kilian wrote:
>>
>>> Hi,
>>>
>>> i have a problem with Karaf 2.2.4 and Eclipse RAP. I develop a web
>>> application with Eclipse RAP 1.5 M4 [1], more precisely i use the RWT
>>> widget toolkit and the RWT-OSGi [2] integration bundle to create a OSGi
>>> based application.
>>>
>>> Starting my application on Karaf 2.2.4, i see in the log file that the
>>> rwt-osgi integration bundle registers a special servlet
>>> "/servlet_context_finder" and also my servlet.
>>>
>>> Later the rwt-osgi integration bundle unregisters the servlet
>>> "/servlet_context_finder", which cause to stop the the ServletModel. A
>>> call to my application results then in a NPE:
>>>
>>> 2011-12-19 11:51:05,757 | DEBUG | 6076-49 - /reach | log
>>>              | .eclipse.jetty.util.log.**Slf4jLog   70 | 53 -
>>> org.eclipse.jetty.util - 7.4.5.v20110725 | REQUEST /reach on
>>> org.eclipse.jetty.server.nio.**SelectChannelConnector$**
>>> SelectChannelHttpConnection@**16b01f@127.0.0.1:8080
>>> <http://127.0.0.1:8080><->127.**0.0.1:52046 <http://127.0.0.1:52046> <
>>> http://127.0.0.1:52046>
>>>
>>> 2011-12-19 11:51:05,757 | DEBUG | 6076-49 - /reach | ServerModel
>>>              | eb.service.spi.model.**ServerModel  269 | 68 -
>>> org.ops4j.pax.web.pax-web-spi - 1.0.7 | Matching [/reach]...
>>> 2011-12-19 11:51:05,757 | DEBUG | 6076-49 - /reach | ServerModel
>>>              | eb.service.spi.model.**ServerModel  293 | 68 -
>>> org.ops4j.pax.web.pax-web-spi - 1.0.7 | Path [/reach] matched to
>>> {pattern=/reach/.*,model=**ServletModel{id=org.ops4j.pax.**
>>> web.service.spi.model.**ServletModel-32,name=org.**
>>> ops4j.pax.web.service.spi.**model.ServletModel-32,**
>>> urlPatterns=[/reach/*],alias=/**reach,servlet=org.eclipse.rap.**
>>> rwt.osgi.internal.**CutOffContextPathWrapper@**
>>> 152cb9a,initParams={},context=**ContextModel{id=org.ops4j.pax.**
>>> web.service.spi.model.**ContextModel-30,name=,**
>>> httpContext=org.eclipse.rap.**rwt.osgi.internal.**
>>> HttpContextWrapper@fe4ac9,**contextParams={}}}}
>>> 2011-12-19 11:51:05,757 | WARN  | 6076-49 - /reach | log
>>>              | .eclipse.jetty.util.log.**Slf4jLog   50 | 53 -
>>> org.eclipse.jetty.util - 7.4.5.v20110725 | /reach
>>> java.lang.NullPointerException
>>> at
>>> org.ops4j.pax.web.service.**jetty.internal.**
>>> JettyServerHandlerCollection.**handle(**JettyServerHandlerCollection.**
>>> java:72)[70:org.ops4j.pax.web.**pax-web-jetty:1.0.7]
>>> at
>>> org.eclipse.jetty.server.**handler.HandlerWrapper.handle(**
>>> HandlerWrapper.java:110)[59:**org.eclipse.jetty.server:7.4.**
>>> 5.v20110725]
>>> at
>>> org.eclipse.jetty.server.**Server.handle(Server.java:342)**
>>> [59:org.eclipse.jetty.server:**7.4.5.v20110725]
>>> at
>>> org.eclipse.jetty.server.**HttpConnection.handleRequest(**
>>> HttpConnection.java:589)[59:**org.eclipse.jetty.server:7.4.**
>>> 5.v20110725]
>>> at
>>> org.eclipse.jetty.server.**HttpConnection$RequestHandler.**
>>> headerComplete(HttpConnection.**java:1048)[59:org.eclipse.**
>>> jetty.server:7.4.5.v20110725]
>>> at
>>> org.eclipse.jetty.http.**HttpParser.parseNext(**
>>> HttpParser.java:601)[55:org.**eclipse.jetty.http:7.4.5.**v20110725]
>>> at
>>> org.eclipse.jetty.http.**HttpParser.parseAvailable(**
>>> HttpParser.java:214)[55:org.**eclipse.jetty.http:7.4.5.**v20110725]
>>> at
>>> org.eclipse.jetty.server.**HttpConnection.handle(**
>>> HttpConnection.java:411)[59:**org.eclipse.jetty.server:7.4.**
>>> 5.v20110725]
>>> at
>>> org.eclipse.jetty.io.nio.**SelectChannelEndPoint.handle(**
>>> SelectChannelEndPoint.java:**535)[54:org.eclipse.jetty.io:7**
>>> .4.5.v20110725]
>>> at
>>> org.eclipse.jetty.io.nio.**SelectChannelEndPoint$1.run(**
>>> SelectChannelEndPoint.java:40)**[54:org.eclipse.jetty.io:7.4.**
>>> 5.v20110725]
>>> at
>>> org.eclipse.jetty.util.thread.**QueuedThreadPool$3.run(**
>>> QueuedThreadPool.java:529)[53:**org.eclipse.jetty.util:7.4.5.**
>>> v20110725]
>>> at java.lang.Thread.run(Thread.**java:662)[:1.6.0_24]
>>>
>>> I attached the log file. Sorry, if this is not the right mailing list.
>>>
>>> Best Regards,
>>>
>>> Peter Kilian
>>>
>>> [1] http://www.eclipse.org/rap/
>>> [2] http://www.codeaffine.com/**2011/08/26/raprwt-osgi-**integration/<http://www.codeaffine.com/2011/08/26/raprwt-osgi-integration/>
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>


-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>

Re: NPE in Pax Web

Posted by Peter Kilian <pi...@googlemail.com>.
Hi Jean-Baptiste,

thank you for the fast response.

Best Regards

Peter

2011/12/19 Jean-Baptiste Onofré <jb...@nanthrax.net>

> Hi Peter,
>
> thanks for the report. I will raise a Jira (at Karaf or Pax Web) and work
> on the issue.
>
> We are going to take a look but it will be at least for Karaf 2.2.6 as
> 2.2.5 is quite ready for a vote.
>
> Regards
> JB
>
>
> On 12/19/2011 12:54 PM, Peter Kilian wrote:
>
>> Hi,
>>
>> i have a problem with Karaf 2.2.4 and Eclipse RAP. I develop a web
>> application with Eclipse RAP 1.5 M4 [1], more precisely i use the RWT
>> widget toolkit and the RWT-OSGi [2] integration bundle to create a OSGi
>> based application.
>>
>> Starting my application on Karaf 2.2.4, i see in the log file that the
>> rwt-osgi integration bundle registers a special servlet
>> "/servlet_context_finder" and also my servlet.
>>
>> Later the rwt-osgi integration bundle unregisters the servlet
>> "/servlet_context_finder", which cause to stop the the ServletModel. A
>> call to my application results then in a NPE:
>>
>> 2011-12-19 11:51:05,757 | DEBUG | 6076-49 - /reach | log
>>              | .eclipse.jetty.util.log.**Slf4jLog   70 | 53 -
>> org.eclipse.jetty.util - 7.4.5.v20110725 | REQUEST /reach on
>> org.eclipse.jetty.server.nio.**SelectChannelConnector$**
>> SelectChannelHttpConnection@**16b01f@127.0.0.1:8080
>> <http://127.0.0.1:8080><->127.**0.0.1:52046 <http://127.0.0.1:52046> <
>> http://127.0.0.1:52046>
>>
>> 2011-12-19 11:51:05,757 | DEBUG | 6076-49 - /reach | ServerModel
>>              | eb.service.spi.model.**ServerModel  269 | 68 -
>> org.ops4j.pax.web.pax-web-spi - 1.0.7 | Matching [/reach]...
>> 2011-12-19 11:51:05,757 | DEBUG | 6076-49 - /reach | ServerModel
>>              | eb.service.spi.model.**ServerModel  293 | 68 -
>> org.ops4j.pax.web.pax-web-spi - 1.0.7 | Path [/reach] matched to
>> {pattern=/reach/.*,model=**ServletModel{id=org.ops4j.pax.**
>> web.service.spi.model.**ServletModel-32,name=org.**
>> ops4j.pax.web.service.spi.**model.ServletModel-32,**
>> urlPatterns=[/reach/*],alias=/**reach,servlet=org.eclipse.rap.**
>> rwt.osgi.internal.**CutOffContextPathWrapper@**
>> 152cb9a,initParams={},context=**ContextModel{id=org.ops4j.pax.**
>> web.service.spi.model.**ContextModel-30,name=,**
>> httpContext=org.eclipse.rap.**rwt.osgi.internal.**
>> HttpContextWrapper@fe4ac9,**contextParams={}}}}
>> 2011-12-19 11:51:05,757 | WARN  | 6076-49 - /reach | log
>>              | .eclipse.jetty.util.log.**Slf4jLog   50 | 53 -
>> org.eclipse.jetty.util - 7.4.5.v20110725 | /reach
>> java.lang.NullPointerException
>> at
>> org.ops4j.pax.web.service.**jetty.internal.**
>> JettyServerHandlerCollection.**handle(**JettyServerHandlerCollection.**
>> java:72)[70:org.ops4j.pax.web.**pax-web-jetty:1.0.7]
>> at
>> org.eclipse.jetty.server.**handler.HandlerWrapper.handle(**
>> HandlerWrapper.java:110)[59:**org.eclipse.jetty.server:7.4.**5.v20110725]
>> at
>> org.eclipse.jetty.server.**Server.handle(Server.java:342)**
>> [59:org.eclipse.jetty.server:**7.4.5.v20110725]
>> at
>> org.eclipse.jetty.server.**HttpConnection.handleRequest(**
>> HttpConnection.java:589)[59:**org.eclipse.jetty.server:7.4.**5.v20110725]
>> at
>> org.eclipse.jetty.server.**HttpConnection$RequestHandler.**
>> headerComplete(HttpConnection.**java:1048)[59:org.eclipse.**
>> jetty.server:7.4.5.v20110725]
>> at
>> org.eclipse.jetty.http.**HttpParser.parseNext(**
>> HttpParser.java:601)[55:org.**eclipse.jetty.http:7.4.5.**v20110725]
>> at
>> org.eclipse.jetty.http.**HttpParser.parseAvailable(**
>> HttpParser.java:214)[55:org.**eclipse.jetty.http:7.4.5.**v20110725]
>> at
>> org.eclipse.jetty.server.**HttpConnection.handle(**
>> HttpConnection.java:411)[59:**org.eclipse.jetty.server:7.4.**5.v20110725]
>> at
>> org.eclipse.jetty.io.nio.**SelectChannelEndPoint.handle(**
>> SelectChannelEndPoint.java:**535)[54:org.eclipse.jetty.io:7**
>> .4.5.v20110725]
>> at
>> org.eclipse.jetty.io.nio.**SelectChannelEndPoint$1.run(**
>> SelectChannelEndPoint.java:40)**[54:org.eclipse.jetty.io:7.4.**
>> 5.v20110725]
>> at
>> org.eclipse.jetty.util.thread.**QueuedThreadPool$3.run(**
>> QueuedThreadPool.java:529)[53:**org.eclipse.jetty.util:7.4.5.**v20110725]
>> at java.lang.Thread.run(Thread.**java:662)[:1.6.0_24]
>>
>> I attached the log file. Sorry, if this is not the right mailing list.
>>
>> Best Regards,
>>
>> Peter Kilian
>>
>> [1] http://www.eclipse.org/rap/
>> [2] http://www.codeaffine.com/**2011/08/26/raprwt-osgi-**integration/<http://www.codeaffine.com/2011/08/26/raprwt-osgi-integration/>
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: NPE in Pax Web

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Peter,

thanks for the report. I will raise a Jira (at Karaf or Pax Web) and 
work on the issue.

We are going to take a look but it will be at least for Karaf 2.2.6 as 
2.2.5 is quite ready for a vote.

Regards
JB

On 12/19/2011 12:54 PM, Peter Kilian wrote:
> Hi,
>
> i have a problem with Karaf 2.2.4 and Eclipse RAP. I develop a web
> application with Eclipse RAP 1.5 M4 [1], more precisely i use the RWT
> widget toolkit and the RWT-OSGi [2] integration bundle to create a OSGi
> based application.
>
> Starting my application on Karaf 2.2.4, i see in the log file that the
> rwt-osgi integration bundle registers a special servlet
> "/servlet_context_finder" and also my servlet.
>
> Later the rwt-osgi integration bundle unregisters the servlet
> "/servlet_context_finder", which cause to stop the the ServletModel. A
> call to my application results then in a NPE:
>
> 2011-12-19 11:51:05,757 | DEBUG | 6076-49 - /reach | log
>               | .eclipse.jetty.util.log.Slf4jLog   70 | 53 -
> org.eclipse.jetty.util - 7.4.5.v20110725 | REQUEST /reach on
> org.eclipse.jetty.server.nio.SelectChannelConnector$SelectChannelHttpConnection@16b01f@127.0.0.1:8080
> <http://127.0.0.1:8080><->127.0.0.1:52046 <http://127.0.0.1:52046>
> 2011-12-19 11:51:05,757 | DEBUG | 6076-49 - /reach | ServerModel
>               | eb.service.spi.model.ServerModel  269 | 68 -
> org.ops4j.pax.web.pax-web-spi - 1.0.7 | Matching [/reach]...
> 2011-12-19 11:51:05,757 | DEBUG | 6076-49 - /reach | ServerModel
>               | eb.service.spi.model.ServerModel  293 | 68 -
> org.ops4j.pax.web.pax-web-spi - 1.0.7 | Path [/reach] matched to
> {pattern=/reach/.*,model=ServletModel{id=org.ops4j.pax.web.service.spi.model.ServletModel-32,name=org.ops4j.pax.web.service.spi.model.ServletModel-32,urlPatterns=[/reach/*],alias=/reach,servlet=org.eclipse.rap.rwt.osgi.internal.CutOffContextPathWrapper@152cb9a,initParams={},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-30,name=,httpContext=org.eclipse.rap.rwt.osgi.internal.HttpContextWrapper@fe4ac9,contextParams={}}}}
> 2011-12-19 11:51:05,757 | WARN  | 6076-49 - /reach | log
>               | .eclipse.jetty.util.log.Slf4jLog   50 | 53 -
> org.eclipse.jetty.util - 7.4.5.v20110725 | /reach
> java.lang.NullPointerException
> at
> org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:72)[70:org.ops4j.pax.web.pax-web-jetty:1.0.7]
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[59:org.eclipse.jetty.server:7.4.5.v20110725]
> at
> org.eclipse.jetty.server.Server.handle(Server.java:342)[59:org.eclipse.jetty.server:7.4.5.v20110725]
> at
> org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)[59:org.eclipse.jetty.server:7.4.5.v20110725]
> at
> org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1048)[59:org.eclipse.jetty.server:7.4.5.v20110725]
> at
> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601)[55:org.eclipse.jetty.http:7.4.5.v20110725]
> at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)[55:org.eclipse.jetty.http:7.4.5.v20110725]
> at
> org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)[59:org.eclipse.jetty.server:7.4.5.v20110725]
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)[54:org.eclipse.jetty.io:7.4.5.v20110725]
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)[54:org.eclipse.jetty.io:7.4.5.v20110725]
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)[53:org.eclipse.jetty.util:7.4.5.v20110725]
> at java.lang.Thread.run(Thread.java:662)[:1.6.0_24]
>
> I attached the log file. Sorry, if this is not the right mailing list.
>
> Best Regards,
>
> Peter Kilian
>
> [1] http://www.eclipse.org/rap/
> [2] http://www.codeaffine.com/2011/08/26/raprwt-osgi-integration/

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com