ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ritendra Sinha" <ritendra.si...@db.com>
Subject Re: Unable to run EJB Jar Task ..
Date Tue, 07 Nov 2000 20:51:24 GMT

Hi,

Thanks for the help from the people who replied to my query. I have now resolved the problem
and they were two fold.

The reason why the ejbjar was running without giving error messages was because the task only
recognises the xml file in a descriptor directory if it can find it with the rest of the source
files. So the rule-of thumb is to keep the xml files along with ur corresponding java files.
Also make sure to prefix the name of the bean with the xml files. Eg., ejb-jar.xml in the
dirctory should be catalog-ejb-jar.xml where catalog is the name of the bean. Rather all the
xml files should have the bean name prefixed.

The second problem (rather an internal one!) was that the proxy server from my organistaion
was not allowing the xml dtd from the sun site to be reached. hence the problem with the weblogic.xml
which it was giving. The way around is to copy and put the dtd file in c:\weblogic\myserver\public_html\dtd\ejb-jar_1_1.dtd

When calling the dtd from the xml file replace the external http with the following:

'http://127.0.0.1:7001/dtd/ejb-jar_1_1.dtd'

Remember to start the weblogic server before running ant.

Regards,

Ritendra

---------------------------------------- Message History ----------------------------------------


From: ritendra.sinha@db.com on 07/11/2000 16:33

Please respond to ant-user@jakarta.apache.org

To:   ant-user@jakarta.apache.org
cc:
Subject:  Unable to run EJB Jar Task ..




Hi,

Can anyone there tell me what is it that I could be doing wrong even when there are no error
messages got back from the ejbjar task.

I am trying to build multiple ejbs under weblogic. I have written my build script so that
it does the following:

...
<property name="classpath" value="lib/ant.jar;c:\weblogic\lib\weblogic510sp6.jar;c:\weblogic\classes;c:\weblogic\lib\weblogicaux.jar"
/>

<prepare...creates the directories>
<compile.. compile all the java files (java and ejb files) and put them into a directory
called "build">

the directory "build" now contains a package structure:

com\build\com\db\efk\catalog\ejb\Catalog.class
com\build\com\db\efk\catalog\ejb\CatalogBean.class
com\build\com\db\efk\catalog\ejb\CatalogHome.class
...
com\build\com\db\efk\control\ejb\Control
...


<property name="description.dir"  value= "C:\mymodule\build" />
(All the xml scripts that are necessary are there for each ejb.. such as catalog\ejb-jar.xml,
control\ejb-jar.xml, etc)

now I try and build the ejbjar...

 <target name="wlejb" depends="compile">
     <ejbjar srcdir="${build}" descriptordir="${descriptor.dir}">
          <weblogic destdir="${deployjars.dir}" classpath="${classpath}" />
          <include name="**/*-ejb-jar.xml" />
          <exclude name="**/*weblogic-ejb-jar.xml" />
     </ejbjar>
</target>

The ant build script does not give any errors and when it comes to do the ejbjar task it simply
walks through without giving any messages.

I check the location deployjars.dir but that is empty.

If I remove the <exclude name="**/*weblogic-ejb-jar.xml" /> from the wlejb task then
I get the following error message

wlejb:

BUILD FAILED

simple.xml:49: SAXException while parsing 'catalog\weblogic-ejb-jar.xml'. This probably indicates
badly-forme
nal entity not found: "http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd".
org.xml.sax.SAXParseException: External entity not found: "http://www.bea.com/servers/wls510/dtd/weblogic-ejb
        at com.sun.xml.parser.Parser.fatal(Parser.java:2817)
        at com.sun.xml.parser.Parser.externalParameterEntity(Parser.java:2506)
        at com.sun.xml.parser.Parser.maybeDoctypeDecl(Parser.java:1137)
        at com.sun.xml.parser.Parser.parseInternal(Parser.java:481)
        at com.sun.xml.parser.Parser.parse(Parser.java:284)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
        at org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.processDescriptor(GenericDeployme
Code)
....

What am i doing wrong?

Regards,
Ritendra



--



--

This e-mail may contain confidential and/or privileged information. If you are not the intended
recipient (or have received this e-mail in error) please notify the sender immediately and
destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material
in this e-mail is strictly forbidden.


Mime
View raw message