The following issue has been updated:
Updater: Brian Minchau (mailto:[EMAIL PROTECTED])
Date: Fri, 24 Sep 2004 8:28 AM
Changes:
Component changed to transformation
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/XALANJ-1686?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XALANJ-1686
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XALANJ-1686
Summary: Minor Exception try block error
Type: Bug
Status: Open
Project: XalanJ2
Components:
Xalan-interpretive transformation
transformation
Versions:
2.5
Assignee: Xalan Developers Mailing List
Reporter: Lukas Zapletal
Created: Wed, 15 Oct 2003 5:04 PM
Updated: Fri, 24 Sep 2004 8:28 AM
Environment: Operating System: All
Platform: All
Description:
Dears
sorry to trouble you on your official mail but I`m not in the list and I do not
want to subscribe enything
incl. bugzilla or any other compicated forms (why all open source projects
doesn`t have any anonymous email
address allowing us to report bugs and recomendations without strained subscribe
forms -- IMHO lots of users
give it up at the beginning).
Ok. I found a small mistake in the Xalan-J source org.apache.xalan.xslt.Process.
There are some try-catch blocks in the code that parses URIRESOLVER and
ENTITYRESOLVER parameters. The
exceptions should be ClassNotFoundException cnfe but somebody changed this to
Exception cnfe. Well this is not
bad author just needed to handle more exceptions but I found a problem.
I spent 4 hours of fining why my Xalan reports an error about not finding my
resolver class. I solved it only
by debugging the code. My JRE 1.4.2 was always loading RT.JAR with old xalan and
in this situation my new
resovler was not compatible with this old Xalan. BUT! The Xalan always reported
the resolver class could not
be found.... It made harder to locate the problem for me and it will make it
harder for any other user with 1.4
JRE.
You should split the exception into two ones. One should report
ClassNotFoundException and one could report
ClassCastException. This can make a life much easyier for users with Java 1.4 or
higher...
Here`s the problem part code (ASF license, visit www.apache.org for more
information about the license):
package org.apache.xalan.xslt;
public class Process
{
......
if("-URIRESOLVER".equalsIgnoreCase(argv[i]))
{
if(i + 1 < argv.length)
{
try
{
uriResolver = (URIResolver)Class.
forName(argv[++i], true,
ClassLoader.getSystemClassLoader()).newInstance();
tfactory.setURIResolver(uriResolver);
}
catch(Exception cnfe) // HERE! YOU CAN SEE
ANYBODY CHANGED IT
{
System.err.println(XSLMessages.createMessage("ER_CLASS_NOT_FOUND_FOR_OPTION",
new Object[] {
"-URIResolver"
}));
doExit(-1);
}
} else
{
System.err.println(XSLMessages.
createMessage("ER_MISSING_ARG_FOR_OPTION", new
Object[] {
"-URIResolver"
}));
doExit(-1);
}
} else
......
}
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]