cancel
Showing results for 
Search instead for 
Did you mean: 

Cant integrate external Java Libs to a DC

Former Member
0 Kudos

Hi everybody,

it seems i am not able to integrate some external librarys (from the cactus framework) into a DC of type 'J2EE->Webmodule'.

When adding them via the Properties to the Buildpath and then doing a Build on the component, all added libs are removed automatically.

Is there another way to integrate external libs for example as a seperate component?

Has anyone experience with using the Cactus Testing Framework with Netweaver?

Thanks alot for any advise.

Norbert Schollum

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Norbert,

you need to deploy the archives in a Library Server Component and then reference this component from your application in order to be able to use it. Please check the documentation for details.

Best Regards,

André

Former Member
0 Kudos

Thanks for the advise.

But i am missing the file server/provider.xml in the DC Version of the J2EE Library Project.

I cannot find any way to add some JARS to the Library Component. How does this work?

thanks for any hint.

Norbert

Former Member
0 Kudos

Did you read the corresponding documentation:

http://help.sap.com/saphelp_nw04/helpdata/en/7a/6fde3f7bc1eb06e10000000a1550b0/frameset.htm

Maybe you'll find the answer to your questions there?!

Former Member
0 Kudos

ok it worked now - finally

thanks for your help

Norbert

Former Member
0 Kudos

Hi again,

unfortunately it only worked when doing it with local DCs.

I put the external JARs into the META-INF - that was the only way to make them available as public part.

when trying to do this in the DTR it seems to be a problem.

i found no description in the documentation.

what is the correct way to put external JARs into a DC and make them available as public parts?

When doing it with JARs in META-Inf and making them public, the build log from the server says:

[echo] No SDA archive is created (because nothing was found to package).

Note: Please define dependencies to assembly public part(s) of other DCs to create a SDA.

Is this a problem?

Thanks

Norbert

Message was edited by: Norbert Schollum

Former Member
0 Kudos

Hi Norbert,

assume you have a Java DC project with some classes you want to assemble in a library. Then it's possible to define two different public parts for this DC, let's call them "compilation.pp" and "assemble.pp". Both public parts probably will have the same entities exposed, but in the case of "assemble.pp" the property "Can be packaged into other build results..." (the internal type is assembly them) must be activated.

Building your library you refer to the "assemble.pp" under Used DCs. The DC build of the library will transfer (copy) the jar files as library content.

Referencing the classes at designtime can be done by referencing the "compilation.pp" in the using DC. Referencing the classes at runtime is possible by adding a library reference.

This should work for external jars and classes of jars created by your own.

Hope that helps.

Regards

Stefan

Message was edited by: Stefan Klensch

Former Member
0 Kudos

hi stefan,

thanks for the answer.

i made the JARs available now in the lib-dc.

in another DC i tried to make use of them. but looking in properties => libraries on the project the JARs are not there.

could this be because both DCs are not activated jet in the DTR, because there seems to be a problem with our configuration?

thanks

norbert

Former Member
0 Kudos

Hi Norbert,

you should be able to add the new library under Properties->Set additional libraries. This works at least using the LocalDevelopment "configuration". Unfortunately i don't have that much experience regarding DTR. Maybe somebody else can help you out of there.

Regards

Stefan

Former Member
0 Kudos

Hello again

i am still not happy when trying to add external JARs to a Library DC.

I found the following Solution:

- Create a local Web Module DC

- import the external JARs into the WebContent Folder

- Create a Public Part for Assemby and adding the JARs

- Creating a local "J2EE Server Component => Library"

- Using the PublicPart of the Web Module DC

- Build

- There is a SDA File

but: the external JARs now reside inside one packed JAR.

is this the only solution for integrating external JARs into a Library DC Project ?

thanks

Norbert

Former Member
0 Kudos

Hi Norbert.

A solution I found that works is to extract the contents of the .jar file into the uncompressed folder structure and adding the resulting file system and classes into a DC Library component.

A tool like WinRar will decompress the .jar files, then you just need to include the folders generated into your packages / source directories.