cancel
Showing results for 
Search instead for 
Did you mean: 

Deploying a jar file into J2EE server

Former Member
0 Kudos

Hello,

I need to deploy a few jar files I need in my jsp pages I deploy into EP 6. I'm using SAP Web AS 6.40. I tried to copy them into F:\usr\sap\DEP\JC00\j2ee\cluster\server1\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\lib folder but after restarting J2EE server, I still have an error for each import I'm doing for the classes contained in my jar files.

I also tried to pu them in PORTALINF/lib folder of my project but it doesn't work.

Does anyone have an idea ?

Thank you !

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Olivier,

you could try the following approach:

1. Package your JAR files as J2EE Engine libraries and deploy them on it as described here: <a href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/2ade3fc6c6ec06e10000000a1550b0/frameset.htm">Working with J2EE Libraries</a>.

2. Set reference to this library from the application that use them. Depending on your application, refer to the appropriate documentation:

-- reference from a J2EE app -> see <a href="http://help.sap.com/saphelp_nw04/helpdata/en/15/d5d93fe80fed06e10000000a1550b0/frameset.htm">Referencing Libraries in Applications</a>

-- reference from a portal app -> see <a href="http://help.sap.com/saphelp_nw04/helpdata/en/02/788540ae1dbb4de10000000a1550b0/frameset.htm">Referencing Elements</a>

Hope that helps!

Former Member
0 Kudos

Thanks. I did everything explained in your links but it still doesn't work, I get an error message "Could not find portal application" when I launch my component.

I deployed the library project on the portal, then I updated my portalapp.xml file in order to reference this project (<property name="PrivateSharingReference" value="SAPJ2EE:: etc.)

Did I something wrong ?

What I don't understand is that deploying a jar file is the easiest thing to do on most of the J2EE server but with WAS 6.40, it's very difficult...

Former Member
0 Kudos

Hi Olivier,

Generally, you seem to have done everything right. The only "error" possibility I can think of is the reference to the library you specified in the portalapp.xml. You need to use the Component Name you gave to your library, not the Display Name (these are set using the server/provider.xml in your Library project). Can you check if you're using the correct name?

Regards,

Ivo

Former Member
0 Kudos

No I used the correct name (same as display name)

I tried to do it an other way: I modified the classpath using the config tool. It's working for some libraries but with other libs, my server can't get started (error code) These libraries are:

- xalan.jar

- xercesImpl.jar

- xml-apis.jar

I assumed they contained classes that are already included in WAS standard libs but I can't figure out how and where. The classes I need are part of org.apache.xml.serialize package (XHTMLSerializer and OutputFormat)

I think the best solution would be to downgrade to 6.2 but I don't think my customer would agree 🐵

Former Member
0 Kudos

I finally made my application running. The problem was that the Apache libs defined classes that already were defined in a standard SAP libs (sapxmltoolkit.jar). I guess that the server can't start if a duplicate class declaration exist. So I removed duplicate classes from my libs and it's working.

The bad thing is that I had to add all my libs to the classpath using the config tool, at least it's working...

Answers (0)