You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Sachin Shah <Sa...@kaleconsultants.com> on 2001/08/31 05:46:48 UTC

EJB Task

hi again,

i tried adding the dtd nested element to specify the location of the dtd
file as follow

  <target name="build.ejb" depends="init">
	<mkdir dir="${javac.dest}/checkAirline" />
	<ejbjar descriptordir="${java.source.dir}/checkAirline"
			srcdir="${javac.dest}"
		  	destdir="${javac.dest}">
		 <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN"
			  location="${java.source.dir}/ejb-jar_1_1.dtd"/>
		 <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0
EJB//EN"
			  location="${java.source.dir}/weblogic.dtd"/>

	     <include name="**/ejb-jar.xml"/>
	     <exclude name="**/weblogic*.xml"/>

		 <weblogic destdir="${java.source.dir}"/>
	</ejbjar>
  </target>

but i m getting the following errror when i run the build.

build.ejb:
   [ejbjar] 1 deployment descriptors located.
   [ejbjar] Unable to locate weblogic deployment descriptor. It was expected
to
be in
C:\ant1.3\projects\testANT\testANT\src\java\checkAirline\ejb-weblogic-ejb-
jar.xml
   [ejbjar] Could not load class CheckAirlineBean for super class check
   [ejbjar] Could not load class CheckAirline for super class check
   [ejbjar] Could not load class CheckAirlineHome for super class check
   [ejbjar] building ejb.jar with 4 files
   [ejbjar] adding file 'CheckAirlineBean.class'
   [ejbjar] adding file 'META-INF/ejb-jar.xml'
   [ejbjar] adding file 'CheckAirline.class'
   [ejbjar] adding file 'CheckAirlineHome.class'
   [ejbjar] Calling weblogic.ejbc for
C:\ant1.3\projects\testANT\testANT\src\jav
a\ejb-generic.jar
     [ejbc] Forking java weblogic.ejbc
C:\ant1.3\projects\testANT\testANT\src\ja
va\ejb-generic.jar C:\ant1.3\projects\testANT\testANT\src\java\ejb.jar
     [ejbc] ERROR: Error from ejbc: The JNDI name of bean CheckAirlineBean
was n
ot set
     [ejbc] ERROR: Error from ejbc: No JNDI name set for the referenced
resource
 factory for reference jdbc/oraclePool of type javax.sql.DataSource
     [ejbc] ERROR: ejbc found errors
     [ejbc] Java Result: 1
   [ejbjar] deleting generic jar
C:\ant1.3\projects\testANT\testANT\src\java\ejb
-generic.jar

build:

BUILD SUCCESSFUL

As you might have noticed there is not mapping message being displayed and
it's not able to find the CheckAirline even if it is present in
${javac.dest} directory. The jndi name is also mentioned in the DD.
Attaching the xml file for your reference.


-----Original Message-----
From: Conor MacNeill [mailto:conor@cortexebusiness.com.au]
Sent: Tuesday, August 28, 2001 7:46 PM
To: ant-user@jakarta.apache.org
Subject: Re: Using EJB Task


Have you read the documentation? Try here
http://jakarta.apache.org/ant/manual/OptionalTasks/ejb.html

That is the 1.3 documentation. You can also download the 1.4 Beta (Beta 2)
and check out a few changes.


Finally, the zip file here
http://jakarta.apache.org/~conor/ejb-naming.zip
has examples of the naming conventions which you can use with ejb-jar task.

As to your specific problem, you should be using the <dtd> nested elements
to tell <ejbjar> where to find you local DTDs so it doesn't try to find
them over the net.

Conor

----- Original Message -----
From: "Sachin Shah" <Sa...@kaleconsultants.com>
To: <an...@jakarta.apache.org>
Sent: Wednesday, August 29, 2001 12:08 AM
Subject: Using EJB Task


> Hi ,
>
> Can anyone guide me as to how to go about using EJBTasks for
> creating EJB jars. I tried compiling the same, but it is giving me
external
> entity could not be found for the DTD reference made to weblogic site. I
> don't want to change my Deployment Descriptors.
>
> Thanks
> Sachin
>

 <<weblogic-ejb-jar.xml>> 

Re: EJB Task

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Sachin,

There is no problems with your DTDs. Ant is complaining that it cannot find
a deployment descriptor, not about being unable to find a DTD. The way the
<ejbjar> task works is that it processes the generic EJB descriptor and
then looks for the corresponding vendor specific descriptor. If it can't
find the descriptor it complains and tells you where it expected to find
the file:

> build.ejb:
>    [ejbjar] 1 deployment descriptors located.
>    [ejbjar] Unable to locate weblogic deployment descriptor. It was
expected
> to be in
>
C:\ant1.3\projects\testANT\testANT\src\java\checkAirline\ejb-weblogic-ejb-j
ar.xml

So, is the weblogic deployment descriptor there? I guess not because that's
a funny looking name for it. So now we need to know where the generic
deployment descriptor is located and what is its name?

Conor


----- Original Message -----
From: "Sachin Shah" <Sa...@kaleconsultants.com>
To: <an...@jakarta.apache.org>
Sent: Friday, August 31, 2001 1:46 PM
Subject: EJB Task


> hi again,
>
> i tried adding the dtd nested element to specify the location of the dtd
> file as follow