Hi Oliver,
Try this:
<target name="compile.ejb.ejournalMaterial" depends="compile.server">
<ejbjar srcdir="${build.classes.server}"
destdir="${deploymentjars.dir}/${ejournal.dir}/material"
descriptordir="${descriptor.dir}/${ejournal.dir}/material"
basejarname="ejb_ejournalMaterial">
<weblogictoplink
destdir="${deploymentjars.dir}/${ejournal.dir}/material"
compiler="jikes -nowarn"
classpath="${classpath.ejb-toplink}"
toplinkdescriptor="toplink-cmp-EJSatz.xml"
toplinkdtd="file:///prog/toplink/toplink-cmp_2_5_1.dtd"/>
<include name="**/ejb-jar.xml"/>
<exclude name="**/weblogic-ejb-jar.xml"/>
</ejbjar>
</target>
There is no need to include the weblogic element since the
weblogictoplink element includes (subclasses) the weblogic
element. Also, I have heard that jikes and the weblogic
ejbc compiler may not play nice. Just an fyi to look out
for should you encounter other problems later.
If you have any other questions, just let me know.
jh
-----Original Message-----
From: Oliver.Boehm [mailto:[EMAIL PROTECTED]
Sent: Friday, November 24, 2000 2:11 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: ejbjar and TopLink (ant 1.2)
Hello,
we're using WebLogic 5.1 together with TopLink, so I'm happy about the
TopLink integration inside Ant. But every time I rebuild an EJB Ant
needs 2 tries to create the jar-file:
[ejbjar] building ejb_ejournalMaterial.jar with 6 files
[java] ERROR: Error from ejbc: Error initializing the CMP
Persistence Type for your bean:
[java] Could not find descriptor file with Jar entry name
'META-INF/toplink-cmp-EJSatz.xml' for specified type TOPLink for
WebLogic
[java] Please be sure this file is available in your ejb-jar file.
[java]
[java] weblogic.utils.compiler.ToolFailureException: ERROR: ejbc
found errors
[java] at weblogic.ejbc.runBody(ejbc.java:328)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:80)
[java] at weblogic.ejbc.main(ejbc.java:353)
[ejbjar] building ejb_ejournalMaterial.jar with 7 files
[java] [EJB]: Creating output
jar:D:\pilot\classes\server\gebos\subsystem\ejournal\material\ejb_ejournalMa
terial.jar
The jar file is created successfully, but why the error message? Is this
normal? Or did I forget something in the ejbjar task? Here's the part of
my build.xml:
<target name="compile.ejb.ejournalMaterial" depends="compile.server">
<ejbjar srcdir="${build.classes.server}"
descriptordir="${descriptor.dir}/${ejournal.dir}/material"
basejarname="ejb_ejournalMaterial">
<weblogic destdir="${deploymentjars.dir}/${ejournal.dir}/material"
compiler="jikes -nowarn"
classpath="${classpath.ejb-toplink}"
/>
<include name="**/ejb-jar.xml"/>
<exclude name="**/weblogic-ejb-jar.xml"/>
<weblogictoplink
destdir="${deploymentjars.dir}/${ejournal.dir}/material"
classpath="${classpath.ejb-toplink}"
toplinkdescriptor="toplink-cmp-EJSatz.xml"
toplinkdtd="file://prog/toplink/toplink-cmp_2_5_1.dtd"
/>
</ejbjar>
</target>
I tried also to include the TopLink XML file in the ejbjar task but with
no success.
cheers
Oliver
--
Oliver B�hm
Tel: (0711)2012-2734 Fax: (0711)2012-6734
mailto:[EMAIL PROTECTED] http://www.rwg.de
mailto:[EMAIL PROTECTED] http://www.ba-stuttgart.de/~boehm