IBM Support

Rational Application Developer v7.x J2EE Migration Validation Tool

Question & Answer


Question

How can you validate and or identify the source of problems in a J2EE Project migrated from IBM® Rational® Application Developer v6.0 or WebSphere® Studio Application Developer V5.1.2?

Cause

In one migration scenario it was not possible to open the MANIFEST.MF file in the Java Jar Dependency editor for a J2EE project exported as a Project Interchange (PI) from Rational Application Developer v6.0 and imported into Rational Application Developer v7.0.0.x at the latest update.

The Error Detail showed:

java.lang.NullPointerException

at org.eclipse.wst.common.componentcore.internal.resources.VirtualResource.getReadOnlyComponent(Unknown Source)

at org.eclipse.wst.common.componentcore.internal.resources.VirtualResource.getProjectRelativePaths(Unknown Source)

at org.eclipse.wst.common.componentcore.internal.resources.VirtualFile.getUnderlyingFiles(Unknown Source)

Answer

Typically the way that the Jar dependency NullPointerException (NPE) will happen is if the project metadata files: .project and .settings/org.eclipse.wst.common.component do not match.
This is apart from any incorrect information in the MANIFEST.MF file.

Defect APAR PK67812 (RAD70 WTP Module Core Framework:migrated RAD6 project has NullPointerException on Java Jar dependency editor) is targeted for a future Rational Application Developer v7.0.0.x update. When the project metadata is corrupt, instead of receiving a dialog showing a NPE and failing to open the Java Jar dependency editor, a dialog will appear with a more detailed exception which wraps the NPE and notes that the metadata is corrupt, and the Java Jar dependency editor will not open.

Regardless, this and other errors may occur in the case of workspace corruption, such as not saving the migrated .project file, but saving the.settings/org.eclipse.wst.common.component file, or vice-versa. There are many migration scenario problems were the project metadata files in the .settings folder do not match up with the other project metadata files such as .project or .classpath.

Disclaimer

All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.



Attached below, is the Rational Application Developer v7.0 J2EE Migration Validation Tool
(MigrationValidation200802121635.zip):

MigrationValidation200802121635.zip

, from J2EE Tools development. The zip contains a README with all the necessary instructions to use it.

In the above problem scenario, The validator spotted the missing nature:

<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>

, in the .project file for a Dynamic Web Application project.

This tool can be used to assess a troubled migration of a J2EE application from Rational Application Developer v6.0 or WebSphere Studio Application Developer v5.1.2. If needed, the resulting report and the original and migratedProject Interchange could be sent to IBM Rational Application Developer support for further analysis. It is not advised that any project metadata files be changed manually before consulting IBM Rational Application Developer Support. At minimum, backup any projects and project metadata files, before changing them.

Rational Application Developer v7.5:

In the case of v7.5, the J2EE Migration Validation capability is built into RAD v7.5 by default and is automatically active when a migration is done.
The results of the migration are shown in the Migration Results view. If that view is not present in your current perspective, you can bring it up using: Window > Show View > Migration > Migration Results :





Migration Comments and Information:

A validation tool is not substitute for a migration from Rational Application Developer v6.0 or WebSphere Studio Application Developer v5.1.2 that has not followed documented procedures. It is recommended to upgrade to the latest Rational Application Developer v7.0.0.7+ before doing a migration, and required that the Rational Application Developer v7.0 Help (Info Center) migration references be followed. For example searching on the keyword: migration, gives

"Migrating workspaces and projects from V6.0.x"
http://publib.boulder.ibm.com/infocenter/radhelp/v7r0m0/index.jsp?topic=/com.ibm.etools.rad.migration.doc/topics/tmigratefrom51x.html

"Migrating the specification level of J2EE projects"
http://publib.boulder.ibm.com/infocenter/radhelp/v7r0m0/index.jsp?topic=/com.ibm.etools.rad.migration.doc/topics/tmgv6j2eewiz.html

This technote is an official complement to the v7.0 Help:

"Backwards compatibility restrictions with the Software Development Platform"
http://www.ibm.com/support/docview.wss?uid=swg21268305
It refers to certain restrictions that affect EJB database projects.

Rational Application Developer v7.0 J2EE projects are based on the Eclipse 3.2.x/WTP(Web Tools Project) v1.5.x.
The following technotes reflect some of major Eclipse/Web Tools Project (WTP) project structure changes in Rational Application Developer v7.0 (as compared to WebSphere Studio Application Developer v5.1.2 and Rational Application Developer v6.0) and will help in understanding the feedback from the migration validation tool:

"What is new in RAD v7.0 (Eclipse v3.2/WTP v1.5+) J2EE Projects: Project Facets, .settings folder and Builders"
http://www.ibm.com/support/docview.wss?uid=swg21313092

"J2EE classpath Container Preferences with Java Build Path and J2EE Module Dependencies Properties"
http://www.ibm.com/support/docview.wss?rs=2042&&uid=swg21304802

Note:
In v7.0 after migration, if you later change the server Targeted Runtime property for a project, you must still manually change the Project Facets properly to match the new server and its Java version

Another generally useful migration technote:

WebSphere Application Developer v5.1.2 and Rational Application Developer v6 to v7 Migration problems FAQ
http://www.ibm.com/support/docview.wss?uid=swg21298078

[{"Product":{"code":"SSRTLW","label":"Rational Application Developer for WebSphere Software"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Installation","Platform":[{"code":"PF033","label":"Windows"},{"code":"PF016","label":"Linux"}],"Version":"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.5","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSYK2S","label":"Rational Software Architect Designer"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":" ","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"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","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SS4JCV","label":"Rational Software Architect for WebSphere Software"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"7.5","Edition":"","Line of Business":{"code":"LOB15","label":"Integration"}}]

Document Information

Modified date:
10 September 2020

UID

swg21318011