ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "T Master" <tmas...@iknowledge.com>
Subject Re: Problem with ejbjar, log4j
Date Thu, 14 Feb 2002 20:38:32 GMT
This is what i do in my build file  within an <ejbjar>  tag.

            <weblogic destdir="${dist.dir}"
                      keepgeneric="false"
                      rebuild="false"
                      newCMP="false">
                <classpath path="${build.dir}"/>
                <classpath path="${lib.dir}/weblogic.jar"/>
                <classpath path="${lib.dir}/log4j.jar"/>
                <wlclasspath path="${lib.dir}/log4j.jar"/>
                <wlclasspath path="${lib.dir}/weblogic.jar"/>
            </weblogic>

Works nicely for me.

T Master

----- Original Message ----- 
From: "Molitor, Stephen" <SMolitor@erac.com>
To: "'Ant Users List'" <ant-user@jakarta.apache.org>
Sent: Thursday, February 14, 2002 1:27 PM
Subject: Problem with ejbjar, log4j


> I'm having trouble using the ejbjar task to build EJB's that use Log4J.  I'm
> using Ant 1.4, with WebLogic 5.1.  I get an error that says:
> 
> java.lang.NoClassDefFoundError: Lorg/apache/log4j/Category;
> 
> I do have log4j.jar in my classpath.  For grins, I also put log4j.jar under
> ant/lib.  'Lorg' is not mentioned anywhere in my classpath.  Any ideas?
> Thanks!  Here's the complete error message, followed by the snippet from our
> build.xml file that invokes ejbjar:
> 
> ejb_jar:
>    [ejbjar] building CompPlanEJB.jar with 12 files
>      [ejbc] java.lang.NoClassDefFoundError: Lorg/apache/log4j/Category;
>      [ejbc]     at java.lang.Class.getFields0(Native Method)
>      [ejbc]     at java.lang.Class.getDeclaredFields(Class.java:998)
>      [ejbc]     at
> weblogic.ejb.compliance.BeanClassChecker.checkEJBContextIsNotTransient(BeanC
> lassChecker.java:271)
>      [ejbc]     at java.lang.reflect.Method.invoke(Native Method)
>      [ejbc]     at
> weblogic.ejb.compliance.EJB11ComplianceChecker.checkEJB(EJB11ComplianceCheck
> er.java:107)
>      [ejbc]     at
> weblogic.ejb.compliance.EJB11ComplianceChecker.checkDeploymentUnit(EJB11Comp
> lianceChecker.java:87)
>      [ejbc]     at
> weblogic.ejb.ejbc.EJBCompiler.complianceCheckJar(EJBCompiler.java:302)
>      [ejbc]     at
> weblogic.ejb.ejbc.EJBCompiler.checkCompliance(EJBCompiler.java:251)
>      [ejbc] [EJB]: Unexpected exception java.lang.NoClassDefFoundError:
> Lorg/apache/log4j/Category;
>      [ejbc]     at
> weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:159)
>      [ejbc]     at weblogic.ejbc.runBody(ejbc.java:307)
>      [ejbc]     at weblogic.utils.compiler.Tool.run(Tool.java:80)
>      [ejbc]     at weblogic.ejbc.main(ejbc.java:353)
>      [ejbc] java.lang.NoClassDefFoundError: Lorg/apache/log4j/Category;
>      [ejbc]     at java.lang.Class.getFields0(Native Method)
>      [ejbc]     at java.lang.Class.getDeclaredFields(Class.java:998)
>      [ejbc]     at
> weblogic.ejb.compliance.BeanClassChecker.checkEJBContextIsNotTransient(BeanC
> lassChecker.java:271)
>      [ejbc]     at java.lang.reflect.Method.invoke(Native Method)
>      [ejbc]     at
> weblogic.ejb.compliance.EJB11ComplianceChecker.checkEJB(EJB11ComplianceCheck
> er.java:107)
>      [ejbc]     at
> weblogic.ejb.compliance.EJB11ComplianceChecker.checkDeploymentUnit(EJB11Comp
> lianceChecker.java:87)
>      [ejbc] [EJB]: Unexpected exception java.lang.NoClassDefFoundError:
> Lorg/apache/log4j/Category;
>      [ejbc]     at
> weblogic.ejb.ejbc.EJBCompiler.complianceCheckJar(EJBCompiler.java:302)
>      [ejbc]     at
> weblogic.ejb.ejbc.EJBCompiler.checkCompliance(EJBCompiler.java:251)
>      [ejbc]     at
> weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:159)
>      [ejbc]     at weblogic.ejbc.runBody(ejbc.java:307)
>      [ejbc]     at weblogic.utils.compiler.Tool.run(Tool.java:80)
>      [ejbc]     at weblogic.ejbc.main(ejbc.java:353)
>      [ejbc] [EJB]: Creating output
> jar:D:\javaweb\fleetservices\edgeweb\working\dist\ejb\CompPlanEJB.jar
> 
> 
> Our ejbjar target:
> 
>  <target name="ejb_jar" depends="init,fsys_jar,compile_source"
>           description="builds the jar file for ejb">
>           <ejbjar srcdir="${build_dir}"
>                   descriptordir="${webapps_dir}/commissions/META-INF"
>                   classpath="${edgeweb_classpath}"
>                   basejarname="${ejb_jar_name}">      
>             <weblogic destdir="${ejb_jar_dir}"                      
>                       compiler="javac"
>                       classpath="${edgeweb_classpath}"
>                       keepgenerated="true"/>              
>             <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN"
>  
> location="${wl_home}/classes/weblogic/ejb/deployment/xml/weblogic-ejb-jar.dt
> d"/>
>            </ejbjar>
>   </target> 
> 
> 
> Thanks!  
> 
> Steve Molitor
> smolitor@erac.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>


Mime
View raw message