ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject Re: More info on the WL6.0 and EJBJAR problem
Date Thu, 12 Jul 2001 10:50:46 GMT

You should not need to change the DOCTYPE elements in the deployment
descriptors. The whole idea behind the <dtd> elements is to allow you to
map a public Id to a local file or resource.

From: "Neil Clayton" <>
> I've modified the DOCTYPE on of the XML descriptors, to point directly to
> the dtd's stored on disk.
> e.g: I changed "http://www... .etc" to
> etc"

I would strongly recommend against this. I build plenty of beans with the
standard DOCTYPE, and I do it behind a firewall.

> Ant will now compile the bean, and the weblogic subtask will "do the
> thing". The bean will deploy into WL6 just fine.
> This seems to suggest to me that the XML parser has no idea that that
> are local (via the inculsion of the <dtd> element within the <ejbjar>

Well it should.

> We are indeed behind a firewall here - and from what I can tell the
> error "SAXException while parsing 'com\woe\ejb\test\Test-ejb-jar.xml'.
> probably indicates badly-formed XML.  Details: External parameter entity
> "%[dtd];" has  characters after markup." is probably due to the fact that
> the DTD cannot be sourced over the web without a proxy configuration.

No, the error given when the DTD can't be found is different. I have never
seen the error you mentioned above.

> Why it
> does not output the error about not being able to find the external
> I do not know.
> So, my question(s) now become:
> * How does the parser that is being used (whatever that may be, I'm using
> the default one that comes with Ant (I've also tried the later jxp1.1
> know to use the "replacement" (for want of a better term) DTDs as defined
> using the <dtd> subelement of <ejbjar>?

When a parser encounters an external entity, it gives the code an
opportunity to resolve that entity using a local resource. The <ejbjar>
task takes that opportunity to lookup a map of DTD locations. There are
some predefined locations for weblogic, based on the classpath, and the
rest are set by the <dtd> elements. That is how it works.

> *     Is order of jar's in the classpath important with regard to this?

No. If Ant is started with weblogic in its classpath, it will know where to
find the local versions of the DTDs in the weblogic namespace. If not, you
need to use the <dtd> elements.

> Further help/suggestions/assistance would be welcome!

A couple of suggestions. Run ant with -debug. It will give you a lot of
information about what is going on. You can then send us the relevant bits
of the output. The other thing you can try is to try the latest nightly
builds. I have added some better error reporting when the publicIds cannot
be mapped to a local entity. Finally, if we can't figure it from the above,
perhaps you could produce a small sample bean which has the same problems
and send it to me. Alternatively, I have a simple sample which you can try.


View raw message