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 2002/07/23 16:24:21 UTC
DO NOT REPLY [Bug 11086] New: -
Null pointer exception in JasperLoader.loadClass(String, boolean)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11086>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11086
Null pointer exception in JasperLoader.loadClass(String, boolean)
Summary: Null pointer exception in JasperLoader.loadClass(String,
boolean)
Product: Tomcat 4
Version: 4.0.4 Final
Platform: All
OS/Version: Other
Status: NEW
Severity: Major
Priority: Other
Component: Jasper
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: w.riezebos@genimen.com
A null pointer is generated in a specific situation where a JSP page needs to
load a new class. The cause is not quite clear though.
The problem is directly caused by:
In the constructor the securityManager is initialized.
JasperLoader(URL [] urls, String className, ClassLoader parent,
PermissionCollection permissionCollection,
CodeSource codeSource) {
super(urls,parent);
...
this.securityManager = System.getSecurityManager();
}
Further on in public Class loadClass(String name, boolean resolve)
there is a check:
if (System.getSecurityManager() != null) {
if (dot >= 0) {
try {
securityManager.checkPackageAccess(name.substring(0,dot));
As you can see the System.getSecurityManager() is checked to be set; and then
THE INSTANCE VARIABLE IS USED.
When at construction there is no security manager; this will be NULL. Af later
at class loading time there IS a security manager the method will cause a null
pointer.
Indirect causes:
I have no clue why there suddenly is a system classloader; I am just using
plain JSP pages and I am not messing about with security managers or class
loaders. Anyway, this kind of check seems erratic to me.
Kind regards,
Wido Riezebos
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>