You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jerome Moliere <jm...@perform.fr> on 2000/04/26 14:17:44 UTC

NullPointerException in service() method

Hi all,
migrating from Tomcat 3.1M1 to 3.1 final release seems to be a nightmare
for
me...
I've got several problems with servlets wrappers,
here 's the stacktrace with a few system.out added by myself..

before invoking service org.apache.tomcat.core.ContextManager@1674704a
SimpleMapper::requestMap() Container is null...using default handler
setting
wra
pper = null
org.apache.tomcat.core.RequestImpl :: setWrapper() setting handler =
null
org.apache.tomcat.core.RequestImpl ::getWrapper() hadnler is null
org.apache.tomcat.core.ContextManager::service() no wrapper for this
request
org.apache.tomcat.core.RequestImpl ::getWrapper() hadnler is null
java.lang.NullPointerException:
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:564
)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
n(HttpConnectionHandler.java:161)
        at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.j
ava:338)

In fact it seems that there's no wrapper for my servlet ==>
nullpointerexception
in service() from the ContextManager class...


Any clue welcome...

PS:
I'm using the same web.xml file that in the previous release
OS = Windows NT4 SP5

--
Jerome Moliere - ingénieur developpement
mailto : jmoliere@perform.fr
"I don't fear computers - I fear lack of them " Isaac Assimov



Re: NullPointerException in service() method

Posted by Roy Truelove <ro...@binghamton.edu>.
I was getting a lot of nullpointers when my .xml file was courrupt.  It had
a few hyphens in there that didn't belong, and when I booted up Tomcat I got
a slew of them.  This is probably something that needs to be changed in the
XML parser, so that it throws a more understandable exception is the web.xml
file is garbled.

-Roy

----- Original Message -----
From: Jerome Moliere <jm...@perform.fr>
To: <to...@jakarta.apache.org>
Sent: Wednesday, April 26, 2000 11:52 AM
Subject: Re: NullPointerException in service() method


> Thanks costin for your help,
> if you prefer we could use our private emails directly without 'polluting'
the mailing
> list...
> I can send you my web.xml file .
>
>
> Costin Manolache wrote:
>
> > Ok, in this case I have to ask you for some of the mappings
> > inside web.xml :-)
> >
> > I can't reproduce it without that.
> >
> > BTW, it would be really helpfull to test your web.xml against
> > the latest mapper, it seems you have a very good test  case:-)
> >
>
> oops, I don't know nothing about this...What's that?
> I can do it with pleasure if you tell more about it...
>
> > Costin
> >
> > Jerome Moliere wrote:
> >
> > > Costin Manolache wrote:
> > >
> > > > Do you have any mappings in your web.xml ?
> > > >
> > >
> > > oh yes, the file is over 30kb...
> > >
> > > >
> > > > Also, the URL /janet/help/.... will map to
> > > > a file d:\janet\public_html\janet\help\....
> > > >
> > >
> > > i hope it...
> > >
> > > >
> > > > You can also try to use "/" instead of "\" in the pathname.
> > > >
> > >
> > > i'll try it...
> > >
> > > >
> > > > Why can't you use /servlets ?
> > > >
> > >
> > > because my file organisation is already existent, my servlet names &
aliases
> > > too...
> > > I can't change it without spending days & days...
> > >
> > > >
> > > > Costin
> > > >
> > > > Jerome Moliere wrote:
> > > >
> > > > > oops, excuse me I forgot to add the mapping :
> > > > > <Context path="/" docBase="d:\janet\public_html" >
> > > > >         </Context>
> > > > >  that was already present in my previous server.xml file
(Tomcat3.1M1)
> > > > > & worked without problem,
> > > > > problem occur with an URL = /janet/help/sales/Corporatehome.htm
> > > > > which is an existing HTML page.
> > > > > I'm obliged to use such mapping because there's no naming
convention for my
> > > > > servlets,
> > > > > I can't use a /servlets(or any other name) repository
> > > > > I tried replacing "/" with "" but without success.
> > > > > thanks.
> > > > > Jerome
> > > > > Costin Manolache wrote:
> > > > >
> > > > > > >
> > > > > > > in fact I'm using the default server.xml file with just a
mapping for
> > > > > > > getting all files from a special dir....
> > > > > > > it seems that just one URL fails...
> > > > > >
> > > > > > Can you share with us what is the special mapping and the
failing URL :-)?
> > > > > >
> > > > > > I started a rewrite of the mapper,  I'm sure next release will
be much
> > > > > > better,
> > > > > > but 3.1 should work too.
> > > > > >
> > > > > > Are you using extenison mappings?
> > > > > >
> > > > > > Costin
> > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
tomcat-dev-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail:
tomcat-dev-help@jakarta.apache.org
> > > > >
> > > > > --
> > > > > Jerome Moliere - ingénieur developpement
> > > > > mailto : jmoliere@perform.fr
> > > > > "I don't fear computers - I fear lack of them " Isaac Assimov
> > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
tomcat-dev-help@jakarta.apache.org
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> > >
> > > thanks
> > > --
> > > Jerome Moliere - ingénieur developpement
> > > mailto : jmoliere@perform.fr
> > > "I don't fear computers - I fear lack of them " Isaac Assimov
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
> --
> Jerome Moliere - ingénieur developpement
> mailto : jmoliere@perform.fr
> "I don't fear computers - I fear lack of them " Isaac Assimov
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>


Re: NullPointerException in service() method

Posted by Jerome Moliere <jm...@perform.fr>.
Thanks costin for your help,
if you prefer we could use our private emails directly without 'polluting' the mailing
list...
I can send you my web.xml file .


Costin Manolache wrote:

> Ok, in this case I have to ask you for some of the mappings
> inside web.xml :-)
>
> I can't reproduce it without that.
>
> BTW, it would be really helpfull to test your web.xml against
> the latest mapper, it seems you have a very good test  case:-)
>

oops, I don't know nothing about this...What's that?
I can do it with pleasure if you tell more about it...

> Costin
>
> Jerome Moliere wrote:
>
> > Costin Manolache wrote:
> >
> > > Do you have any mappings in your web.xml ?
> > >
> >
> > oh yes, the file is over 30kb...
> >
> > >
> > > Also, the URL /janet/help/.... will map to
> > > a file d:\janet\public_html\janet\help\....
> > >
> >
> > i hope it...
> >
> > >
> > > You can also try to use "/" instead of "\" in the pathname.
> > >
> >
> > i'll try it...
> >
> > >
> > > Why can't you use /servlets ?
> > >
> >
> > because my file organisation is already existent, my servlet names & aliases
> > too...
> > I can't change it without spending days & days...
> >
> > >
> > > Costin
> > >
> > > Jerome Moliere wrote:
> > >
> > > > oops, excuse me I forgot to add the mapping :
> > > > <Context path="/" docBase="d:\janet\public_html" >
> > > >         </Context>
> > > >  that was already present in my previous server.xml file (Tomcat3.1M1)
> > > > & worked without problem,
> > > > problem occur with an URL = /janet/help/sales/Corporatehome.htm
> > > > which is an existing HTML page.
> > > > I'm obliged to use such mapping because there's no naming convention for my
> > > > servlets,
> > > > I can't use a /servlets(or any other name) repository
> > > > I tried replacing "/" with "" but without success.
> > > > thanks.
> > > > Jerome
> > > > Costin Manolache wrote:
> > > >
> > > > > >
> > > > > > in fact I'm using the default server.xml file with just a mapping for
> > > > > > getting all files from a special dir....
> > > > > > it seems that just one URL fails...
> > > > >
> > > > > Can you share with us what is the special mapping and the failing URL :-)?
> > > > >
> > > > > I started a rewrite of the mapper,  I'm sure next release will be much
> > > > > better,
> > > > > but 3.1 should work too.
> > > > >
> > > > > Are you using extenison mappings?
> > > > >
> > > > > Costin
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> > > >
> > > > --
> > > > Jerome Moliere - ingénieur developpement
> > > > mailto : jmoliere@perform.fr
> > > > "I don't fear computers - I fear lack of them " Isaac Assimov
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> >
> > thanks
> > --
> > Jerome Moliere - ingénieur developpement
> > mailto : jmoliere@perform.fr
> > "I don't fear computers - I fear lack of them " Isaac Assimov
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

--
Jerome Moliere - ingénieur developpement
mailto : jmoliere@perform.fr
"I don't fear computers - I fear lack of them " Isaac Assimov



Re: NullPointerException in service() method

Posted by Costin Manolache <co...@costin.dnt.ro>.
Ok, in this case I have to ask you for some of the mappings
inside web.xml :-)

I can't reproduce it without that.

BTW, it would be really helpfull to test your web.xml against
the latest mapper, it seems you have a very good test  case:-)

Costin

Jerome Moliere wrote:

> Costin Manolache wrote:
>
> > Do you have any mappings in your web.xml ?
> >
>
> oh yes, the file is over 30kb...
>
> >
> > Also, the URL /janet/help/.... will map to
> > a file d:\janet\public_html\janet\help\....
> >
>
> i hope it...
>
> >
> > You can also try to use "/" instead of "\" in the pathname.
> >
>
> i'll try it...
>
> >
> > Why can't you use /servlets ?
> >
>
> because my file organisation is already existent, my servlet names & aliases
> too...
> I can't change it without spending days & days...
>
> >
> > Costin
> >
> > Jerome Moliere wrote:
> >
> > > oops, excuse me I forgot to add the mapping :
> > > <Context path="/" docBase="d:\janet\public_html" >
> > >         </Context>
> > >  that was already present in my previous server.xml file (Tomcat3.1M1)
> > > & worked without problem,
> > > problem occur with an URL = /janet/help/sales/Corporatehome.htm
> > > which is an existing HTML page.
> > > I'm obliged to use such mapping because there's no naming convention for my
> > > servlets,
> > > I can't use a /servlets(or any other name) repository
> > > I tried replacing "/" with "" but without success.
> > > thanks.
> > > Jerome
> > > Costin Manolache wrote:
> > >
> > > > >
> > > > > in fact I'm using the default server.xml file with just a mapping for
> > > > > getting all files from a special dir....
> > > > > it seems that just one URL fails...
> > > >
> > > > Can you share with us what is the special mapping and the failing URL :-)?
> > > >
> > > > I started a rewrite of the mapper,  I'm sure next release will be much
> > > > better,
> > > > but 3.1 should work too.
> > > >
> > > > Are you using extenison mappings?
> > > >
> > > > Costin
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> > >
> > > --
> > > Jerome Moliere - ingénieur developpement
> > > mailto : jmoliere@perform.fr
> > > "I don't fear computers - I fear lack of them " Isaac Assimov
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
> thanks
> --
> Jerome Moliere - ingénieur developpement
> mailto : jmoliere@perform.fr
> "I don't fear computers - I fear lack of them " Isaac Assimov
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: NullPointerException in service() method

Posted by Jerome Moliere <jm...@perform.fr>.

Costin Manolache wrote:

> Do you have any mappings in your web.xml ?
>

oh yes, the file is over 30kb...

>
> Also, the URL /janet/help/.... will map to
> a file d:\janet\public_html\janet\help\....
>

i hope it...

>
> You can also try to use "/" instead of "\" in the pathname.
>

i'll try it...

>
> Why can't you use /servlets ?
>

because my file organisation is already existent, my servlet names & aliases
too...
I can't change it without spending days & days...

>
> Costin
>
> Jerome Moliere wrote:
>
> > oops, excuse me I forgot to add the mapping :
> > <Context path="/" docBase="d:\janet\public_html" >
> >         </Context>
> >  that was already present in my previous server.xml file (Tomcat3.1M1)
> > & worked without problem,
> > problem occur with an URL = /janet/help/sales/Corporatehome.htm
> > which is an existing HTML page.
> > I'm obliged to use such mapping because there's no naming convention for my
> > servlets,
> > I can't use a /servlets(or any other name) repository
> > I tried replacing "/" with "" but without success.
> > thanks.
> > Jerome
> > Costin Manolache wrote:
> >
> > > >
> > > > in fact I'm using the default server.xml file with just a mapping for
> > > > getting all files from a special dir....
> > > > it seems that just one URL fails...
> > >
> > > Can you share with us what is the special mapping and the failing URL :-)?
> > >
> > > I started a rewrite of the mapper,  I'm sure next release will be much
> > > better,
> > > but 3.1 should work too.
> > >
> > > Are you using extenison mappings?
> > >
> > > Costin
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> >
> > --
> > Jerome Moliere - ingénieur developpement
> > mailto : jmoliere@perform.fr
> > "I don't fear computers - I fear lack of them " Isaac Assimov
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

thanks
--
Jerome Moliere - ingénieur developpement
mailto : jmoliere@perform.fr
"I don't fear computers - I fear lack of them " Isaac Assimov



Re: NullPointerException in service() method

Posted by Costin Manolache <co...@costin.dnt.ro>.
Do you have any mappings in your web.xml ?

Also, the URL /janet/help/.... will map to
a file d:\janet\public_html\janet\help\....

You can also try to use "/" instead of "\" in the pathname.

Why can't you use /servlets ?

Costin

Jerome Moliere wrote:

> oops, excuse me I forgot to add the mapping :
> <Context path="/" docBase="d:\janet\public_html" >
>         </Context>
>  that was already present in my previous server.xml file (Tomcat3.1M1)
> & worked without problem,
> problem occur with an URL = /janet/help/sales/Corporatehome.htm
> which is an existing HTML page.
> I'm obliged to use such mapping because there's no naming convention for my
> servlets,
> I can't use a /servlets(or any other name) repository
> I tried replacing "/" with "" but without success.
> thanks.
> Jerome
> Costin Manolache wrote:
>
> > >
> > > in fact I'm using the default server.xml file with just a mapping for
> > > getting all files from a special dir....
> > > it seems that just one URL fails...
> >
> > Can you share with us what is the special mapping and the failing URL :-)?
> >
> > I started a rewrite of the mapper,  I'm sure next release will be much
> > better,
> > but 3.1 should work too.
> >
> > Are you using extenison mappings?
> >
> > Costin
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
> --
> Jerome Moliere - ingénieur developpement
> mailto : jmoliere@perform.fr
> "I don't fear computers - I fear lack of them " Isaac Assimov
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: NullPointerException in service() method

Posted by Jerome Moliere <jm...@perform.fr>.
oops, excuse me I forgot to add the mapping :
<Context path="/" docBase="d:\janet\public_html" >
        </Context>
 that was already present in my previous server.xml file (Tomcat3.1M1)
& worked without problem,
problem occur with an URL = /janet/help/sales/Corporatehome.htm
which is an existing HTML page.
I'm obliged to use such mapping because there's no naming convention for my
servlets,
I can't use a /servlets(or any other name) repository
I tried replacing "/" with "" but without success.
thanks.
Jerome
Costin Manolache wrote:

> >
> > in fact I'm using the default server.xml file with just a mapping for
> > getting all files from a special dir....
> > it seems that just one URL fails...
>
> Can you share with us what is the special mapping and the failing URL :-)?
>
> I started a rewrite of the mapper,  I'm sure next release will be much
> better,
> but 3.1 should work too.
>
> Are you using extenison mappings?
>
> Costin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

--
Jerome Moliere - ingénieur developpement
mailto : jmoliere@perform.fr
"I don't fear computers - I fear lack of them " Isaac Assimov



Re: NullPointerException in service() method

Posted by Costin Manolache <co...@costin.dnt.ro>.
>
> in fact I'm using the default server.xml file with just a mapping for
> getting all files from a special dir....
> it seems that just one URL fails...

Can you share with us what is the special mapping and the failing URL :-)?

I started a rewrite of the mapper,  I'm sure next release will be much
better,
but 3.1 should work too.

Are you using extenison mappings?

Costin



Re: NullPointerException in service() method

Posted by Jerome Moliere <jm...@perform.fr>.

Jun Inamori wrote:

> Hi Jerome,
>
> > org.apache.tomcat.core.RequestImpl :: setWrapper() setting handler =
> > null
> > org.apache.tomcat.core.RequestImpl ::getWrapper() hadnler is null
> ---
> > org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.j
> > ava:338)
> ---
> > In fact it seems that there's no wrapper for my servlet ==>
> > nullpointerexception
> > in service() from the ContextManager class...
> ---
> > PS:
> > I'm using the same web.xml file that in the previous release
>
> I suppose that this has something to do with server.xml rather than
> web.xml.
> Checking 'Connector' element in server.xml may help you.
>
> Happy Java programming!
>
> Jun Inamori
> E-mail: j-office@osa.att.ne.jp
> URL:    http://www.oop-reserch.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

thanks for your quick answer,
in fact I'm using the default server.xml file with just a mapping for
getting all files from a special dir....
it seems that just one URL fails...
i've looked once again to this file which changed a lot since the last
version but nothing seems strange, there's no more inet address or server
name or port...
the connector class for HTTP handling seems ok :
"org.apache.tomcat.service.http.HttpConnectionHandler"
for the SimpleTCPConnector, i leaved the useless ApJConnector (useless in
stand alone mode)
thanks ...
--
Jerome Moliere - ingénieur developpement
mailto : jmoliere@perform.fr
"I don't fear computers - I fear lack of them " Isaac Assimov



Re: NullPointerException in service() method

Posted by Jun Inamori <j-...@osa.att.ne.jp>.
Hi Jerome,

> org.apache.tomcat.core.RequestImpl :: setWrapper() setting handler =
> null
> org.apache.tomcat.core.RequestImpl ::getWrapper() hadnler is null
---
> org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.j
> ava:338)
---
> In fact it seems that there's no wrapper for my servlet ==>
> nullpointerexception
> in service() from the ContextManager class...
---
> PS:
> I'm using the same web.xml file that in the previous release

I suppose that this has something to do with server.xml rather than
web.xml.
Checking 'Connector' element in server.xml may help you. 

Happy Java programming!

Jun Inamori
E-mail: j-office@osa.att.ne.jp
URL:    http://www.oop-reserch.com