on 07-28-2008 10:51 PM
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
Removed the word URGENT from your subject.
Please read the "Rules of Engagement"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.