Java Mailing List Archive

http://www.junlu.com/

Home » dev.tomcat »

DO NOT REPLY [Bug 48694] WebappClassLoader deadlock if web
application uses it's own classloader

bugzilla

2010-02-08

Replies: Find Java Web Hosting

Author LoginPost Reply
https://issues.apache.org/bugzilla/show_bug.cgi?id=48694

--- Comment #2 from aullrich@(protected) ---
This fix works for us here. It's not checked into trunk yet, though?


In our case a well known 3rd party library calls
first WebappClassLoader.load(...), catches and eats any Throwable including
CNFException and then delegates to Class.forName(..).

Therefore two threads trying to literally load a class with the name "x" end up
being deadlocked on the name of the class and the class loader instance.

  at
org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1362)
  - waiting to lock <0x00002aaab67f1090> (a java.lang.String)
  at
org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1329)
  at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:320)
  - locked <0x00002aaab9f0b4d8> (a
org.apache.catalina.loader.WebappClassLoader)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName (Class.java:169)

---

at
org.apache.catalina.loader.WebappClassLoader.findClass (WebappClassLoader.java:993)
  - waiting to lock <0x00002aaab9f0b4d8> (a
org.apache.catalina.loader.WebappClassLoader)
  at
org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1451)
  - locked <0x00002aaab67f1090> (a java.lang.String)
  at
org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java:1329)

--
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@(protected)
For additional commands, e-mail: dev-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.