Skip to Content
avatar image
Former Member

Confusion about third-party-libraries in different versions in CE 71.

Hi

After some research on the use of different versions of third-party-libraries in SAP netweaver CE 7.1, I am actually quite confused and would be happy if someone could shed a light on that subject....

1. Is there a way to tell netweaver CE 7.1 to use a library in my WEB-INFlib-folder by simple configuration?

E.g. we would like to use a third-party-lib in a newer version than the one which is loaded by CE 7.1. Many application server provide a simple configuration option (e.g inside META-INFapplication.xml) where the web as can be forced to use the library inside WEB-INFlib for this application.

2.Is the concept of "heavy loading" described in a blog by Georgi Danov(Using Hibernate in SAP NetWeaver Composition Environment) the answer to question 1.?

Does it also work for other third-party-libraries than hibernate? Does it work at all?

3. In the blog mentioned in question 2, Mr. Danov is talking about "shared libraries". Does this mean, that I have to forget everything about "bundled" and "standard" libraries explained in help.sap.com/CE, if I want to create a heavy loader?

He is referencing another blog (Applications and shared libraries) which is two years old? Can I still apply the information there to CE?

4. Are "Bundled libraries" applicable when using different versions of third-party-libraries in CE 7.1?

In "Working with libraries" (http://help.sap.com/saphelp_nwce10/helpdata/en/44/f4e00e56ec0486e10000000a155369/frameset.htm) it says:

"Bundled libraries: These provide resources only to a single enterprise application, and are packed inside the application's EAR file."

=>As I want to provide the lib only to my enterprise application, I will probably have to create a bundled library, right? Does this also work if netweaver CE 7.1 uses a different version of the same library?

5. Do I need Netweaver Developer Studio for creating "bundled" libraries?

Or can I copy the binaries in the WEB-INFlib-folder of my application, deploy it and use it?

6. Is configuration of application-j2ee-engine.xml the right place to reference a third-party-library in a specific version which exists in WEB-INF/lib-folder in my application even if it exists also in another version on netweaver?

=> In the document "Troubleshooting: Finding Missing Parent-Child Relations" it says: "To implement the chain of parent-child relations in the deployment descriptor of the component, use either application-j2ee-engine.xml (for applications) or provider.xml (for libraries and services)."

=> "Creating standard libraries" (http://help.sap.com/saphelp_nwce10/helpdata/en/44/f447a8d62b0484e10000000a155369/frameset.htm9 tells me, that I have to configure the file application-j2ee-engine.xml, too.

=> But in "Working with libraries" (http://help.sap.com/saphelp_nwce10/helpdata/en/44/f4e00e56ec0486e10000000a155369/frameset.htm) it says:

"Standard libraries: These provide resources to all enterprise applications deployed on the server. They are packed in EAR files like the enterprise applications."

=> Does this mean, that I have to force Netweaver CE 7.1 to use a higher version of a certain third-party-library? Does this even work? Do all applications deployed on Netweaver 7.1 have to use this library in the higher version?

It is really confusing to read through the documentation!!! Sorry for that avalanche of questions, but I really hope it will make the issue of using libraries (especially if they exist in different versions on the CE 7.1) a little clearer!

Best regards

Bettina

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 03, 2008 at 05:13 PM

    Hi Bettina,

    I'll try to answer your questions:

    >

    > Hi

    >

    > After some research on the use of different versions of third-party-libraries in SAP netweaver CE 7.1, I am actually quite confused and would be happy if someone could shed a light on that subject....

    >

    > 1. Is there a way to tell netweaver CE 7.1 to use a library in my WEB-INFlib-folder by simple configuration?

    >

    > E.g. we would like to use a third-party-lib in a newer version than the one which is loaded by CE 7.1. Many application server provide a simple configuration option (e.g inside META-INFapplication.xml) where the web as can be forced to use the library inside WEB-INFlib for this application.

    >

    First of all, the appropriate docs are here: [http://help.sap.com/saphelp_nwce10/helpdata/en/44/f4e00e56ec0486e10000000a155369/frameset.htm|http://help.sap.com/saphelp_nwce10/helpdata/en/44/f4e00e56ec0486e10000000a155369/frameset.htm].

    Basically what you do is define a lib project in the studio and deploy it do the server. This may be less comfortable then just configuring manually, therefore it work better in larger environments because the server checks that libs are available in all running instances - which it could not do if you manipulate diretories manually (an approach you should never attempt in any SAP envrionment)

    > 2.Is the concept of "heavy loading" described in a blog by Georgi Danov(Using Hibernate in SAP NetWeaver Composition Environment) the answer to question 1.?

    >

    > Does it also work for other third-party-libraries than hibernate? Does it work at all?

    >

    If Georgi describes it, I hope so, as he is one of our developers who knows best.

    > 3. In the blog mentioned in question 2, Mr. Danov is talking about "shared libraries". Does this mean, that I have to forget everything about "bundled" and "standard" libraries explained in help.sap.com/CE, if I want to create a heavy loader?

    >

    "shared" are all of theses libs, as otherwise they would be specific to an application.

    > He is referencing another blog (Applications and shared libraries) which is two years old? Can I still apply the information there to CE?

    >

    This was about anearly version of CE and even Georgi updated the blog this year to talk about slight differences. So yes, this still applies.

    > 4. Are "Bundled libraries" applicable when using different versions of third-party-libraries in CE 7.1?

    >

    > In "Working with libraries" (http://help.sap.com/saphelp_nwce10/helpdata/en/44/f4e00e56ec0486e10000000a155369/frameset.htm) it says:

    >

    > "Bundled libraries: These provide resources only to a single enterprise application, and are packed inside the application's EAR file."

    >

    > =>As I want to provide the lib only to my enterprise application, I will probably have to create a bundled library, right? Does this also work if netweaver CE 7.1 uses a different version of the same library?

    >

    That depends... Your application uses it's own classloader which means it should only use your libs in case there is another version available on the server. But if you're trying to deploy a lib that is used by a service of the server (int that case loaded by the server not your classloader!) I'm not so sure.

    > 5. Do I need Netweaver Developer Studio for creating "bundled" libraries?

    >

    > Or can I copy the binaries in the WEB-INFlib-folder of my application, deploy it and use it?

    >

    You need the Studio. No way around that. [Edit:] Sorry, misunderstood you here: I thought you want to copy something into the deployed directory on the server! - Of course, any deployment method would do it and though copying binaries seems to be valid. However, I'm checking this currently with development in detail.

    > 6. Is configuration of application-j2ee-engine.xml the right place to reference a third-party-library in a specific version which exists in WEB-INF/lib-folder in my application even if it exists also in another version on netweaver?

    >

    > => In the document "Troubleshooting: Finding Missing Parent-Child Relations" it says: "To implement the chain of parent-child relations in the deployment descriptor of the component, use either application-j2ee-engine.xml (for applications) or provider.xml (for libraries and services)."

    >

    > => "Creating standard libraries" (http://help.sap.com/saphelp_nwce10/helpdata/en/44/f447a8d62b0484e10000000a155369/frameset.htm9 tells me, that I have to configure the file application-j2ee-engine.xml, too.

    >

    > => But in "Working with libraries" (http://help.sap.com/saphelp_nwce10/helpdata/en/44/f4e00e56ec0486e10000000a155369/frameset.htm) it says:

    >

    > "Standard libraries: These provide resources to all enterprise applications deployed on the server. They are packed in EAR files like the enterprise applications."

    >

    > => Does this mean, that I have to force Netweaver CE 7.1 to use a higher version of a certain third-party-library? Does this even work? Do all applications deployed on Netweaver 7.1 have to use this library in the higher version?

    >

    >

    >

    > It is really confusing to read through the documentation!!! Sorry for that avalanche of questions, but I really hope it will make the issue of using libraries (especially if they exist in different versions on the CE 7.1) a little clearer!

    >

    > Best regards

    > Bettina

    Could you tell me what you're trying to deploy? I'll try to get Georgi on this....

    Regards,

    Benny

    Edited by: Benny Schaich-Lebek on Nov 5, 2008 1:40 PM

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Benny Schaich-Lebek

      Hi Benny!

      Thanks for the clarification. We have already been using the component model in other projects (if you mean this: http://help.sap.com/saphelp_NW04/helpdata/en/1c/bca99c220c0e45a1cae3c4cccf4346/frameset.htm), so am familiar with it.

      In this particular project the "heavy loader" creation seems to be working according to what is described in Georgi Danovs blog and another helpful thread (using-hibernate3-with-netweaver-ce), although I cannot confirm this, because there are still other errors concerning the migration to CE 7.1.

      One thing, however, seems to be clear now : If you want to use a special library on CE 7.1., which the CE 7.1 is using as well (but in a different version), you have to use heavy loading and change your EAR (move libraries to special lib-Folder etc.) OR you have to use NWDS and library DC.

      Kind regards

      Bettina

  • avatar image
    Former Member
    Oct 23, 2008 at 01:27 PM

    Bettina,

    Just thought that I would share my experiences with third-party-libraries in SAP netweaver CE 7.1 and prior releases (NW04s).

    I have been using the External Library DCs whenever there is a need for the application to use third-party-libraries. This has been working quite well and has worked in almost all the applications I've developed. I have put up a [blog|Bid adieu to bots - using CAPTCHAs] showcasing the same. It explains the third-party-library usage in WebDynpro in NW04s. However, the same works well with EJB DCs, WebDynpro DCs.,. both in NW04s and CE.

    May be you can give it a try, in your web (JSF) project..

    Updated: Another good example can be found [here|How to use Log4j with SAP NetWeaver CE to notify you via email when errors occur]

    Bala

    Edited by: BalaKrishnan on Oct 31, 2008 11:28 AM

    Add comment
    10|10000 characters needed characters exceeded