ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Flemetakis" <>
Subject Re: ejbjar and weblogic element error help
Date Thu, 23 Aug 2001 20:05:25 GMT
You need to rename your descriptors in order for Ant to properly build the 

The way it works is as follows (I'll show you by example)

If your descriptors are named like this:


Then ant will create a jar file named AuthorizationEJB.jar and another one 
named ExampleBean.jar .. inside the archive the descriptors will be named 
ejb-jar.xml and weblogic-ejb-jar.xml as usual.

So for every bean you should have a pair of descriptors where the beginning 
part is unique. Ant uses that first string before the first dash to name the 
resulting ejb and renames the descriptors to their proper name before 
including them in the jar file.

The advantage is that you can add more ejb's to your beans just by adding 
more descriptors to you src directory and a single task will always handle 

Based on what I said, by not renaming the descriptors you noticed that Ant 
was trying to create a jar file named ejb.jar (based on the naming of 
ejb-jar.xml) but it was not finding it's expected pair descriptor 

>From: "T Master" <>
>To: "ant user mailist" <>
>Subject: ejbjar and weblogic element error help
>Date: Thu, 23 Aug 2001 11:27:50 -0600
>This is my first time using this task.
>It is apparently looking for a wenlogic deployment descriptor called:
>     ejb-weblogic-ejb-jar.xml
>This is the wrong name.
><ejbjar descriptordir="${src.dir}/com/iknowledge/inext/server/ejb"
>                 srcdir="${src.dir}/com/iknowledge/inext/server/ejb">
>             <!--support dir="${build.classes.server}">
>                 <include name="**/*.class"/>
>             </support-->
>             <include name="**/ejb-jar.xml"/>
>             <include name="**/weblogic-ejb-jar.xml"/><!-- was exclude
>weblogic-ejb-jar.xml in example -->
>             <weblogic destdir="${deployment.dir}"
>                      keepgeneric="false"
>                      suffix=".jar"
>                      rebuild="false">
>                 <classpath>
>                     <pathelement path="${build.dir}"/>
>                 </classpath>
>                 <wlclasspath>
>                     <pathelement path="${weblogic.classes}"/>
>                 </wlclasspath>
>             </weblogic>
>             <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise
>JavaBeans 1.1//EN"
>                  location="${buildfile.dir}/xml/ejb-jar_2_0.dtd"/>
>             <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 
>                  location="${buildfile.dir}/xml/weblogic-ejb-jar.dtd"/>
>         </ejbjar>
>     [javac] Compiling 1 source file to
>    [ejbjar] Could not resolve ( publicId: -//Sun Microsystems, Inc.//DTD
>ise JavaBeans 2.0//EN, systemId: 
>a l
>ocal entity
>    [ejbjar] Unable to locate weblogic deployment descriptor. It was 
>be in
>    [ejbjar] building ejb.jar with 7 files
>    [ejbjar] WARNING: IOException while adding entry
>ejb\SystemObjectTypeHome.class to jarfile from
>TypeHome.class (The system cannot find the path specified)
>         at
>eJar(, Compiled Code)
>         at
>         at
>         at
>, Compiled Code)
>         at
>         at, Compiled Code)
>         at
>         at, 
>         at, Compiled
>         at
>         at, Compiled Code)
>         at
>         at, 
>         at,
>Compiled Co
>         at, Compiled Code)
>         at, Compiled Code)
>         at
>Total time: 4 seconds

Get your FREE download of MSN Explorer at

View raw message