I am trying to use Hibernate with a SAP Portal Application developed using the SAP Component Model.
I have read alot of information (some is conflicting) and cannot get it to work. Hopefully someone out there can explain as SAP does not seem to provide a clear enough recipe.
Obviously I am not understanding the technlogy correctly and need some help to fill in the gaps.
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)
- since an External Library DC is not deployable, need to wrap it into another DC that is deployable
- added "ebuslib" assembly PP as Used DC (build only)
- Built "ebuslib2" DC
- can see jars in the resulting sda file.
- activated activity
- confirmed on J2EE engine deployed library containing the jars.
Scenarios
A. EP Project DC 1
- I added "ebuslib" compile PP as Used DC to ensure EP DC can compile.
- Deployed EP DC
- Runtime Error cannot find one of the Hibernate classes which tells me it cannot find the J2EE Library I deployed.
B. EP Project DC 2
- 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.
- Do I need to create a PP in for the "ebuslib2" DC? I do not see anything to add to PP since jars are from used DC.
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