Return-Path: Delivered-To: apmail-incubator-jspwiki-dev-archive@locus.apache.org Received: (qmail 77348 invoked from network); 6 Jan 2009 18:35:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jan 2009 18:35:05 -0000 Received: (qmail 63381 invoked by uid 500); 6 Jan 2009 18:35:05 -0000 Delivered-To: apmail-incubator-jspwiki-dev-archive@incubator.apache.org Received: (qmail 63362 invoked by uid 500); 6 Jan 2009 18:35:05 -0000 Mailing-List: contact jspwiki-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-dev@incubator.apache.org Delivered-To: mailing list jspwiki-dev@incubator.apache.org Received: (qmail 63342 invoked by uid 99); 6 Jan 2009 18:35:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2009 10:35:05 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2009 18:35:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3D401234C47E for ; Tue, 6 Jan 2009 10:34:44 -0800 (PST) Message-ID: <713882365.1231266884246.JavaMail.jira@brutus> Date: Tue, 6 Jan 2009 10:34:44 -0800 (PST) From: "Craig Russell (JIRA)" To: jspwiki-dev@incubator.apache.org Subject: [jira] Commented: (JSPWIKI-465) JSP classloading does not work because of package name collision org.apache.jsp <=> org.apache.jspwiki In-Reply-To: <905530249.1230896744187.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JSPWIKI-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661243#action_12661243 ] Craig Russell commented on JSPWIKI-465: --------------------------------------- It might be good to enumerate all the places where the package name is "published". There is the Java package name that affects the directory structure of the project, but also the Maven group id and possible artifact id if we ever publish the jar files in a Maven repo. So to be clear, the proposal is that the project will continue to be called jspwiki but the java package and artifact names will be org.apache.wiki? > JSP classloading does not work because of package name collision org.apache.jsp <=> org.apache.jspwiki > ------------------------------------------------------------------------------------------------------ > > Key: JSPWIKI-465 > URL: https://issues.apache.org/jira/browse/JSPWIKI-465 > 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: > http://svn.eu.apache.org/viewvc/tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/servlet/JasperLoader.java?view=markup > 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. > ( http://svn.eu.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/Constants.java?r1=423920&r2=441109&diff_format=h ) > A bug has been filed for the Tomcat team at : https://issues.apache.org/bugzilla/show_bug.cgi?id=46462 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.