
Applies to:
Web Dynpro for Java 7.31.
Summary:
This tutorial is aimed at developers already familiar with versions of Web Dynpro Java 7.0 and Web Dynpro Java 7.31. This explains step by step procedure on how to migrate Web Dynpro Java Components from NW 7.0 to NW 7.4. This tutorial also handles common error & exceptions during the migration process. This covers all important settings & solutions required for NWDS work perfectly for the migration process.
Author: Nutan Sangai
Company: Infosys Ltd
Created on: June 2, 2014
Table of Contents
1. Introduction
2. Prerequisites
3. Import WD DCs to NWDS
4. Resolve Dependencies
5. Migrate Model
6. Migrate WebDynpro DC component
7. Cheat Sheet Activities
8. Build & Deploy
9. Run-time Errors
10.References
1. Introduction
In this tutorial you will learn about end-to-end migration steps for Web Dynpro DCs from NWDS 7.0 to NWDS 7.31. This covers all the settings for NWDS 7.31 for smooth migration, SLD import, creating new project, Resolving dependencies, Component migration, Cheat sheet activities, Issues during migration process.
2. Prerequisites
3. Import WD DCs to NWDS 7.31
4. Resolve Dependencies
5. Migrate models
Error handling under Migrating models:
Error 1: Unhandled exception type ARFC2ModelExecuteException
Fix: In ARFC1, a model object would throw a WDDynamicRFCExecuteException. This exception is no longer used. Instead, the ARFC2ModelExecuteException exception is thrown. Remove WDDynamicRFCExecuteException and Replace it with ARFC2ModelExecuteException as below and Save.
Error 2: The constructor is undefined
Fix: In ARFC2 model type, we need to redefine ARFC2 model declaration
Ex: ValidateModel validatemodel = new ValidateModel ();
Zrfc_Validate_Input input = new Zrfc_Validate_Input (validatemodel);
6. Migrating components
7. Cheat Sheet Activities – listing some important activities
Note: All methods & code in interface controller are copied to Component controller.
Note: While running cheat sheet. Before you start migration step. Always close and reopen your WD project and restart the cheat sheet.
Error Checks during Cheat sheet activities and Component migration process:
Error 1: The type of the attribute in the interface definition is missing
Fix: If the context of the interface controller contains nodes with context mappings to the component controller, this will create implementation errors. So delete the mappings from the context nodes in the interface controller to the component controller.
Error 2: Check Method signatures from Interface controller to component controller are same. It is case sensitive and gives run time error if not maintained correctly. Migration wizard does not perform lower case to upper case conversion.
Error 3: Check all the context has been mapped correctly. When Context has been mapped manually, check the cardinality has been similarly maintained as per the interface controller node for multiple values.
8. Build & Deploy the NWDS DC.
Error Checks while build:
Error 1: Used Component/component interface is missing
Fix: If you have used component from other DC. Please check used components reference are maintained correctly. Public parts have been added correctly. Used component usage has to be redefined in code. This error comes, when one WD component migrated & the dependent WD component yet to be migrated and missing the reference links as per changed package and other definitions
Also make changes in Public Part -> Manage Entities, if package or component name has been changed.
Error 2: ‘The method is undefined for the type’ etc.
Fix: Once the component usage has been updated, make code changes as per new component Naming convention.
Error 3: Duplicate Methods
Fix: Causes when old reference of used DC has not been deleted and new reference already been created. Delete the Old reference.
Error 4: The project was not built since its build path is incomplete.
Fix: Add the jar file ‘com.sap.mw.jco.jar’ at location: C:\nwds-extsoa-7.3-EHP1-SP10-PAT0003-win32\eclipse.jdi\0\DCs\sap.com\com.sap.mw.jco\_comp\gen\default\public\default\lib\java
9. Run-time Errors:
There are some errors & exception which only picked up at runtime once application has been deployed and handled on portal.
Few examples are listed below:
Error1: JCO destination initialization failed/RFC_ERROR_SYSTEM_FAILURE
Fix: Check Userid/password used for the application is valid for that application. Check hostname/server is correct
Error2: Exception in triggering the workflow, Please Contact System Administrator com.sap.tc.cm.arfc2.gci.exception.ARFC2ModelRuntimeException: Creation of generic ARFC2 model metadata failed; see nested exception for details.
Fix: We need to maintain at least 2 RFC destinations in NWA for both METADATA & MODEL DATA. Also, whatever JCO Destination names you choose during the model import process, must only be used while creating it on NWA.
Error3: java.lang.NoSuchMethodError:
Fix: NWDS 7.31 does not handle conversion from lower case to upper case. We can check if methods names are similar in component controller and interface controller.
10. References
http://scn.sap.com/docs/DOC-2594
http://help.sap.com/saphelp_nw73/helpdata/en/a7/152df44212453d97abfd5e32917cf6/frameset.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
21 | |
18 | |
10 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 |