ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Steele" <rste...@etracksolutions.com>
Subject RE: ejbjar problem
Date Thu, 24 May 2001 16:51:07 GMT
I had a similar problem with WebLogic 5.1, though service pack 8 was
supposed to fix this (some kind of conflict between ant's XML parser and
the one that WebLogic uses).

Well, I had installed service pack 8, but I forgot to put SP8 into my
build class path; e.g., my class path now looks like:

${weblogic.home}/lib/weblogic510sp8.jar:${weblogic.home}/classes:${weblo
gic.home}/lib/weblogicaux.jar:[...more stuff here]

Note that the patch jar file has to be first; if you look it it, you'll
see it contains the (presumably patched) ejbc classes.

Hope this helps...

Rich

-----Original Message-----
From: Mark Hofmann [mailto:mark.hofmann@aperto.de]
Sent: Tuesday, May 22, 2001 12:18 PM
To: ant-user@jakarta.apache.org
Subject: ejbjar problem


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.jav
a:40
4)
     [ejbc]     at
weblogic.ejb.deployment.dd.DescriptorLoader.createDeploymentUnit(Descrip
torL
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.d
td"/
>
     <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