cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a runtime library reference from a J2EE library DC?

Former Member
0 Kudos

I've created a J2EE library DC that references some classes in an already deployed library. The referenced jar file has been correctly deployed, as it's successfully used by some other components. I can build the DC, since I've created created a compile-time reference to the local copy of the target jar file.

Unfortunately, I can't figure out how to create a runtime reference from my J2EE library to the already deployed library - there just doesn't appear to be any place to put the reference, at least using a gui-based function in NWDS. Unlike WebDynpro, which has a 'references' configuration option, J2EE lib's don't appear to have anything similar.

Where/How can I do this?

BTW, the Visual Administrator function 'ClassLoader Viewer ' is a very handy tool for diagnosing ClassDefNotFoundError errors....

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hello Ken,

well it seems to be not a trivial thing.

1) Build your library DC.

2) Create folder "server" in root DC folder "_comp".

3) Extract provider.xml from generated SDA file to "server" folder.

4) Add references in provider.xml:

    <references>
      <reference type="library" strength="weak">
        sapxmltoolkit
      </reference>
      <reference type="library" strength="weak">
        com.sap.lcr.api.cimclient
      </reference>
      <reference type="service" strength="weak">
        tc~sec~securestorage~service
      </reference>
    </references>

5) Rebuild DC. Deploy.

6) Enjoy!

Useful links:

http://help.sap.com/saphelp_webas630/helpdata/en/b5/22123b8d92294fac207283f3e8756e/content.htm

http://help.sap.com/saphelp_webas630/helpdata/en/09/5d963be736904c96cbdfe93793eb42/TEMPLATE_image002...

Best regards, Maksim Rashchynski

Former Member
0 Kudos

I'll give it a shot!

BTW, I would grant points, but the points radio buttons are gone from the message list....sorry 'bout that!

former_member182372
Active Contributor
0 Kudos

May be it is because SDN was down for sometime and some of functionality were not available.

Former Member
0 Kudos

Yeah, it might have something to do with it - it's still broken.

I just implemented what you suggested, and it appears that the reference has been correctly defined, at least as shown in the Visual Administrator. I'll try to use the library from an application and see if there are any ClassNotFound exceptions.

Thanks Maksim!

Former Member
0 Kudos

Points have been granted....I did test the solution, and it did work as described. Bit of a pain tho, but a decent enough workaround until something better comes along.

Former Member
0 Kudos

Hi,

I am also doing same kind of scenario. I created a Java DC, where I am using KM APIs to upload a document into KM repository. I attached that Java DC to J2EE Library DC and deployed it. It is succefull. When I go to Guided Procedure and create a background execution callable object, its giving some error java.lang.NoClassDefFoundError: com/sapportals/portal/security/usermanagement/UserManagementException. I have to give sharing reference of KM, If we do through web dynpro, we give sharing reference for that application.I am unable to do so with the suggested procedure above.

Can you guys please suggest me what to do?

Thanks

Answers (0)