Chapter 6. Migrating from BEA WebLogic 125
6.4.3 Migrating the sample application
In this section, we describe the steps we performed to migrate Trade. We also
explain the issues and the solutions to the problems we experienced when
migrating the Trade application.
Installing the J2EE Competitive Migrator Plugin 1.2.0 plugin
The J2EE Competitive Migrator is a plugin for Rational Application Developer
version 6.0 that supports the migration of J2EE applications developed for
competitive application servers to WebSphere Application Server. Currently, the
tool supports the migration of EJB modules deployed for BEA WebLogic Server
to WebSphere Application Server version 5.0, 5.1, or 6.0.
Refer to Appendix B, “Additional material” on page 323 for instructions on how to
download the J2EE Competitive Migrator Plugin 1.2.0.
Importing the Trade EAR file
We start the migration of Trade by importing the EAR file into Rational
Application Developer V6.
1. In Rational Application Developer V6, open the Resource perspective.
2. Right-click in the Navigator view and select Import.
3. In the next dialog, choose EAR file from the list and click Next.
4. Next, click Browse and select the Trade EAR file:
5. Click Next and select the trade3AppClient.jar from the list, then click Next.
6. Make sure all modules are selected and click Finish.
7. If your workspace is not set up to build automatically, then you need to rebuild
this new project now. Press Ctrl+B to rebuild all projects in the workspace or
you can Ctrl-Click projects and rebuild only selected projects.
You should have the following projects in the Navigator view:
򐂰 trade3AppClient
Contains a J2EE client application for Trade.
򐂰 trade3EJB
This project contains the Trade EJBs.
Tip: Rational Application Developer V6 rebuilds the project automatically after
each change to source code. You can turn this off by selecting Project
Build automatically from the menu.
126 Migrating Applications from WebLogic, JBoss and Tomcat to WebSphere V6
򐂰 trade3Web
The Trade Web application containing servlets and JSPs.
򐂰 trade3
This project contains the EAR application.
Fixing errors reported by Rational Application Developer V6
After building the whole project, open the Problems view and analyze all the
errors and warnings that are reported by Rational Application Developer V6. We
noticed that the Problems view reports errors in the EJB and Web application
projects. We fix the errors by following these steps.
1. Open the EJB project and drill down to the folder containing the errors:
This folder contains both the EJB source code and compiled classes. The
files that contain errors are all using BEA WebLogic Server 8.1 specific
classes, so we delete all these files along with their respective class files.
After deleting the files, Rational Application Developer V6 no longer reports
any errors for the EJB project.
2. The Web application project also contains BEA WebLogic Server 8.1 specific
classes, so we delete the following folder:
3. Rational Application Developer V6 still reports errors for the Web application
and client project. This is because the projects depend on classes located in
the EJB project. To fix the problem, right-click the Web application project and
select Properties.
4. From the left pane in the properties window for trade3Web, select Java Build
5. Select the Project tab and check the trade3EJB project in the list.
6. Click OK.
7. We also specify the same dependency for the client project as illustrated in
Figure 6-4 on page 127.
8. If your workspace is not set to automatically rebuild, then rebuild the project
manually now by pressing Ctrl+B.
Chapter 6. Migrating from BEA WebLogic 127
Figure 6-4 trade3AppClient project’s dependencies
All errors reported by Rational Application Developer V6 are now fixed. But there
are still some warnings, shown in Example 6-2, that we will explain how to fix
Example 6-2 Warnings reported by Rational Application Developer V6
IWAE0024W The Manifest Class-Path for archive trade3EJB.jar contains an entry,
soap.jar, that is not resolvable to a file or module in the Enterprise
Application: trade3wls.
Broken link - /trade/OrderId
We fix the first warning in the list by removing the reference to soap.jar from the
Jar manifest file located in Rational Application Developer V6:
Rational Application Developer V6 now only reports the following type of errors:

Get Migrating Applications from WebLogic, JBoss and Tomcat to WebSphere V6 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.