cancel
Showing results for 
Search instead for 
Did you mean: 

How to Specify the EAR leve classloader

Former Member
0 Kudos

Hi All,

I'm currently using NetWeaver 04' SP11.

I was wondering if someone could tell me if the EAR level classloader is Parent-First or Application-First.

Is there a way I can specify which one I would like to use in my application?

We have upgraded the Apache AXIS When I try to access the AXIS servlet, I get a IncompatibleClassChangeError, which leads me to believe that I'm picking up the from libraries belongs parent-First classloader and not from application specific libraries i.e. upgraded.

Is there any way to specify which ear level classloader I have to use?

Regards,

Chandan

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member698570
Active Participant
0 Kudos

Hi,

I had a similar problem concerning the classloader and I'm quite sure that the classloader uses the parent classes which means that if your application comes with libraries that are newer than the ones used within the WEBAS your application might not work if it uses new functions that are not available in the libraries provided by SAP. I had this problem with javamail.

There is a newer API but the SAP WEB AS comes with the API in version 1.3. My Enterprise application instead was designed to work with the 1.4 version (there were new methods in here) and always failed with exceptions when trying to access these methods since the classloader already loaded the classes shipped with the WEB AS. I also posted this error to SAP and asked for a solution on how to use my newer library that is kept in the lib directory of the application but I could not solve the issue and I finally decided to exchange the jar-file in the appropriate WEB AS directory by replacing it with the newer one.

Cheers

Edited by: Marcel Tricarico on Jun 26, 2008 4:28 PM

Former Member
0 Kudos

Thanks Marcel Tricarico ,

Actually our project is in the production enviornment where client has its own NetWeaver setup. We cannot force client to include the newer jars into WEBAS.

I had also tried a lot to solve this problem but could not do it.

There must be some to solution to this. Is not it?

I am also going to open a message with SAP OSS. I will let you know if I find some solution. Meanwhile if you have any suggestion or solution , please guide us.

Thanks,

Chandan

Former Member
0 Kudos

Hi Marcel,

I am facing some difficulty while creating the OSS message.

I am not able to understand which component I should choose to create message.

To send any machine following are the steps.

1) choose the system: I have selected the system

2) Prepare solution search: In this option, you need to select the component. Here i am not understanding which component I should select in order to create the message.

Can you guide on this?

Regards,

Chandan

former_member698570
Active Participant
0 Kudos

Hi again,

I used the following system to open the message BC-JAS:

I had a look at my OSS Call and this is the SAP Support directed me to the following note:

Note 990854 - Class conflicts with third party libraries on J2EE Engine

I did not really understand what the note was talking about and I coul not solve my problem but

maybe you are lucky...

Hope it helps

Cheers

Former Member
0 Kudos

Hi Marcel,

Yesterday, I received the response from SAP. They have also directed me to the same sap note i.e.990854. I also didnot understand it clearly :). But whatever is mentioned in the note is not possible for us in current situation. It expects some implementation. Right now, we donot know anything about it. So instead of wasting the time on this, we have come up with solution by overriding the jar file in the netweaver with latest jars from our application.

If you could solve this problem by any method in future then kindly let us know.

Regards,

Chandan

former_member185954
Active Contributor
0 Kudos

Hello Chandan/Marcel,

I suggest that you raise this to SAP again that the note they specify does not help.

Maybe you can raise this topic in the Community Coffee Corner forums.

Over there you have SAP Employees responding quickly to posts, they might pick it up and god knows maybe they might come up with a new note or something.

Personally i do not prefer overwriting sap's own code with my code for the sake of obvious dependencies that my exist!

Regards,

Siddhesh

Former Member
0 Kudos

Hi All,

If we upgrade Netweaver setup to NW 7.1 or NW 7.1.1 , will it solve my problem? Does these version supports Axis 1.4.?

If yes, we can upgrade Netweaver setup to required one.

currently we are using Netweaver 04s.

Regards,

Chandan

Former Member
0 Kudos

Hello,

nope, the problem will persist. CE still follows the same class loading principle (delegation). AFAIR this is the default in J2EE Application Servers, although the spec does not define anything. As a workaround you could always use your own classloader to load the classes in question (extend URLClassLoader and just overwrite the loadClass method to change the parent-child precedence).

As for Axis 1.4: You can access an Axis 1.4 web service with the new SAP web service client libraries as long as they use Document Style, RPC is no longer supported. AFAIK SAP does not use Axis anymore as an web service implementation, they provide their own implementation.

ciao,

elm

Former Member
0 Kudos

Hi!

This was a while ago posted but anyway.

CE introduces a workaround called Heavy loaders intended to allow for solving the problem (originally as a work-around to be able to run hibernate - but should allow for other solutions as well). I'm currently working on some issues with class-loading myself at the moment and stumbled over this post ...

http://help.sap.com/saphelp_nwce10/helpdata/en/46/b902f8d0b22880e10000000a155369/frameset.htm

Regards,

Christian