cancel
Showing results for 
Search instead for 
Did you mean: 

Using 3rd party jars in Portal development using SAP Component Model

Former Member
0 Kudos
53

I am using the SAP Component Model to develop a portal application that makes uses of 3rd party apis such as Spring and Hibernate.

I have found info in these forums and elsewhere that are a few years old that indicate an approach as follows:

- create an External Library DC and put jars in this project

- for external library DC create two public parts - 1 for compilation and 1 for assembly (deploy).

- create J2EE Server Component - Library DC and add "Assembly" public part of External Library as a Used DC

- Build and deploy.

I am having trouble to get this to work. The build results of the J2EE Sever Component does not contain any jars.

Questions

- Where can I find "newer" accurate recipe of how to include 3rd party jars and have it work at runtime.

- I used the Portal DC as entry point but also have various Java DCs that also need to reference the 3rd party apis.

- Is there a concern that the same 3rd party jars can be deployed to runtime by different projects and therefore exist > 1 on runtime and cause any class loading issues?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Yes I am familiar with all those links. Let me break down scenario and ask specific questions.

Server version: Netweaver 7.0 (2004s) SP18

1. Created External Library DC (i.e. ebuslib)

- added 3rd party JARS (e.g. hibernate, Spring)

- created two public parts - one for compilation, one for assembly (deploy)

- activated activity

2. Create J2EE Server Component - Library DC (i.e. ebuslib2)

- added "ebuslib" assembly PP as Used DC (build only)

3. Built "ebuslib2"

- can see jars in the resulting sda file.

- activated activity

- confirmed on J2EE engine deployed library containing the jars.

Scenarios

A. EP Project DC

- needs access to 3rd party jars

- QUESTION: What do I need to reference? The External Library DC or the J2EE Server Component Library DC?

- I read that you should reference the J2EE Server Component BUT the jars are not available in the PP of that DC.

- One developer one talked to referenced the compilation PP of the External Library DC (i.e. "ebuslib").

- this seemed to work but then I wondered how the project finds the JAR at runtime?

QUESTION: Does SAP load all the classes that have been deployed via the J2EE Server Component Library DC method and hence those JARs are globally available at runtime hence no need to reference them during development except for compilation? What if > 1 J2EE library contain the same jar or same API but different versions (e.g. Hibernate 2 vs 3).

Thanks for any clarifications. I want to understand the underlying technology and how it works. I have seen alot of information out there but some of it is confusing and conflicting.

Dean Cyril Wood

Former Member
0 Kudos