Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
ejbjar class not found exception

ejbjar class not found exception

2003-03-21       - By Mark Wehby

   I am not sure how familiar you are Ant 1.5 and ejbjar.  Below is what my
ant target looks like.  You will notice the ugly support tag.  Let me
explain.  The entity beans in the application have a class they return
called <ejbname>ValueObject.java.  So, if I set the dependency="full", I
don't need the <support> tag because the <ejbname>ValueObject.java class is
pulled into the jar file , than the weblogic ejbc is run.  Everything works,
but I have the same .class files in all the ejbs.  When I set the
dependency="super" without the <support> tag, I get an ant exception,
NoClassDefFound for the <ejbname>ValueObject class.  I have thought of two
approaches, one is to somehow use the support tag, but I can't figure out
how to make this work in such a way that it only pulls in the specific
<ejbname>ValueObject for a given ejb, not all <ejbname>ValueObjects.  The
second approach I thought of is to somehow modify the given ejb-jar.xml file
for the ejb.  That is what the dependency tag looks at anyway.  I just can't
figure out how to modify it.


<!-- Create the ejb archive -->

<target name="ejbjar">

<echo message="*** creating ejb archives ***"/>

<ejbjar srcdir="${classes.dir}"

descriptordir="${metadata.dir}"

manifest="${metadata.dir}/MANIFEST.MF"

destdir="${ear.staging.dir}"

genericjarsuffix=".jar"

dependency="super">

<!-- <support dir="${classes.dir}" includes="**/*CompanyValue*.*"/> -->


<weblogic destdir="${ear.staging.dir}"

classpath="${classes.dir}"

wlclasspath="${jars.for.classpath}"/>

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

<dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"

location="${lib.dir}/ejb-jar_1_1.dtd"/>

<dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN"

location="${lib.dir}/weblogic-ejb-jar.dtd"/>

</ejbjar>

</target>



©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.