cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the activation library on SAP J2EE Engine

Former Member
0 Kudos

Hi my friends:

This post is referent to a note and their solution, but the solution is not clearly:

Symptom:

One wants to use the activation library provided together with the j2ee engine from an own library.

Reason and Prerequisites:

One wants to use the activation library from an own library but a ClassNotFound Exception or a NoClassDefFoundError keeps showing up.

Solution:

For J2EE Engine 6.30/6.40:

To avoid the above mentioned exceptions one has to specify circular references between the activation library and the specific resource. When the engine's classloading system sees such references it creates a common loader for these resources and avoids the issue.

Some one knows how to do circular references in my program????,

i can use web applications or web dynpro with SAP Developer Studio Kit.

thnsk Forum

Joshua

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Java code needs jar (class files) during

1. Compile (build) time

2. Run Time.

In the scenario you have mentioned the activation jar need to be made available on the NWDS for build reference and the j2ee activation jar should be reference during runtime.

Incase of webdynpro project you can add the activation jar to the project as an external jar file on Java Build Path.

For more info on 'Circular Reference' refer

http://en.wikipedia.org/wiki/Circular_reference

Hope that helps.

Regards,

S.Divakar

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Specifying circular reference means that you have to add to your library component provider.xml this:

<references>

<reference type="library" strength="weak">

activation

</reference>

and to the activation library provider.xml this:

<references>

<reference type="library" strength="weak">

yourLibName

</reference>

Then you need to redeploy both sda-s, however doing this is not advisable. It is better to move the code that uses activation library in an application component, that will have all the needed references automatically.

Myriana

Former Member
0 Kudos

Hi Myriana:

Thanks for your response, i want to ask you, where can i found the provider.xml files ?

Thnks again.

Joshua

Former Member
0 Kudos

Hi,

This is the info from help.sap.com on libraries and how provider.xml sjould look like:

http://help.sap.com/saphelp_nw2004s/helpdata/en/16/df813e77d46245e10000000a114084/content.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/2ade3fc6c6ec06e10000000a1550b0/content.htm

this is the dtd:

http://help.sap.com/saphelp_nw2004s/helpdata/en/09/5d963be736904c96cbdfe93793eb42/content.htm

The file itslef is located in the library archive in server folder usually.

I hope this helps.

Greetings, Myriana