ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Geis <matthew.g...@instill.com>
Subject RE: Ant EjbJar task problem
Date Wed, 13 Dec 2000 19:20:11 GMT
Geno,
	Two things I noticed here.
1.  The error seems to be that you're missing weblogic-ejb-jar.xml in your
jar file.
2.  One of the lines of your build is the following:
	<exclude name="**/weblogic*.xml"/>
3.  The string "weblogic-ejb-jar.xml" matches your exclude pattern.

I bet if you remove that line, and change
<include name="**/ejb-jar.xml"/>

to 

<include name="**/*ejb-jar.xml"/>

it will probably work.

Matt


	

-----Original Message-----
From: Gero Vermaas [mailto:Gero.Vermaas@sun.com]
Sent: Wednesday, December 13, 2000 2:09 AM
To: ant-user@jakarta.apache.org
Subject: Ant EjbJar task problem


Hi All,

I'm using Ant in a project for quite a while and we had developed our own
EJBJAR task. I recently discovered that the Ant1.2 distribution contains an
EJB task that does exactly what we need: thanks for the good work!

Unfortunately I can't get it to work for our situation and I think i'm
making a simple mistake somewhere. Could you take a look at the following?

The target I use in the Ant build xml file is as follows:

  <target name="ejbc" depends="compile">
    <mkdir dir="${ejblib.dir}"/>
    <ejbjar srcdir="${classes.dir}" descriptordir="${src.dir}" >
      <weblogic destdir="${ejblib.dir}" classpath="${java.class.path}" />
      <include name="**/ejb-jar.xml"/>
      <exclude name="**/weblogic*.xml"/>
    </ejbjar>
  </target>

The classfiles of the ejbs are in the ejblib.dir subdirectories and the
describtors in the src.dir subdirectories. When I run ant I get the
following output:
==========
   [ejbjar] deleting generic jar
D:\usr\DemoDevEnv\build\ejblib\com\cgeyc\bankin
g\bfl\icp\ems\accountgroup\ejb-generic.jar
   [ejbjar] descriptorFileName:
com\cgeyc\banking\bfl\icp\ems\corporation\ejb-ja
r.xml
   [ejbjar] File.separator: \
   [ejbjar] baseNameTerminator: -
   [ejbjar] usingBaseJarName(): false
   [ejbjar] baseName: com\cgeyc\banking\bfl\icp\ems\corporation\ejb
   [ejbjar] getBaseNameTerminator(): -
   [ejbjar] ddPrefix: com\cgeyc\banking\bfl\icp\ems\corporation\ejb-
   [ejbjar] WL_DD: weblogic-ejb-jar.xml
   [ejbjar] Checking for file:
D:\usr\DemoDevEnv\src\com\cgeyc\banking\bfl\icp\e
ms\corporation\ejb-weblogic-ejb-jar.xml
   [ejbjar] building ejb.jar with 4 files
   [ejbjar] adding file
'com\cgeyc\banking\bfl\icp\ems\corporation\CorporationBe
an.class'
   [ejbjar] adding file 'META-INF/ejb-jar.xml'
   [ejbjar] adding file
'com\cgeyc\banking\bfl\icp\ems\corporation\CorporationHo
me.class'
   [ejbjar] adding file
'com\cgeyc\banking\bfl\icp\ems\corporation\Corporation.c
lass'
   [ejbjar] Calling weblogic.ejbc for
D:\usr\DemoDevEnv\build\ejblib\com\cgeyc\b
anking\bfl\icp\ems\corporation\ejb-generic.jar
     [java] Forking java -classpath
D:\weblogic\lib\weblogic510sp5boot.jar;D:\we
blogic\lib\weblogic510sp5.jar;D:\weblogic\license;D:\weblogic\lib\weblogicau
x.ja
r;D:\weblogic\classes;D:\usr\DemoDevEnv\build\classes;D:\java\jdk1.2.2\lib\t
ools
.jar;D:\java\jakart~1\lib\ant.jar;D:\java\jakart~1\lib\parser.jar;D:\java\ja
kart
~1\lib\jaxp.jar;D:\java\junit\junit3.2\junit.jar weblogic.ejbc -noexit
D:\usr\De
moDevEnv\build\ejblib\com\cgeyc\banking\bfl\icp\ems\corporation\ejb-generic.
jar
D:\usr\DemoDevEnv\build\ejblib\com\cgeyc\banking\bfl\icp\ems\corporation\ejb
.jar

     [java] weblogic.utils.compiler.ToolFailureException: ERROR:
weblogic-ejb-ja
r.xml was not found in the jar file.
     [java]     at weblogic.ejbc.runBody(ejbc.java, Compiled Code)
     [java]     at weblogic.utils.compiler.Tool.run(Tool.java:80)
     [java]     at weblogic.ejbc.main(ejbc.java:365)
     [java] Java Result: 1
================

Note: I added some extra log messages to the WebLogicDeploymentTools class.

It reports that the weblogic-ejb-jar.xml file is not included in the generic
jar file. I checked the generic jar file, and it is not included.

The directory containing the descriptor files looks like this (all other ejb
directories are similar):

 Directory of
D:\Usr\DemoDevEnv\src\com\cgeyc\banking\bfl\icp\ems\corporation

09/29/2000  15:03       <DIR>          .
09/29/2000  15:03       <DIR>          ..
09/29/2000  13:50                  672 Corporation.java
09/29/2000  11:55                1,712 CorporationBean.java
09/29/2000  11:55                  606 CorporationHome.java
09/29/2000  15:10                1,169 ejb-jar.xml
12/08/2000  10:19                  612 weblogic-ejb-jar.xml
               5 File(s)          4,771 bytes
               2 Dir(s)     973,287,424 bytes free

However, I can't get the EjbJar task to include weblogic-ejb-jar.xml. I
tried several combinations of in/exclude tags bu nothing seems to work.

Do you have any idea what I'm doing wrong? Any help is greatly appreciated.

Regards,

Gero Vermaas

Mime
View raw message