cancel
Showing results for 
Search instead for 
Did you mean: 

Adding libs to ejb.jar

Former Member
0 Kudos

Hi together !

Does anyone know how to add various other jars to the deployable XYZejb.jar generated by NW Dev Studio. I would like to add Log4J for instance.

I tried to add by Add/Remove Additional Libraries within the J2EE Dev Perspective / J2EE Explorer, jars already included to the project within the Java Perspective.

I know that I could generate the jar by Ant on my own, but that seems not to be straightforeward.

Help appreciated, thankxx in advance

Matthias

Accepted Solutions (1)

Accepted Solutions (1)

SvetoManolov
Employee
Employee
0 Kudos

Hi Matthias,

in fact additional jars should not be packed in the ejb jar, but in the ear (the application archive).

Concerning the Log4J I would recommend using the SAP Logging framework as having a common logging mechanism for both applications and Engine components will make the supportability much easier.

Anyway, if you insist on using Log4J my advice will be either to deploy it as a J2EE Engine library and declare a reference from the application to the library or pack the jar into the applicaiton archive (the ear file).

HTH

Regards,

Svetoslav

Former Member
0 Kudos

Hi Svetoslav !

You're right, I mixed up war with jar (sorry for that) where I have a distinct subdir for additional libs.

Anyway " to deploy it as a J2EE Engine library" is done how ?? Within JBoss for instance you simply copy it to a lib directory but what about WebAS ?

Thx

Matthias

SvetoManolov
Employee
Employee
0 Kudos

Hi Matthias,

I think these are the documents you need:

http://help.sap.com/saphelp_nw04/helpdata/en/9f/2ade3fc6c6ec06e10000000a1550b0/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/0c/86b46fae4039428760a11890d2a14a/frameset.htm

They should describe how to develop, pack, deploy and administer WebAS libraries. It is not that easy as just copying a jar to the lib directory, as libraries usually have runtime references to other libraries, which need to be declared.

Regards,

Svetoslav

Former Member
0 Kudos

Cheers, I'll try this !

Regards

M.

Former Member
0 Kudos

I have a very similar issue.

In that example, how to prepend the log4j to the classpath so that the right lib is loaded and not the one defaulting in the application server.

Antoine

Answers (0)