You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ritendra Sinha <ri...@db.com> on 2000/11/07 17:33:23 UTC

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.


Re: Unable to run EJB Jar Task ..

Posted by Cyril Bouteille <Cy...@yahoo.com>.
Ritendra,

> 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:
> 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.
> What am i doing wrong?

It happened to me too. 
In my case, I got the binary release of Ant and didn't have optional.jar
file in the lib directory. Ejb tasks are optional ones not part of the
basic release of Ant.
Make sure to download optional.jar on the jakarta website, copy it into
the lib directory of Ant and add it in your classpath.

I had to use the debug mode to figure that out. It's strange that Ant
does not complain if you insert an unknown task in the build.xml file...

Hope it helps,
--
 Cyril Bouteille - Senior J2EE Software Engineer 
 Hotwire - San Francisco, California
 http://www.hotwire.com