ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DONNIE HALE" <DH...@longaberger.com>
Subject RE: <ejbjar> for WebLogic 6.1
Date Fri, 04 Jan 2002 22:58:29 GMT
Here's the content of a related message I sent earlier this week regarding how I run WebLogic's
ejbc:

=================================================
I use Ant to build a weblogic ejb.jar file; however, I do not use the ejbjar
optional task (or whatever it's called) from Ant. I found the docs for that
set of tasks unhelpful; and, if the docs are accurate, the tasks are overly
complicated.

Here's what I have:

1) An "app.compile" target which builds all my .java sources except the
remote, home, and bean-impl classes. These are jarred into an "app.jar"
file.

2) An "ejb.compile" target builds the remote, home, and bean-impl classes
for all my beans.

3) An "ejb.jar" target uses a <jar> task to put just the .class files from
step 2, along with the ejb-jar.xml, weblogic-ejb-jar.xml, etc. into an
"ejb.jar" file.

4) An "ejb.ejbc" target uses a <java> task to run ejbc against the .jar file
from step 3, explicitly placing the "app.jar" file from step 1 in the
classpath. I name the output of that "ejb-depl.jar" to indicate that it's a
deployable .jar file.

Voila! That's it, and it works perfectly for me every time. I separate out
"app.jar" stuff from "ejb.jar" stuff because it prevents the warning about
the EJB .class files already being in the classpath. BTW, this is with
WebLogic 6.1.
=================================================

Hope that helps,

Donnie


>>> ebernard@digitalthink.com 01/04/02 05:23PM >>>
Thanks for the reply.

I did add a <support> nested element and that also did not work.  I don't
completely understand what you mean by having a class "that I named WLBean".
None of the deployment descriptors make any reference to this.

I do in fact have a bean class in the "opel.build" directory space called
TrackingBean.class, so it should be able to find it.

In fact, when I run under debug mode, it says that it's loading it from the
ant classloader.

I guess this is more of a WebLogic issue and doesn't apply to this forum but
if you or anyone else has more insight on this it would be greatly
appreciated.

Thanks again.


Cheers!
Eddie


-----Original Message-----
From: Douglas WF Acheson [mailto:dwfa@yahoo.com] 
Sent: Friday, January 04, 2002 1:50 PM
To: Ant Users List
Subject: Re: <ejbjar> for WebLogic 6.1


This error is because the class TrackingBean (I believe), which you
named WLBean, could not be found.  I have ran into this problem before
and I solved it by adding any necessary class through the support
nested element.  To determine which files are required I just kept
running the task to build and compile the ejb jar until it worked.  I
know it is the brut force method but it worked, only took about 5 mins

  What I think should happen is that introspection be done to determine
which dependent classes are needed and add them automagically.  JMO

dwfa

--- Eddie Bernard <ebernard@digitalthink.com> wrote:
> I'm trying to create an EJB using the <ejbjar> task with WebLogic
> 6.1.  I'm
> using Ant 1.4.1.
> 
> Here's the stack trace:
> ejbs:
>      [echo] --(DT)--> Generating ejbs
> Overriding previous definition of reference to
> opel.rdbms.deployment.descriptors
>    [ejbjar] building TrackingBean.jar with 6 files
>      [ejbc] weblogic.utils.AssertionError: ***** ASSERTION FAILED
> *****[
> Couldn't find a WLBean called "TrackingBean" ]
>      [ejbc]     at weblogic.utils.Debug.assert(Debug.java:84)
>      [ejbc]     at
>
weblogic.ejb20.deployer.CompositeMBeanDescriptor.initialize60(CompositeMBean
> Descriptor.java:218)
>      [ejbc]     at
>
weblogic.ejb20.deployer.CompositeMBeanDescriptor.init(CompositeMBeanDescript
> or.java:159)
>      [ejbc]     at
>
weblogic.ejb20.deployer.CompositeMBeanDescriptor.<init>(CompositeMBeanDescri
> ptor.java:152)
>      [ejbc]     at
>
weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos(MBeanDep
> loymentInfoImpl.java:393)
>      [ejbc]     at
>
weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoIm
> pl.java:126)
>      [ejbc]     at
> weblogic.ejb20.ejbc.EJBCompiler.setupEJB(EJBCompiler.java:127)
>      [ejbc]     at weblogic.ejbc20.runBody(ejbc20.java:358)
>      [ejbc]     at weblogic.utils.compiler.Tool.run(Tool.java:79)
>      [ejbc]     at weblogic.ejbc20.main(ejbc20.java:460)
>      [ejbc] Exception in thread "main" weblogic.utils.AssertionError:
> *****
> ASSERTION FAILED *****[ Couldn't find a WLBean called "TrackingBean"
> ]
>      [ejbc]     at weblogic.utils.Debug.assert(Debug.java:84)
>      [ejbc]     at
>
weblogic.ejb20.deployer.CompositeMBeanDescriptor.initialize60(CompositeMBean
> Descriptor.java:218)
>      [ejbc]     at
>
weblogic.ejb20.deployer.CompositeMBeanDescriptor.init(CompositeMBeanDescript
> or.java:159)
>      [ejbc]     at
>
weblogic.ejb20.deployer.CompositeMBeanDescriptor.<init>(CompositeMBeanDescri
> ptor.java:152)
>      [ejbc]     at
>
weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos(MBeanDep
> loymentInfoImpl.java:393)
>      [ejbc]     at
>
weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoIm
> pl.java:126)
>      [ejbc]     at
> weblogic.ejb20.ejbc.EJBCompiler.setupEJB(EJBCompiler.java:127)
>      [ejbc]     at weblogic.ejbc20.runBody(ejbc20.java:358)
>      [ejbc]     at weblogic.utils.compiler.Tool.run(Tool.java:79)
>      [ejbc]     at weblogic.ejbc20.main(ejbc20.java:460)
> 
> BUILD FAILED
> 
> /vobs/opel/build_opel.xml:170: Exception while calling
> weblogic.ejbc20.
> Details: Ejbc reported an error
> 
> Here's the snippet of my build.xml:
> 
>   <target name="ejbs"
>           depends="classes"
>           description="generates ejbs">
>     <echo message="--(DT)--> Generating ejbs"/>
>     <copy todir="${opel.build}">
>       <fileset dir="${opel.src}"
>                includes="**/ejb-jar.xml,**/weblogic-ejb-jar.xml"/>
>     </copy>
>     <copy todir="${opel.build}">
>       <fileset dir="${opel.src}">
>         <patternset id="opel.rdbms.deployment.descriptors">
>           <include name="**/*rdbms*"/>
>         </patternset>
>       </fileset>
>     </copy>
>     <ejbjar srcdir="${opel.build}"
>             descriptordir="${opel.build}"
>             classpath="${opel.classpath}"
>             naming="ejb-name"
>             flatdestdir="true">
>       <weblogic destdir="${opel.release}"
>                 keepgeneric="no"
>                 rebuild="false"
>                 classpath="${opel.classpath};${wls.classpath}"
>                 noEJBC="false"
>                 newCMP="false">
>       </weblogic>
>       <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise
> JavaBeans
> 2.0//EN"
>            location="${opel.home}/ejb-jar_2_0.dtd"/>
>       <include name="**/ejb-jar.xml"/>
>       <exclude name="**/*weblogic*.xml"/>
>     </ejbjar>
>   </target>
> 
> 
> Any ideas?  I've been staring at this for a while and I'm completely
> out of
> ideas.
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
> 


=====
Douglas WF Acheson

__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com 

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message