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/28 16:08:26 UTC

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

Re: Using EJB Task

Posted by Edgar S�nchez <ve...@yahoo.com>.
ohhh  Thanks for the explanation Conor
VES

--- T Master <tm...@iknowledgeinc.com> wrote:
> Ahhh.  Thanks for the explanation Conor.
> 
> T Master.
> 
> ----- Original Message -----
> From: "Conor MacNeill"
> <co...@cortexebusiness.com.au>
> To: <an...@jakarta.apache.org>
> Sent: Tuesday, August 28, 2001 5:49 PM
> Subject: RE: Using EJB Task
> 
> 
> > > From: T Master
> [mailto:tmaster@iknowledgeinc.com]
> > >
> > > I used the nested DTD element, and it couldn't
> find the local
> > > DTD.
> >
> > You have to extract the DTDs from the weblogic.jar
> to a local file and
> point
> > the <dtd> element at that local copy. Note that if
> weblogic is on the
> > classpath when Ant is run, the <ejbjar> task
> "knows" where to find the
> dtds
> > in the weblogic classpath. So, that is why in your
> case, it says the
> > following:
> >
> > >    [ejbjar] Mapped publicId -//Sun Microsystems,
> Inc.//DTD Enterprise
> > > JavaBeans
> > > 1.1//EN to resource
> /weblogic/ejb20/dd/xml/ejb11-jar.dtd
> >
> > It has mapped it to a resource - automagically.
> >
> > Conor
> >
> 


=====

_________________________________________________________________

"Puedes sentirte desilusionado si fallas, pero est�s condenado si no lo intentas."

"You can get disappointed if you fail down, but you are doomed if you do not try it."

ICQ #  22338121


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

Re: Using EJB Task

Posted by T Master <tm...@iknowledgeinc.com>.
Ahhh.  Thanks for the explanation Conor.

T Master.

----- Original Message -----
From: "Conor MacNeill" <co...@cortexebusiness.com.au>
To: <an...@jakarta.apache.org>
Sent: Tuesday, August 28, 2001 5:49 PM
Subject: RE: Using EJB Task


> > From: T Master [mailto:tmaster@iknowledgeinc.com]
> >
> > I used the nested DTD element, and it couldn't find the local
> > DTD.
>
> You have to extract the DTDs from the weblogic.jar to a local file and
point
> the <dtd> element at that local copy. Note that if weblogic is on the
> classpath when Ant is run, the <ejbjar> task "knows" where to find the
dtds
> in the weblogic classpath. So, that is why in your case, it says the
> following:
>
> >    [ejbjar] Mapped publicId -//Sun Microsystems, Inc.//DTD Enterprise
> > JavaBeans
> > 1.1//EN to resource /weblogic/ejb20/dd/xml/ejb11-jar.dtd
>
> It has mapped it to a resource - automagically.
>
> Conor
>


EJB weblogic Tasks

Posted by Edgar S�nchez <ve...@yahoo.com>.
 Hi everyone..

  sorry for the other message, the browser got crazy
and sent it with no reason....

   well this is the real question...

  I want to create an EJB, I've been having troubles
with a task in the way like...

      <java classname="weblogic.ejbc">
         <arg value="-classpath"/>
         <arg value="${CLASSPATH}"/>
         <arg value="D:/segutest/SegEJB1.jar"/>
         <arg value="appServer/${NOMBRE_JarEJBSeg}"/>
         <arg
value="D:/segutest/vicsa/appServer/segEJB.jar"/>
      </java>

  so, reading the manual I found the ejb task, that
creates an ejb for the weblogic. So, i changed my
target with this one:

     <ejbc descriptors="SegEJB1.jar"
           src="D:/segutest/" 
           dest="D:/segutest/vicsa/appServer/"
           manifest="segEJB.jar">
     </ejbc>

 but the following error came out:

BUILD FAILED

D:\segutest\segutest.xml:40: Could not create task of
type: ejbc. Common solutions are to use taskdef to
declare your task, or, if this is a
n optional task, to put the optional.jar in the lib
directory of your ant installation (ANT_HOME).




the only thing I just want to do is to put this line:

java weblogic.ejbc -compiler javac SegEJB1.jar
d:\segutest\vicsa\appServer\SegEJB.jar

   who is in DOS command to ANT!!!

Please some one could tell me how to put (translate)
that line into Ant code, and where do I have to
put the ejbc tag??

Thanks
VES

=====

_________________________________________________________________

"Puedes sentirte desilusionado si fallas, pero est�s condenado si no lo intentas."

"You can get disappointed if you fail down, but you are doomed if you do not try it."

ICQ #  22338121


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

RE: Using EJB Task

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
> From: T Master [mailto:tmaster@iknowledgeinc.com]
>
> I used the nested DTD element, and it couldn't find the local
> DTD.

You have to extract the DTDs from the weblogic.jar to a local file and point
the <dtd> element at that local copy. Note that if weblogic is on the
classpath when Ant is run, the <ejbjar> task "knows" where to find the dtds
in the weblogic classpath. So, that is why in your case, it says the
following:

>    [ejbjar] Mapped publicId -//Sun Microsystems, Inc.//DTD Enterprise
> JavaBeans
> 1.1//EN to resource /weblogic/ejb20/dd/xml/ejb11-jar.dtd

It has mapped it to a resource - automagically.

Conor


Re: Using EJB Task

Posted by T Master <tm...@iknowledgeinc.com>.
Conor,

I used the nested DTD element, and it couldn't find the local DTD.  Not sure
if something was wrong if my setup though.
It did try mapping to a weblogic DTD, however that does not exist on my
filesystem.
I downloaded the DTDs, and referred to them using the DTD elements.  I use
ant1.4 beta2.

The verbose output extract is:
deploy:
   [ejbjar] 1 deployment descriptors located.
   [ejbjar] Mapped publicId -//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans
1.1//EN to resource /weblogic/ejb20/dd/xml/ejb11-jar.dtd
   [ejbjar] Mapped publicId -//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans
2.0//EN to resource /weblogic/ejb20/dd/xml/ejb20-jar.dtd
   [ejbjar] Resolved -//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
2.0//EN
 to local resource /weblogic/ejb20/dd/xml/ejb20-jar.dtd
   [ejbjar] The old method for locating CMP files has been DEPRECATED.
   [ejbjar] Please adjust your weblogic descriptor and set newCMP="true" to
use
the new CMP descriptor inclusion mechanism.



    <target name="deploy" depends="init, compileProject, jarException,
jarResource, jarState">
        <ejbjar descriptordir="${src.dir}/${project.path.ejb}"
                srcdir="${build.dir}"
                basejarname="AppServer-Deploy">
            <weblogic destdir="${domain.applications.dir}"
                      keepgeneric="false"
                      rebuild="false"
                      newCMP="false">
                <classpath refid="project.class.path"/>
                <wlclasspath refid="ejb.descriptor.build.classpath"/>
            </weblogic>
            <include name="ejb-jar.xml"/>
            <exclude name="weblogic-ejb-jar.xml"/>
            <support dir="${build.dir}">
                <include name="${project.path}/**/*.class"/>
                <exclude name="${project.path}/**/*Test.class"/>
            </support>
           <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN"
                location="${buildfile.dir}/ejb-jar_1_1.dtd"/>
           <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN"
                location="${buildfile.dir}/weblogic-ejb-jar_5_1_0.dtd"/>
           <!--dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 6.0.0
EJB//EN"
                location="${buildfile.dir}/weblogic-ejb-jar_6_0.dtd"/-->
        </ejbjar>
     </target>


T Master.

----- Original Message -----
From: "Conor MacNeill" <co...@cortexebusiness.com.au>
To: <an...@jakarta.apache.org>
Sent: Tuesday, August 28, 2001 8:16 AM
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
> >
>


Re: Using EJB Task

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
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
>