ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 35649] New: - WeblogicDeploymentTool.java does not work in jdk1.4.2_05
Date Thu, 07 Jul 2005 14:22:52 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35649>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35649

           Summary: WeblogicDeploymentTool.java does not work in jdk1.4.2_05
           Product: Ant
           Version: 1.6.5
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: adambrod@yahoo.com


Apparently the ClassLoader was tweaked in JDK1.4.2_05 such that it will no
longer load classes if they have the slash character in the name.  It must use
the '.' character.  For example, loading "com/test/Test.class" fails, but
"com.test.Test.class" succeeds.  This seems to be related to Sun JDK defect
4986512 (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4986512).

This is relevant because we have noticed that our ejbjar ant task fails on the
_05 jdk, but has worked fine from jdk1.3.1 up through 1.4.2_04.

I did some debugging yesterday and I believe the problem is in
WeblogicDeploymentTool.isRebuildRequired(...).  If the Bean file has been
modified and needs to be replaced, it enters the for loop at line 700.  On line
715 it takes the class name (returned from the JarFile class) and replaces
File.separatorChar with '.'.

The problem is that genericEntry.getName() always returns the class name with
'/' characters, even though File.separatorChar is '\' on Windows.  I double
checked our Jar files and they appear to be using the correct fileseparator.

To fix this, I guess you'd need to add this line:

String classname = genericEntry.getName().replace('/', '.');

so that it also finds and replaces the '/' character.

Also, I noticed that line 687 explicitly uses the '/' character.  That could
also cause problems.  That should be modified to use File.separatorChar.

I hope this is descriptive enough.  Email me if you have questions or need
clarifications.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message