You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/06/22 13:24:53 UTC
DO NOT REPLY [Bug 49488] New: Infrequent
StringIndexOutOfBoundsException in WebappClassLoader
https://issues.apache.org/bugzilla/show_bug.cgi?id=49488
Summary: Infrequent StringIndexOutOfBoundsException in
WebappClassLoader
Product: Tomcat 6
Version: 6.0.24
Platform: PC
OS/Version: Windows Server 2003
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: bratapfel81@gmx.de
After switching from Tomcat 5.5 to Tomcat 6.0.24, every now and then Tomcat's
WebappClassLoader throws StringIndexOutOfBoundsExceptions, which leads to
various exceptions like NoDefClassFoundError. With Tomcat 5.5, everything went
fine. The web application in which the exceptions occur remained untouched
throughout the whole time. The error is also present in Tomcat 6.0.26.
Here is a short stack trace from the Catalina log file:
java.lang.StringIndexOutOfBoundsException: String index out of range: 95
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:809)
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.getAttributes(ProxyDirContext.java:840)
at
org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2414)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2266)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:976)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1451)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)
at java.lang.Class.getDeclaredClasses0(Native Method)
at java.lang.Class.getDeclaredClasses(Class.java:1699)
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 49488] Infrequent StringIndexOutOfBoundsException
in WebappClassLoader
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49488
Konstantin Kolinko <kn...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |WORKSFORME
--- Comment #4 from Konstantin Kolinko <kn...@gmail.com> 2010-07-07 23:16:49 EDT ---
See thread "Webapp reloading issue and intermittent 404 errors" on users@.
http://markmail.org/message/xsrc4ek3bhkhsxi4
http://marc.info/?t=127773158900004&w=2
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 49488] Infrequent StringIndexOutOfBoundsException
in WebappClassLoader
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49488
--- Comment #3 from Mark Thomas <ma...@apache.org> 2010-06-25 04:00:34 EDT ---
I've looked at this and this is looking very much like a JVM bug but even then
I can't see how it is being triggered.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 49488] Infrequent StringIndexOutOfBoundsException
in WebappClassLoader
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49488
Konstantin Kolinko <kn...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #2 from Konstantin Kolinko <kn...@gmail.com> 2010-06-22 10:35:31 EDT ---
It is very strange. The code in RequestUtil.normalize() is
126 // Resolve occurrences of "//" in the normalized path
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 }
I do not see how it can break.
1. What exact version of Java are you using? Is it 32-bit, or 64-bit?
2. What exact version of Tomcat 5.5.x were you using before?
3. Is this error reproducible, or it happens randomly?
4. Do you have any clue about what class it tried to load?
Note, that it is possible to turn on debug logging in WebappClassLoader class,
by adding the following line to conf/logging.properties:
org.apache.catalina.loader.WebappClassLoader.level=FINE
The code that fails is triggered only if the class file path contains a '//'.
Having a double slash there is unusual. So maybe it is not Tomcat version
change that triggers this, but how you web application is deployed.
By the way, Tomcat 6.0.27 is already available for testing. See a [VOTE] thread
on dev@ list.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 49488] Infrequent StringIndexOutOfBoundsException
in WebappClassLoader
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49488
--- Comment #1 from bratapfel81@gmx.de 2010-06-22 07:31:52 EDT ---
I may note that the exception occurs after tomcat start up has finished.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org