Issue Details (XML | Word | Printable)

Key: GLASSFISH-3800
Type: Bug Bug
Status: Resolved Resolved
Resolution: Incomplete
Priority: Major Major
Assignee: jluehe
Reporter: kmeduri
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
glassfish

WebappClassLoader must unconditionally delegate loading xerces/xalan classes to system class loader.

Created: 24/Oct/07 01:10 PM   Updated: 02/Jun/08 05:45 PM   Resolved: 02/Jun/08 05:45 PM
Component/s: web_container
Affects Version/s: 9.1peur1
Fix Version/s: 9.1.1

Time Tracking:
Not Specified

Environment:

Operating System: All
Platform: Sun


Issuezilla Id: 3,800
Tags:
Participants: jluehe and kmeduri


 Description  « Hide

The WebappClassLoader must unconditionally delegate loading classes that belong
to com.sun.org.apache.[xerces/xalan/xml.internal] packages to the system class
loader.

This avoids any user app (that contains for ex. WEB-INF/lib/xalan.jar) to mess
up XML parsing/processing classes that the server may want to load from JRE.



kmeduri added a comment - 24/Oct/07 01:27 PM

Suggested fix:
==============

Index: WebappClassLoader.java
===================================================================
RCS file:
/cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/loader/WebappClassLoader.java,v
retrieving revision 1.21.6.5
diff -u -r1.21.6.5 WebappClassLoader.java
— WebappClassLoader.java 13 Dec 2006 19:37:41 -0000 1.21.6.5
+++ WebappClassLoader.java 24 Oct 2007 20:26:25 -0000
@@ -187,6 +187,9 @@
"org.w3c.dom", // DOM 1 & 2
"org.apache.xerces", // Xerces 1 & 2
"org.apache.xalan", // Xalan
+ "com.sun.org.apache.xerces", // Xerces w/com.sun. pkg
+ "com.sun.org.apache.xalan", // Xalan w/com.sun. pkg
+ "com.sun.org.apache.xml.internal", // XML internal classes
"org.apache.taglibs.standard", // JSTL (Java EE 5)
"com.sun.faces", // JSF (Java EE 5)
/* 6314912


kmeduri added a comment - 24/Oct/07 01:39 PM

PWC12Dev_Branch commit info:
----------------------------
Checking in WebappClassLoader.java;
/cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/loader/WebappClassLoader.java,v
<-- WebappClassLoader.java
new revision: 1.21.6.6; previous revision: 1.21.6.5
done


jluehe added a comment - 30/Oct/07 11:40 AM

Commit to fix in 9.1.1


jluehe added a comment - 01/Nov/07 10:30 AM

Ported fix to 9.1.1:

Checking in WebappClassLoader.java;
/cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/loader/WebappClassLoader.java,v
<-- WebappClassLoader.java
new revision: 1.34.6.1; previous revision: 1.34
done


jluehe added a comment - 02/Jun/08 05:33 PM

Reopen so that "fix" can be undone. Fix had been provided by WS team, but WS
team has found that it was not required after all, and worse, was causing other
problems.


jluehe added a comment - 02/Jun/08 05:45 PM

Undid original "fix". See CR 6709181 for why:

Checking in WebappClassLoader.java;
/cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/loader/WebappClassLoader.java,v
<-- WebappClassLoader.java
new revision: 1.34.6.4; previous revision: 1.34.6.3
done