ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark.hofm...@aperto.de (Mark Hofmann)
Subject ejbjar problem
Date Tue, 22 May 2001 16:18:16 GMT
Hi all,
when trying to create a jar from my beans (actually it's
only one in this case) I get this error output:


----
compile:
    [javac] Compiling 4 source files to Y:\baustelle\java\source\build

ejb2:
   [ejbjar] building ProductUtils.jar with 5 files
     [ejbc] java.lang.ClassCastException
     [ejbc]     at
weblogic.xml.dom.DOMUtils.getOptionalElementsByTagName(DOMUtils.java,
Compiled Co
de)
     [ejbc]     at
weblogic.xml.dom.DOMUtils.getOptionalElementByTagName(DOMUtils.java:170)
     [ejbc]     at
weblogic.xml.dom.DOMUtils.getOptionalValueByTagName(DOMUtils.java:97)
     [ejbc]     at
weblogic.ejb.deployment.dd.EJBReadDOM.getDescriptionValue(EJBReadDOM.java:40
4)
     [ejbc]     at
weblogic.ejb.deployment.dd.DescriptorLoader.createDeploymentUnit(DescriptorL
oader
.java:200)
     [ejbc]     at weblogic.ejbc.runBody(ejbc.java, Compiled Code)
     [ejbc]     at weblogic.utils.compiler.Tool.run(Tool.java:80)
     [ejbc]     at weblogic.ejbc.main(ejbc.java:353)
     [ejbc] ERROR: java.lang.ClassCastException
     [ejbc] Java Result: 1

BUILD SUCCESSFUL
----

And thats my target (sorry for all the lines)


---
  <target name="ejb2" depends="compile">
    <ejbjar srcdir="Y:/baustelle/java/source/build"
            descriptordir=".">

  <classpath>
       <fileset dir="Y:/baustelle/java/lib">
         <include name="**/*.jar"/>
       </fileset>
       <fileset dir="C:/ant/lib">
        <include name="**/*.jar"/>
       </fileset>

       <fileset dir="${abaxx.home}/lib/wls510">
         <include name="**/abxcore.jar"/>
       </fileset>

       <pathelement location="Y:/baustelle/java/source/build"/>
       <pathelement location="${weblogic.home}/classes"/>
       <!-- old java collections framework with
com.sun.java.util.collections.* classes -->
       <pathelement
location="${weblogic.home}/lib/unpacked_jars/collections.zip"/>
  </classpath>


     <weblogic destdir="${deploy.dir}"/>

     <include name="**/*-ejb-jar.xml"/>
     <exclude name="**/*-weblogic*.xml"/>
     <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
1.1//EN"

location="${weblogic.home}/classes/weblogic/ejb/deployment/xml/ejb-jar.dtd"/
>
     <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN"

location="${weblogic.home}/classes/weblogic/ejb/deployment/xml/weblogic-ejb-
jar.dtd"/>

    </ejbjar>
  </target>
---

I needed to add the classpath to the target since it didn't accept it when
I added a classpath attribute tag (which referenced an "external" classpath
element) to the ejbjar element.

To me it's really weird behaviour and it cost me already a day.
Hope someone has an answer for me....


TIA

  Mark



Mime
View raw message