cancel
Showing results for 
Search instead for 
Did you mean: 

problem with NetWeaver 2004s EAR classpath for EJB

Former Member
0 Kudos

I'm working with SAP NetWeaver Developer Studio Version: 7.0.09.

I am trying to reference additional JARs from an EJB at runtime in the J2EE engine. I have added the additional JARs to my EAR project (I have a separate EJB module project) through "Properties/Archive Build Info." Then I have updated my EAR classpath by double-clicking on the application-j2ee-engine.xml and selecting Expert settings then specify a list of JAR's in the "Additional classpath" field as such: "log4j-1_2_8.jar, basis-test.jar,commons-beanutils-bean-collections.jar,commons-beanutils-core.jar,commons-beanutils.jar" Then I build the Application Archive (the EAR) and deploy to the J2EE Engine.

This is what my application-j2ee-engine.xml in my EAR looks like:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">

<application-j2ee-engine>

<classpath>log4j-1_2_8.jar, basis-test.jar,commons-beanutils-bean-collections.jar,commons-beanutils-core.jar,commons-beanutils.jar</classpath>

<provider-name>sap.com</provider-name>

<fail-over-enable

mode="disable"/>

</application-j2ee-engine>

Then when I run my client code against the EJB (actually through a web service) I get an error in the log -- a "NoClassDefFoundError" on the log4j-1_2_8.jar file from a log4j call:

EntryPoint: [/SalesOrderCalculation/Config1]. Implementation exception occurs. Please check implementation container(e.g. EJB) logs for additional information! com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method calculateOrder.->java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

Why is my EJB not finding the jar file even though I add it to the EAR and specify the additional classpath for the EAR?

Edited by: Juan Reyes on Jul 30, 2008 9:08 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

JPReyes
Active Contributor
0 Kudos

Removed the word URGENT from your subject.

Please read the "Rules of Engagement"

torsten_blank2
Participant
0 Kudos

I have maybe the same error in different project, but found no answer... can anyone help? I opened a new thread for that with details...