Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

When migrating to Netweaver 7.4 the custom Portal Applications have to be recompiled and adjusted using the Netweaver Developer Studio (NWDS) 7.3 and following the main steps detailed below:

  1. Import Project
  2. Java Build Path adjustment
  3. Deprecated APIs handling
  4. Deployment Descriptor modification
  5. EAR package creation

Note: The first time the NWDS is used, the Installed JREs has to be set with the JDK 1.6 location. Go to Window > Preferences > Java > Installed JREs… as shown in the image below.

  1. Import Existing Project into Workspace

After copying the Project’s content folder in the Workspace folder, go to NWDS and select the Import option from the File menu.

In the popup window that appears, select General > Existing Projects into Workspace, and click on Next.

 

Click on Browse… (Select root directory: )

 

And select the Project’s folder to import

  1. Java Build Path

After the import, the Project appears in the Package Explorer view with Error status (red cross icon); the Errors are listed in the Problems view. All of them are related to missing library references and are solved by adjusting the Java Build Path.

  1. a. JRE System Library

First, the new JDK used in the project has to be set.

Right-click on the Project folder and select Properties (last option).

In the Properties, select Java Build Path section and then Libraries tab.

Select all the entries, they are old, and Remove them.

Click OK.

Right-click on the Project’s folder and select Build Project.

In the Problems view two errors appear, that are due to the missing references in the Build Path.

Right-click on the Project folder and select Properties again.

Go to Java Build Path section and then Libraries tab.

Click on Add Library… button and select JRE System Library.

Select Workspace default JRE radio button and click on Finish.

b. JAR files to classpath

There are two options to adjust the classpath of the project, through a wizard indicating the unknown class or manually adding the required JARs.

  1. Wizard option to import missing classes:

Locate the import statement that is giving the error and copy the entire name of the unknown class.

Right-click on the Project’s name and select the “Add Class to Build Path” option.

Specify the class name and select it from the options given below.

The JARs containing the selected class are shown in the box at the bottom.

Select the correct JAR and click on Finish button.

The error in the import statement disappears and the JAR is added to the Referenced Libraries list.

Building the project may be needed.

  1. Manual option to add the JAR files:

Right-click on the Project folder and select the Properties option.

Go to Java Build Path section and then the Libraries tab.

Click on Add Variable… and select the WD_RUNTIME variable, then click on Extend… button.

Look for the specific JAR in the plugins folder, select it and click OK.

The JAR is added to the Referenced Libraries list.

Building the project may be needed for the errors to disappear.

  1. Handling Deprecated APIs

For the Project just imported, we could find that some of the classes/methods used in the code are deprecated in the new version. Deprecated means that, although an API is still available and supported, it will be phased out in the subsequent releases, therefore we should avoid using it, and use the suggested alternative API.

In the Problems view, the Warnings for the Project (among others) are shown.

As shown in the image, warning messages about a deprecated method/class being used in the code could be found.

Go to the specific part of the code in the warning message to check the possibilities of replacing the deprecated method/class.

Check the JavaDocs at: http://help.sap.com/javadocs/#section1 to find information about the new recommended class or method for the deprecated one.

  1. Deployment Descriptor (Portalapp.xml)

  1. The Portalapp.xml deployment descriptor (located under dist à PORTAL-INF) should comply with the new standard.

To enable referencing the portal APIs used in the application, we must define the relevant PrivateSharingReference and/or PublicSharingReference properties. In SAP NetWeaver 7.3, references should be made via the facade DC rather than directly to the components, so we should convert the DC name to reference.

For example, if the DC name in the Javadocs is [sap.com] tc/epbc/prt/api, the reference should be com.sap.tc~epbc~prt~api. For a J2EE library, the prefix should be SAPJ2EE::library:<libName>.

  1. Portalapp.xml in our example should look as follows:

  1. EAR package creation

The PAR file extension is not supported in NW 7.3. The portal applications are now packaged in EAR files.

Right-click the project and select Export.

In the popup, select SAP NetWeaver Portal and EAR File, then choose Next.

Select the project from the list and choose Next.

Define the Name and Location properties and choose Next.

Verify that the EAR file is created.

 

  1. Related Links
  • Migrating Portal Applications à

http://help.sap.com/saphelp_nw73/helpdata/en/04/6c444aa960490e8fe9e0361b7f39e7/content.htm

  • How To... Migrate Custom Portal Applications to SAP NetWeaver 7.3 à

  http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10b84b1f-9d37-2f10-bc9e-e61d943bf...

1 Comment
Labels in this area