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 21653] New: - Sort order of EJB descriptors in META-INF catalog are significant when parsing the xmls
Date Wed, 16 Jul 2003 12:56:35 GMT
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=21653>.
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=21653

Sort order of EJB descriptors in META-INF catalog are significant when parsing the xmls

           Summary: Sort order of EJB descriptors in META-INF catalog are
                    significant when parsing the xmls
           Product: Ant
           Version: 1.5.3
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: etj@genera.no


It seems that the following xml filename ordering results in an error:

AvstandEntity-cmp-rdbms-jar.xml
ejb-jar.xml
weblogic-ejb-jar.xml

If naming of files is changed to:

XAvstandEntity-cmp-rdbms-jar.xml
weblogic-ejb-jar.xml
ejb-jar.xml, it works.

The reason seems to be that the tool.processDescriptor(files[index], saxParser)
[line 591] in EjbJar.java assumes ordering of the array: String[] files to be:
ejb-jar.xml as the first entry.

However this does not occur when the operating system orders on alphabetical 
ascending order.

The symptom can be found when looking into the generic.jar assembled in the 
process. The content of ejb-jar.xml and the cmp-rdbms-jar.xml will be identical.
Because it assumes that the first file parsed is the ejb-jar.xml file. 
This is not neccecerily the case if the first letter of the cmp-rdbms-jar.xml 
(eg. AvstandEntity-cmp-rdbms-jar.xml) is lesser than "e"(ejb-jar.xml).

The stacktrace being given on failure is:
java.lang.ClassCastException
        at weblogic.ejb20.dd.xml.DDUtils.loadEJBJarDescriptorFromJarFile
(DDUtils.java:155)
        at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile
(DDUtils.java:139)
        at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile
(DDUtils.java:130)
        at weblogic.ejbc20.runBody(ejbc20.java:338)
        at weblogic.utils.compiler.Tool.run(Tool.java:79)
        at weblogic.ejbc.main(ejbc.java:21)
ERROR: java.lang.ClassCastException
kode\no\Lisa.xml [223] Exception while calling weblogic.ejbc. Details: Ejbc 
reported an error
        at 
org.apache.tools.ant.taskdefs.optional.ejb.WeblogicDeploymentTool.buildWeblogicJ
ar(WeblogicDeploymentTool.java:633)
        at 
org.apache.tools.ant.taskdefs.optional.ejb.WeblogicDeploymentTool.writeJar
(WeblogicDeploymentTool.java:651)
        at 
org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.processDescript
or(GenericDeploymentTool.java:480)
        at org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.execute
(EjbJar.java:592)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
        at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
        at net.sf.antcontrib.logic.ForEach.execute(Unknown Source)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.module.run.TargetExecutor.run
(TargetExecutor.java:331)
        at org.netbeans.core.execution.RunClassThread.run
(RunClassThread.java:118)
Caused by: Ejbc reported an error
        at 
org.apache.tools.ant.taskdefs.optional.ejb.WeblogicDeploymentTool.buildWeblogicJ
ar(WeblogicDeploymentTool.java:627)
        ... 18 more
--- Nested Exception ---
Ejbc reported an error
        at 
org.apache.tools.ant.taskdefs.optional.ejb.WeblogicDeploymentTool.buildWeblogicJ
ar(WeblogicDeploymentTool.java:627)
        at 
org.apache.tools.ant.taskdefs.optional.ejb.WeblogicDeploymentTool.writeJar
(WeblogicDeploymentTool.java:651)
        at 
org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.processDescript
or(GenericDeploymentTool.java:480)
        at org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.execute
(EjbJar.java:592)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
        at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
        at net.sf.antcontrib.logic.ForEach.execute(Unknown Source)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.module.run.TargetExecutor.run
(TargetExecutor.java:331)
        at org.netbeans.core.execution.RunClassThread.run
(RunClassThread.java:118)

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


Mime
View raw message