incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murray Altheim (JIRA)" <>
Subject [jira] Commented: (JSPWIKI-465) JSP classloading does not work because of package name collision org.apache.jsp <=> org.apache.jspwiki
Date Tue, 06 Jan 2009 20:16:44 GMT


Murray Altheim commented on JSPWIKI-465:

#1: given that the actual delivery of 3.0 could still be a long way off I don't see this as
a serious problem if we have an interim one, but not a great solution given we are entirely
dependent on others.

#2: is a non-starter for me; we can't be required to precompile a WAR file in our environment.

#3:  no issue for me. Losing "JSP" isn't a huge problem since moving to Apache means we'll
likely create a lot of users who hadn't heard of JSPWiki nor know what "JSP" means. We're
changing the brand and also freeing ourselves from dependency (at least in name) on a specific
technology. Now, if we still want the project to be called JSPWiki and have the package be, that's a big confusing, but not a big problem.

#4: I don't see a problem with org.apache.JSPWiki really. As has been pointed out there are
other examples of mixed case packages.

#5: I can't see this as realistic.

So for me, in rank order:  #3, #4, #1. I would actively campaign against #2 since it excludes
me from the project and #5 won't fly within Apache. 

> JSP classloading does not work because of package name collision org.apache.jsp <=>
> ------------------------------------------------------------------------------------------------------
>                 Key: JSPWIKI-465
>                 URL:
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Servlet Container/Java compatibility
>    Affects Versions: 3.0
>         Environment: JSPWiki 3.0.0-svn-41
>            Reporter: Harry Metske
>            Assignee: Harry Metske
>            Priority: Blocker
>             Fix For: 3.0
> JSPWiki is an incubating project in ASF, one of the required steps here is to move the
java package naming from com.ecyrd.jspwiki to org.apache.jspwiki.
> After moving several classes to this new package we are seeing NoClassDeffoundErrors
when classes are imported from JSP's
> "Normal"  servlets/classes work fine.
> After digging for a couple of days we found that the problem is caused by a bug in the
JasperLoader classloader:
> The following code snippet shows the failure :
> {noformat}
> 	if( !name.startsWith(Constants.JSP_PACKAGE_NAME) ) {
>             // Class is not in org.apache.jsp, therefore, have our
>             // parent load it
>             clazz = parent.loadClass(name);            
> 	    if( resolve )
> 		resolveClass(clazz);
> 	    return clazz;
> 	}
> {noformat}
> The constant Constants.JSP_PACKAGE_NAME is loaded as follows:
> {noformat}
>     /**
>      * The default package name for compiled jsp pages.
>      */
>     public static final String JSP_PACKAGE_NAME = 
>         System.getProperty("org.apache.jasper.Constants.JSP_PACKAGE_NAME", "org.apache.jsp");
> {noformat}
> Note the missing trailing dot !
> So there is a workaround by specifying the Java System Property  org.apache.jasper.Constants.TAG_FILE_PACKAGE_NAME=org.apache.somethingelse
> However, this workaround is only available since revision 441109 of Tomcat 6.
> (
> A bug has been filed for the Tomcat team at :

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message