Resolving JCo Destination Name Error encountered for development component using WD Java
This blog mainly explains the steps to resolve SAP JCo Destination name error encountered for Development Component (DC) using Web Dynpro Java.
NOTE: This could be one of the possible solution for the root cause.
SAP Java Connector:
- JCo is a middleware component that enables the development of SAP-compatible components.
- Supports communication with SAP server in both directions : inbound calls (Java calls ABAP) & Outbound calls (ABAP calls Java)
Using SAP Netweaver Web Dynpro Content Administrator, create 2 JCo Destinations (one for metadata and another for model data) if the Adaptive RFC is chosen to retrieve data from a SAP system. If one or more SAP systems are involved then new set of JCo Destinations can be created seperately.
Application developer can now develop components using web dynpro java and interact with backend SAP system using Jco names to perform read/Write operation and display the processed data.
After deploying and running the application, a situation arises where developer might see exception which says
“….WDRuntimeException: Failed to resolve JCO destination name ……in the SLD. No such JCO destination is defined in the SLD. ”
(Assuming you have installed SAP NWDS on your machine, have imported application track, have created a project into workspace for the components to be analyzed for resolution)
Check with System administrator to verify if JCOs are tested successfully.
In NWDS, go to WebDynpro Perspective and locate the webdynpro DC for that application deployed.
Right click the DC name. Select Properties.
Select web Dynpro
- click JCO references . You ll see all the JCo names used by this app DC to import the RFCs will be listed here.
- verify if JCo names displayed here are valid ones.
- One more JCO names which are incorrect/unused, if found then Right Click on that incorrect JCO name as shown. Select ‘Delete’
- DTR Prompt to check-out and create an activity window will popup.
- Provide required details. Continue to Delete remaining invalid JCO names.
- Navigate to <DC Name>/_comp/src /packages and open file named ‘ProjectProperties.wdproperties’ .
- Verify if the changes done are reflecting in this files.
- Perform a DC build.
- Deploy the DC from NWDS.
- Run the application.
- Goto ‘Development Infrastructure’ perspective.
- Select ‘Open Activity’ view.
- Expand the activity created for this change.
- Verify if the files modified have been recorded. This check is required to make sure that changes completed will be transported correctly to target systems.