Skip to Content
avatar image
Former Member

How to use the activation library on SAP J2EE Engine

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    May 01, 2006 at 05:46 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 02, 2006 at 06:58 AM

    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

    Add comment
    10|10000 characters needed characters exceeded