ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject Re: EJB Jar Task .... works with some versions of Ant ????
Date Mon, 28 May 2001 13:38:11 GMT

I'm not sure why something would work with 1.3alpha and not 1.3. Anyway,
let me explain the source of the problem for you and others who run into
this. When <ejbjar> encounters a reference to the DTD, it tries to load the
DTD. Normally, if <ejbjar> did nothing, the XML parser would go out to the
network ( and load the DTD
from there. That approach is, however, not very fast and does not work when
you are sitting behing a firewall.

<ejbjar>, however, does not do nothing. It knows that if you are using
Weblogic that a copy of the DTD is kept in the Weblogic classes. If you
have the weblogic jars in your classpath when you invoke Ant, then the
ejbjar task loads the DTD as a resource and gives it to the parser. If you
invoke Ant without those weblogic jars in your classpath, it drops back to
attempting the network connection and this is the source of the "External
entity not found" error message.

Now, generally, I prefer to run Ant with a minimal classpath, so to support
that case, the <ejbjar> task in Ant 1.3 also allows you to specify the
exact location of the DTDs required. The following shows how you would
specify these locations for weblogic 6

            <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 2.0//EN"
            <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 6.0.0

where the properties are set to point to the DTD files. For WL5.1, you'll
need to use the EJB1.1 and WL5.1 DTDs.


----- Original Message -----
From: "Abhishek Srivastava" <>
To: "Ant-User@Jakarta. Apache. Org" <>
Sent: Monday, May 28, 2001 9:46 PM
Subject: EJB Jar Task .... works with some versions of Ant ????

> Hello All,
> I was happily building my EJBs with Web Logic 5.1 with the ANT release
> Ant version 1.3alpha compiled on January 17 2001.
> Now I downloaded the latest Ant release from the apache site
> Ant version 1.3 compiled on March 2 2001
> And I started to get a very annoying error message which I used to get
> Ant 1.2 (that was when I decided to upgrade to the 'then' alpha release
> 1.3).
> I have a batch file that sets up the environment for Ant and my
> application... when I use the Alpha version all my ejbs get built and
> deployed. When I use the latest release I get the error message. (I set
> classpath and path with the same batch file)
> C:\NImius2.0\base\Payment.xml:30: SAXException while parsing
> This
>  probably indicates badly-formed XML.  Details: External entity not
> "http
> ://".
> Why does this error keep on coming in different versions of Ant ?
> regards,
> Abhishek.
>     *****     *****     Abhishek Srivastava
>     ***  /_  __ ***     Hewlett-Packard - Solutions Organization
>     **  / / /_/  **     19 Cunningham Road. Bangalore -560052.
>     ***    /    ***     phone +91 80 2251554 Extn:1532
>     *****     *****
>       i n v e n t
>          The most exciting phrase in science, the one which heralds
>          new discoveries, is not Eureka!! but 'That's Funny'
>                                        -- Issac Asimov.

View raw message