ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject Re: ejbjar headaches
Date Wed, 29 Aug 2001 12:06:13 GMT
From: "Atherton Richard - Z9V" <>
To: <>
Sent: Wednesday, August 29, 2001 7:24 PM
Subject: ejbjar headaches
> I'm getting a lot of Ant headaches this morning! I'm using ejbjar to try
> build an EJB JAR. However I get a SAXException when I use the ejbjar
> but I'm using the same descriptors that work successfully when I build
> batch files (using the same Weblogic instance). Has anyone ever
> this?
> ********* buildfile ****************
>     <target name="buildEJB" >
>     <ejbjar srcdir="${classesOutput}"
>             descriptordir="${basedir}\descriptors">
>       <weblogic destdir="${outputJars}"
>                 classpath="${ejbBuildClasspath}"/>
>         </ejbjar>
>     </target>


It is hard to tell what the error is since the parser is trying to emit a
locale-appropriate error message but can only come up with the code. If you
try an English locale we may get more info (Sorry :-( ). Anyway, I can
guess that the parser is complaining that it cannot find the DTDs for the
EJB jar deployment descriptor. When you run ejbjar you need to tell it
where the DTDs are so that the parser will not go looking on the net for
them (I'll guess you are behind a firewall). There are two ways to do this

1. Run Ant with weblogic in your classpath. The dtd are contained in the
weblogic.jar and if it is in the classpath, Ant will be able to find the
dtds from there.

2. Most people, however, do not want to have weblogic in their ant
classpath. <ejbjar>, therefore, allows you to specify where to find the
dtds directly. Look at the documentation for the <dtd> nested element.
Since you have downloaded the DTDs (you need the Sun one and the
corresponding Weblogic one), create <dtd> elements, pointing to the DTDs.

Let me know if that doesn't resolve your problem..


View raw message