Using WebSphere Application Server Shared Libraries in Rational Application Developer

Technote (FAQ)


Question

Why does specifying a Shared Library on an EAR in a WebSphere Application Server (WAS) v6.x administration (admin) console not work in v8.x, v7.x, or v6.x?

Cause

The specified shared library is not loaded when run in the EAR on WebSphere Application Server v6.x in Rational Application Developer version 8.x, v7.x or v6.x

Answer


Note: This technote applies to all Rational Application Developer versions and WebSphere Application Server versions involving use of Shared Libraries. The discussion in this case refers to Rational Application Developer v7 and WebSphere Application Server v6.0 as per the originally reported user scenario.

Background on Server Publish Settings:

The WebSphere Application Server v6.1 server settings in the Rational Application Developer v7 in the server overview editor (such as double click or right-click > open on the server in the Servers view) defaults to the setting:

> Publishing
* Run server with resources within the workspace
, and its associated
[x] Minimize application files copied to the server

while the WebSphere Application Server v6.0 setting has the option 'Minimize application files copied to the server' disabled.

This is the default setting which uses the Rational Application Developer WebSphere Application Server server tooling loose configuration capability combined with WebSphere Application Server v6.x server WebSphere Rapid Deploy capability. This will be referred to as the loose configuration scenario.

In the loose configuration scenario, the server runs the EAR application located directly from the various output folders from the projects in the workspace. Think of the server as keeping handles/pointers for your EAR (and its modules) to their location in the workspace. It also uses a combination of Eclipse/WTP and WebSphere Application Server related metadata information. It does not actually install the EAR and its modules physically to the server as for a stand-alone WebSphere Application Server V6.x server as would be done with the option:
* Run server with resources on Server

Note:
The following technote shows as an example, that in the case of WebSphere Application Serve v7 the admin console will not even show an [OK] button when attempting to associate an Shared Library to an EAR :
No confirmation when saving Shared Libraries within WebSphere Test Environment v7.0 for Rational Application Developer


Shared Library Solution:

Shared Libraries configured on an EAR in the WebSphere Application Server v6.x admin console are not completely supported unless you use: "Run server with resources on Server".

The WebSphere Application Server V6.x Administrative Console does not handle loosely-installed applications well. However, it usually will work with Shared Libraries when:

* Run server with resources within the workspace

if its associated option

[ ] Minimize application files copied to the server

is unchecked.
It is worth while attempting to clear this option, as it often works and allows you to continue to work with the rapid deployment advantages of working with the application as it in the workspace and having those changes picked up with the default auto-publish.

After making any of the above changes in the Server Overview editor, make sure to Remove your project/EAR from the server and then Add your project/EAR to the server for the new changes to take effect. It may also be necessary to restart the server.



Shared Library Recommended Practice:

Disabling/unchecking Minimize application files copied to the server with Run server with resources within the workspace is not a proper work-around. The server tools cannot guarantee what the WebSphere Application Server run time will do in these cases when they are constantly updating the EAR (that is, the relationship between the EAR and the shared library could potentially be destroyed). Once the application code/configuration is not going through many changes, it will usually work

When developing, if you really want to have a shared library in a loose-configure scenario then you should use the Enhanced EAR editor to define the shared libraries. This would be done in the EAR Deployment Descriptor editor under: Deployment Tab : Shared Libraries .
When using the Enhanced EAR there is a limitation. Application-scoped shared libraries cannot depend on application-scoped variables (==substitution variables) to specify their location. If application-scoped variables are needed to specify a shared library, select them in the admin console at the cell, node or server scope instead. If needed, consult WebSphere Application Server server support on this limitation.

When you are ready to export the EAR to an actual test/production server, you can In Rational Application Developer v6/v7 delete the {workspace}\MyEAR\META-INF\ibmconfig folder containing the Deployment Tab information for the Enhanced EAR, before exporting the EAR (or in the EAR tself using whatever compressed file utility you may have).
Then, in the actual production server set the Shared Libraries in the admin console on the installed EAR
and define whatever other resources may have been configured in the Enhanced EAR.


Note - Rational Application Developer v7.0 WebSphere Application Server v6.1 Shared Library "admin console" - Error ADMA017EE and WSVR0501E:

If using WebSphere Application Server v6.1, upgrading to WebSphere Application Server v6.1.0.13 or later is recommended, because of known APAR/defect:
PK49029: IN WSAS RUNTIME SERVER FAILS TO START AFTER ASSOCIATING SHARED LIBRARY WITH AN ENTERPRISE APPLICATION
This involved the use of "Run server with resources in the workspace" as well as
"Minimize application files copied to the server", and the error:
WSVR0501E: Error creating component com.ibm.ws.runtime.component.ApplicationMgrImpl@5d125d12 .


Useful WebSphere Application Server ClassLoader information:

From a WebSphere® Application Server (WAS) classloading/class loader perspective, in this case WebSphere Application Server v6.1, it is useful to consult the RedPaper: WebSphere Application Server V6.1: Classloader Problem Determination, which addresses use of Shared Libraries, or the general url under Related information. Also, the class loader/loading chapters in the System Management & Configuration Handbooks for the various WebSphere Application Server server versions under Related information, provide similar background information. Specific to WebSphere Application Server v5.1 there is the red piece: WebSphere Application Server V5: Using Shared Library Support.

Under Related information, the Rational Application Developer v7.0 technote: J2EE classpath Container Preferences with Java Build Path and J2EE Module Dependencies Properties, is useful from the perspective of the use of Java utility projects/jars by J2EE Projects.

Note: This Rational Application Developer v6.0/WebSphere Application Server v6.x education presentation still applies in most part to Rational Application Developer v7.0
http://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/topic/com.ibm.iea.rad_v6/rad/6.0/ServerTools/IRADv6_Server_Tools.pdf?dmuid=20061230193942643971


Related information

Education For RAD v6/WASv6 Server tooling
WAS V6.1 Classloader Problem Problem Determination
WAS V6.1 System Management and Configuration
WAS V6.0 System Management and Configuration
WebSphere Application Server V5: Using Shared Library S
WAS V5.1 System Management and Configuration
RADv7.0 - J2EE classpath Container Preferences with..
WAS61 APAR PK49029

Rate this page:

(0 users)Average rating

Document information


More support for:

Rational Application Developer for WebSphere Software
Integrated Test Environment

Software version:

6.0, 6.0.0.1, 6.0.1, 6.0.1.1, 6.0.1.2, 7.0, 7.0.0.1, 7.0.0.2, 7.0.0.3, 7.0.0.4, 7.0.0.5, 7.0.0.6, 7.0.0.7, 7.0.0.8, 7.0.0.9, 7.0.0.10, 7.5, 7.5.1, 7.5.2, 7.5.3, 7.5.4, 7.5.5, 7.5.5.1, 7.5.5.2, 7.5.5.3, 7.5.5.4, 7.5.5.5, 8.0, 8.0.1, 8.0.2, 8.0.3, 8.0.4

Operating system(s):

Linux, Windows

Reference #:

1303233

Modified date:

2012-02-24

Translate my page

Machine Translation

Content navigation