You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tomislav Petrović <t....@inet.hr> on 2010/07/07 12:07:16 UTC

Re: Webapp reloading issue and intermittent 404 errors

Tomislav Petrović said on 30.6.2010 16:27:
>>> Forgot to say:
>>> Tomcat service is started with following parameters:
>>>
>>> JVM: have to check whether server or client, not sure at the moment.
>>
>> Server, one would hope. Did you find out the exact version?
>>
> 
> Yup JVM path for tomcat is ......\jdk1.6.0_18\jre\bin\server\jvm.dll, so 
> Java 6 update 18 server.

Although initial excpetion and stacktrace (related to webapp reloading, actually checking that it should or should not be reloaded) went away with reloadable="false" workaround I now have similar problem.

Please help since now machine is in (or near) production :(.

New stacktrace in catalina logs looks like (and produces 404 errors):

Jul 5, 2010 7:13:47 AM org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request processing
java.lang.StringIndexOutOfBoundsException: String index out of range: 115
	at java.lang.String.substring(String.java:1934)
	at org.apache.catalina.util.RequestUtil.normalize(RequestUtil.java:131)
	at org.apache.naming.resources.FileDirContext.normalize(FileDirContext.java:771)
	at org.apache.naming.resources.FileDirContext.file(FileDirContext.java:811)
	at org.apache.naming.resources.FileDirContext.getAttributes(FileDirContext.java:429)
	at org.apache.naming.resources.BaseDirContext.getAttributes(BaseDirContext.java:747)
	at org.apache.naming.resources.ProxyDirContext.revalidate(ProxyDirContext.java:1501)
	at org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1457)
	at org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:288)
	at org.apache.tomcat.util.http.mapper.Mapper.internalMapWrapper(Mapper.java:823)
	at org.apache.tomcat.util.http.mapper.Mapper.internalMap(Mapper.java:667)
	at org.apache.tomcat.util.http.mapper.Mapper.map(Mapper.java:557)
	at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:462)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:296)
	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
	at java.lang.Thread.run(Thread.java:619)

Everything else is same as I posted before (config file, JVM versions, etc....)
Any advice is appreciated....
--
Tomy <t....@inet.hr>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Webapp reloading issue and intermittent 404 errors

Posted by André Warnier <aw...@ice-sa.com>.
Pid wrote:
..
> 
> I wondered if it doesn't like spaces in File paths.
> 
I did not want to ask that question. Good that someone did.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Webapp reloading issue and intermittent 404 errors

Posted by Pid <pi...@pidster.com>.
On 07/07/2010 11:35, Tomislav Petrović wrote:
> Pid said on 7.7.2010 12:26:
>> On 07/07/2010 11:07, Tomislav Petrović wrote:
>>> Tomislav Petrović said on 30.6.2010 16:27:
>>>>>> Forgot to say:
>>>>>> Tomcat service is started with following parameters:
>>>>>>
>>>>>> JVM: have to check whether server or client, not sure at the moment.
>>>>>
>>>>> Server, one would hope. Did you find out the exact version?
>>>>>
>>>>
>>>> Yup JVM path for tomcat is ......\jdk1.6.0_18\jre\bin\server\jvm.dll, so
>>>> Java 6 update 18 server.
>>>
>>> Although initial excpetion and stacktrace (related to webapp reloading, actually checking that it should or should not be reloaded) went away with reloadable="false" workaround I now have similar problem.
>>>
>>> Please help since now machine is in (or near) production :(.
>>>
>>> New stacktrace in catalina logs looks like (and produces 404 errors):
>>>
>>> Jul 5, 2010 7:13:47 AM org.apache.catalina.connector.CoyoteAdapter service
>>> SEVERE: An exception or error occurred in the container during the request processing
>>> java.lang.StringIndexOutOfBoundsException: String index out of range: 115
>>> 	at java.lang.String.substring(String.java:1934)
>>> 	at org.apache.catalina.util.RequestUtil.normalize(RequestUtil.java:131)
>>> 	at org.apache.naming.resources.FileDirContext.normalize(FileDirContext.java:771)
>>> 	at org.apache.naming.resources.FileDirContext.file(FileDirContext.java:811)
>>> 	at org.apache.naming.resources.FileDirContext.getAttributes(FileDirContext.java:429)
>>> 	at org.apache.naming.resources.BaseDirContext.getAttributes(BaseDirContext.java:747)
>>> 	at org.apache.naming.resources.ProxyDirContext.revalidate(ProxyDirContext.java:1501)
>>> 	at org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1457)
>>> 	at org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:288)
>>> 	at org.apache.tomcat.util.http.mapper.Mapper.internalMapWrapper(Mapper.java:823)
>>> 	at org.apache.tomcat.util.http.mapper.Mapper.internalMap(Mapper.java:667)
>>> 	at org.apache.tomcat.util.http.mapper.Mapper.map(Mapper.java:557)
>>> 	at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:462)
>>> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:296)
>>> 	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
>>> 	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
>>> 	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
>>> 	at java.lang.Thread.run(Thread.java:619)
>>>
>>> Everything else is same as I posted before (config file, JVM versions, etc....)
>>> Any advice is appreciated....
>>
>> I think the general feeling is that it's a JVM bug - but no-one can work
>> out what it is.  I can't even work out how to get 115 characters out of
>> a normal file path.
>>
>> Can you move the installation from:
>>   D:\Program Files\Apache Software Foundation\Tomcat 6.0
>>
>> To:
>>   D:\Tomcat60
>>
>>
> 
> Don't know have to check with customer, but actual index varies in each occurrence of stack trace, sometimes it is even -1. In two days we had:
> 2x java.lang.StringIndexOutOfBoundsException: String index out of range: 131
> 1x java.lang.StringIndexOutOfBoundsException: String index out of range: 118
> 1x java.lang.StringIndexOutOfBoundsException: String index out of range: 106
> 4x java.lang.StringIndexOutOfBoundsException: String index out of range: -1 
> 3x java.lang.StringIndexOutOfBoundsException: String index out of range: 127
> 2x java.lang.StringIndexOutOfBoundsException: String index out of range: 126
> 1x java.lang.StringIndexOutOfBoundsException: String index out of range: 123
> Rest of stacktrace is identical in all occurences.

I wondered if it doesn't like spaces in File paths.


p

> In addition
> --
> Tomy <t....@inet.hr>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 



RE: Webapp reloading issue and intermittent 404 errors

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Tomislav Petrović [mailto:t.petrovic@inet.hr]
> Subject: Re: Webapp reloading issue and intermittent 404 errors
> 
> Don't know have to check with customer, but actual index varies in each
> occurrence of stack trace, sometimes it is even -1.

Here's the code of interest:

127     while (true) {
128         int index = normalized.indexOf("//");
129         if (index < 0)
130             break;
131         normalized = normalized.substring(0, index) +
132             normalized.substring(index + 1);
133     }

Given the test on lines 129-130, it is impossible to have a -1 at line 131 - unless there's a JVM bug.

You could try running with a -client option instead of -server (if it's available on your platform), or create a .hotspot_compiler file in the Tomcat current directory containing this line:

exclude org.apache.catalina.util.RequestUtil normalize

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Webapp reloading issue and intermittent 404 errors

Posted by Tomislav Petrović <t....@inet.hr>.
Caldarale, Charles R said on 8.7.2010 3:31:
>> From: Caldarale, Charles R
>> Subject: RE: Webapp reloading issue and intermittent 404 errors
>>
>> Given the test on lines 129-130, it is impossible to have a -1 at line
>> 131 - unless there's a JVM bug.
>
> 6u21 was just released tonight, so you might give that a shot and see if the problem has been addressed.
>
> Included in 6u21 are fixes for the problems described here:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6875866
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6935535
>
> Both seem to have a lot in common with the issue under discussion.
>
> There's another String-related fix in the bug list, but the details are not retrievable at the moment:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6948602
>


Just to let you know, installing 6u21 seems to solve problem completely 
(hasn't manifested after upgrade at all).

--
Tomy <t....@inet.hr>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Webapp reloading issue and intermittent 404 errors

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
> Subject: Re: Webapp reloading issue and intermittent 404 errors
> 
> Oh. It matches this case.

All three seem to.

> The issue names mention "SSE 4.2", so it supposedly happens only on
> certain families of Intel CPUs.

Right - just Nehalem chips (i7).  The OP didn't say what the hardware was; even if it's not an i7, the fixes might address the problem, since Sun often doesn't give complete descriptions of fixes.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Webapp reloading issue and intermittent 404 errors

Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/7/8 Caldarale, Charles R <Ch...@unisys.com>:
>> From: Caldarale, Charles R
>> Subject: RE: Webapp reloading issue and intermittent 404 errors
>>
>> Given the test on lines 129-130, it is impossible to have a -1 at line
>> 131 - unless there's a JVM bug.
>
> 6u21 was just released tonight, so you might give that a shot and see if the problem has been addressed.
>
> Included in 6u21 are fixes for the problems described here:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6875866
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6935535
>
> Both seem to have a lot in common with the issue under discussion.
>
> There's another String-related fix in the bug list, but the details are not retrievable at the moment:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6948602
>

Oh. It matches this case.

The issue names mention "SSE 4.2", so it supposedly happens only on
certain families of Intel CPUs.

http://en.wikipedia.org/wiki/SSE4

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Webapp reloading issue and intermittent 404 errors

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Caldarale, Charles R
> Subject: RE: Webapp reloading issue and intermittent 404 errors
> 
> Given the test on lines 129-130, it is impossible to have a -1 at line
> 131 - unless there's a JVM bug.

6u21 was just released tonight, so you might give that a shot and see if the problem has been addressed.

Included in 6u21 are fixes for the problems described here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6875866
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6935535

Both seem to have a lot in common with the issue under discussion.

There's another String-related fix in the bug list, but the details are not retrievable at the moment:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6948602

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Webapp reloading issue and intermittent 404 errors

Posted by Tomislav Petrović <t....@inet.hr>.
Pid said on 7.7.2010 12:26:
> On 07/07/2010 11:07, Tomislav Petrović wrote:
>> Tomislav Petrović said on 30.6.2010 16:27:
>>>>> Forgot to say:
>>>>> Tomcat service is started with following parameters:
>>>>>
>>>>> JVM: have to check whether server or client, not sure at the moment.
>>>>
>>>> Server, one would hope. Did you find out the exact version?
>>>>
>>>
>>> Yup JVM path for tomcat is ......\jdk1.6.0_18\jre\bin\server\jvm.dll, so
>>> Java 6 update 18 server.
>>
>> Although initial excpetion and stacktrace (related to webapp reloading, actually checking that it should or should not be reloaded) went away with reloadable="false" workaround I now have similar problem.
>>
>> Please help since now machine is in (or near) production :(.
>>
>> New stacktrace in catalina logs looks like (and produces 404 errors):
>>
>> Jul 5, 2010 7:13:47 AM org.apache.catalina.connector.CoyoteAdapter service
>> SEVERE: An exception or error occurred in the container during the request processing
>> java.lang.StringIndexOutOfBoundsException: String index out of range: 115
>> 	at java.lang.String.substring(String.java:1934)
>> 	at org.apache.catalina.util.RequestUtil.normalize(RequestUtil.java:131)
>> 	at org.apache.naming.resources.FileDirContext.normalize(FileDirContext.java:771)
>> 	at org.apache.naming.resources.FileDirContext.file(FileDirContext.java:811)
>> 	at org.apache.naming.resources.FileDirContext.getAttributes(FileDirContext.java:429)
>> 	at org.apache.naming.resources.BaseDirContext.getAttributes(BaseDirContext.java:747)
>> 	at org.apache.naming.resources.ProxyDirContext.revalidate(ProxyDirContext.java:1501)
>> 	at org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1457)
>> 	at org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:288)
>> 	at org.apache.tomcat.util.http.mapper.Mapper.internalMapWrapper(Mapper.java:823)
>> 	at org.apache.tomcat.util.http.mapper.Mapper.internalMap(Mapper.java:667)
>> 	at org.apache.tomcat.util.http.mapper.Mapper.map(Mapper.java:557)
>> 	at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:462)
>> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:296)
>> 	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
>> 	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
>> 	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
>> 	at java.lang.Thread.run(Thread.java:619)
>>
>> Everything else is same as I posted before (config file, JVM versions, etc....)
>> Any advice is appreciated....
> 
> I think the general feeling is that it's a JVM bug - but no-one can work
> out what it is.  I can't even work out how to get 115 characters out of
> a normal file path.
> 
> Can you move the installation from:
>   D:\Program Files\Apache Software Foundation\Tomcat 6.0
> 
> To:
>   D:\Tomcat60
> 
> 

Don't know have to check with customer, but actual index varies in each occurrence of stack trace, sometimes it is even -1. In two days we had:
2x java.lang.StringIndexOutOfBoundsException: String index out of range: 131
1x java.lang.StringIndexOutOfBoundsException: String index out of range: 118
1x java.lang.StringIndexOutOfBoundsException: String index out of range: 106
4x java.lang.StringIndexOutOfBoundsException: String index out of range: -1 
3x java.lang.StringIndexOutOfBoundsException: String index out of range: 127
2x java.lang.StringIndexOutOfBoundsException: String index out of range: 126
1x java.lang.StringIndexOutOfBoundsException: String index out of range: 123
Rest of stacktrace is identical in all occurences.

In addition
--
Tomy <t....@inet.hr>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Webapp reloading issue and intermittent 404 errors

Posted by Pid <pi...@pidster.com>.
On 07/07/2010 11:07, Tomislav Petrović wrote:
> Tomislav Petrović said on 30.6.2010 16:27:
>>>> Forgot to say:
>>>> Tomcat service is started with following parameters:
>>>>
>>>> JVM: have to check whether server or client, not sure at the moment.
>>>
>>> Server, one would hope. Did you find out the exact version?
>>>
>>
>> Yup JVM path for tomcat is ......\jdk1.6.0_18\jre\bin\server\jvm.dll, so 
>> Java 6 update 18 server.
> 
> Although initial excpetion and stacktrace (related to webapp reloading, actually checking that it should or should not be reloaded) went away with reloadable="false" workaround I now have similar problem.
> 
> Please help since now machine is in (or near) production :(.
> 
> New stacktrace in catalina logs looks like (and produces 404 errors):
> 
> Jul 5, 2010 7:13:47 AM org.apache.catalina.connector.CoyoteAdapter service
> SEVERE: An exception or error occurred in the container during the request processing
> java.lang.StringIndexOutOfBoundsException: String index out of range: 115
> 	at java.lang.String.substring(String.java:1934)
> 	at org.apache.catalina.util.RequestUtil.normalize(RequestUtil.java:131)
> 	at org.apache.naming.resources.FileDirContext.normalize(FileDirContext.java:771)
> 	at org.apache.naming.resources.FileDirContext.file(FileDirContext.java:811)
> 	at org.apache.naming.resources.FileDirContext.getAttributes(FileDirContext.java:429)
> 	at org.apache.naming.resources.BaseDirContext.getAttributes(BaseDirContext.java:747)
> 	at org.apache.naming.resources.ProxyDirContext.revalidate(ProxyDirContext.java:1501)
> 	at org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1457)
> 	at org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:288)
> 	at org.apache.tomcat.util.http.mapper.Mapper.internalMapWrapper(Mapper.java:823)
> 	at org.apache.tomcat.util.http.mapper.Mapper.internalMap(Mapper.java:667)
> 	at org.apache.tomcat.util.http.mapper.Mapper.map(Mapper.java:557)
> 	at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:462)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:296)
> 	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
> 	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
> 	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
> 	at java.lang.Thread.run(Thread.java:619)
> 
> Everything else is same as I posted before (config file, JVM versions, etc....)
> Any advice is appreciated....

I think the general feeling is that it's a JVM bug - but no-one can work
out what it is.  I can't even work out how to get 115 characters out of
a normal file path.

Can you move the installation from:
 D:\Program Files\Apache Software Foundation\Tomcat 6.0

To:
 D:\Tomcat60


?

p

> --
> Tomy <t....@inet.hr>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>