Skip to Content

 
 

About this document

We are undergoing an upgrade to Netweaver 731 from 7.0 in our project. This document aims at sharing the steps during the development phase for WDJ DC migration for quick reference purpose. It has a brief description of all the steps which were carried out for migrating the Web Dynpro Java custom components developed in 7.0 environment to 7.31. I have also included various issues which we faced during certain steps and the resolution.

Hopefully this will be helpful for developers and analysts who are planning similar migration to get an idea on the whole procedure.

Intended Audience

WDJ technical developers/analysts

Background

The 7.31 installation is compatible with the 7.0 source but not the binary as JDK 6 is supported instead of JDK 1.4.2. All the DCs created in 7.0 should be imported, rebuilt and redeployed to the new environment.

Prerequisites

  • Basis has created/upgraded the tracks which will we used for development

  • The required SCs and DCs have been imported into the tracks

  • The NWDS 731 and JDK 6 have been installed.

Issue

Note: Ensure that the correct and required SCs have been installed.

E.g.: SAP_JTECHS, SAP-JEE are no more present as of 710. SCs like FRAMEWORK, ENGFACADE etc. should be installed and the dependencies should be defined in the SLD. If any of these SCs are missing, you might end up getting build time errors when you try to create the DCs. In our case FRAMEWORK was missed due to which we were getting issues like:

ERROR: Illegal dependency: The compartment com.<Namespace>_SC_1 of DC <DC name> must use compartment sap.com_FRAMEWORK_1 of DC sap.com/tc/wdp/metamodel/content explicitly
ERROR: Illegal dependency: The compartment com.<Namespace>_SC_1of DC <DC name> must use compartment sap.com_FRAMEWORK_1 of DC sap.com/tc/ddic/runtime/facade explicitly

SAP Note# 1457908 comes handy in here.

 
 

Steps for Migration

I have categorized the migration steps of WDJ in NWDS applications into following:

  • Creating the DC
  • Fixing the dependencies
  • Migrating models
  • Build and deploy

Creating the DC

Define the SLD– In NWDS, go to Windows -> Preferences ->Development Infrastructure -> SLD

/wp-content/uploads/2013/02/1_187893.png

Import the Development configuration – In Development Infrastructure perspective, click on import new Development Configuration -> Import from System Landscape Directory(SLD)

/wp-content/uploads/2013/02/2_187894.png

/wp-content/uploads/2013/02/3_187901.png

Click Next and select the required track and the dev workset

Once the Development Configuration is created, select the DC to be migrated in Component Browser view and select Sync/Create Project.

/wp-content/uploads/2013/02/4_187902.png

During project creation, you will get the option to Migrate Project, make sure the project is selected and then click Next. Depending on the settings in your NWDS, you will either be prompted to create a new activity or a default activity will be created which will have all the modified files.

The Migration wizard runs in the background and helps adapting the old DC to the new environment and generates the migration report.

/wp-content/uploads/2013/02/5_187903.png

Additionally, the migration summary can be viewed in the Problems view and in some cases the issues can be resolved using the Quick Fix option.

/wp-content/uploads/2013/02/6_187904.png

/wp-content/uploads/2013/02/7_187905.png

If you select the Save Report option, you can view the Migration report in the specified path.

The Migration report enlists all the components and objects migrated and issues if any.

/wp-content/uploads/2013/02/8_187906.png

Issue

During the build of one of the DCs, we faced java.lang.ExceptionInInitializerError and error log showed that rscp4j is missing. I am putting few lines from the log that will help in identifying similar issue:

!MESSAGE error validating translatable texts: java.lang.ExceptionInInitializerError
at com.sap.i18n.cp.ConvertBase.CheckConverterJNIAvailable(ConvertBase.java:92)
.
.
.
at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:69)
                at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
                at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
                at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
                at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: com.sap.i18n.cp.ConverterRuntimeException: com.sap.i18n.cp failed to load native library rscp4j.
rscp4j maybe located:
- next to class com.sap.i18n.cp.ConverterJNI
- next to jar File i18n_cp.jar
- in java.library.path
- in system dependent shared library path

This was resolved by installing  the Microsoft run time DLLs of Visual Studio 2010.

SAP note 1780080 was helpful here.

Fixing the dependencies

We need to fix the dependencies of the DC as they might be deprecated.

Select the DC and view it in Component Properties -> Dependencies. You will see some deprecated DC dependencies.

/wp-content/uploads/2013/02/9_187907.png

/wp-content/uploads/2013/02/10_187908.png

The Local Build state would be ‘Dirty, rebuild needed’ until these dependencies are fixed.

You can click on the link to view the build log.

To fix the dependencies, these are the helpful steps:

  • Remove all the deprecated DCs.
  • Add the dependency for tc/bl/jco/api (ENGFACADE), tc/je/usermanagement/api (ENGFACADE- if the DC used security/api).
  • Make sure puplic part gci of tc/wd/api has build time dependency
  • Build the DC.

/wp-content/uploads/2013/02/11_187909.png

The Local Build State should be OK now.

/wp-content/uploads/2013/02/12_187910.png

Migrating the models

The ARFC1 has been deprecated 7.1 onward. For the WDJ applications that invoke ABAP functionality, it is highly recommended to migrate the models to the ARFC2 interface.

The JCo destinations to be used by ARFC2 are defined using ‘Destinations’ tool under Configuration Management in NWA.

There is a slight code difference between the two.

  1. e.g.: The model objects in ARFC1 are defined using the constructor of the model class.

In ARFC2, the model objects are instantiated with reference to their model.

ARFC1:

<ModelClass> modelObject = new <ModelClass>();

ARFC2:

<ARFC2Model> model = new <ARFC2Model>();
<ModelClass> modelObject = new <ModelClass>(model);

Also, in ARFC2, ARFC2ModelExecuteException should be caught instead of WDDynamicRFCExecuteException.

To migrate the existing model, right click on the model and select ‘Migrate to ARFC2 model.

/wp-content/uploads/2013/02/13_187911.png

It will ask you to check out some class files and source files.

After migration, you will get a confirmation message:

/wp-content/uploads/2013/02/14_187912.png

After migration, Reload and Repair-> Project Structure and Classpath to repair the modified structure of the new generated classes.

Check for any build errors and fix the code accordingly to conform to ARFC2.

Build and Deploy

Build the DC and deploy.

For deployment, make the server settings in Window ->Preferences -> SAP AS Java.

Check in and activate your activity as required.

Note: The user id for deployment requires administrator role.

References

http://help.sap.com/saphelp_nw73/helpdata/en/e9/546e60777641509a5e0dc5cd05675b/content.htm

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/802cb22e-e555-2d10-4cbf-fd02cfb3aede?QuickLink=index&overridelayout=true&48232482789993


SAP Notes

  • 1457908

  • 1780080

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

    1. Former Member Post author

      Hi Heilyn,

      If I understand you correctly, you are saying that the tracks are not available in NWDS.

      Iwould suggest check with your basis team if the SLD and track configurations have been done correctly.

      (0) 

Comments are closed.