ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Louis, Erwin" <erwin.jean-lo...@gs.com>
Subject RE: Problem with ejbjar, log4j
Date Thu, 14 Feb 2002 20:56:20 GMT

Make sure you are also using the right version of log4j.
We had the same problem and we found out we were using the old log4j (the
one without apache in the package name)



-----Original Message-----
From: Eddie Bernard [mailto:ebernard@digitalthink.com]
Sent: Thursday, February 14, 2002 3:45 PM
To: 'Ant Users List'
Subject: RE: Problem with ejbjar, log4j


Could you provide output of the run using the -debug option and also provide
the snippet of the build.xml target?

I suspect that the weblogic classpath is not configured correctly, however
this output will confirm it.

-----Original Message-----
From: Molitor, Stephen [mailto:SMolitor@erac.com]
Sent: Thursday, February 14, 2002 12:28 PM
To: 'Ant Users List'
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>

--
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