Skip to Content
Author's profile photo Eng Swee Yeoh

Demystifying Custom Adapter Development: Part 1b – Cloning the Sample JCA Adapter

The following steps are continued from Demystifying Custom Adapter Development: Part 1a – Cloning the Sample JCA Adapter.

Step 4 – Creating the Adapter Metadata in ESR

Next we will import the Adapter Metadata into the ESR.

i) Update JNDIName in the metadata file

SampleRA.xml is the Adapter Metadata file which was extracted from the XIAF SCA file (in Step 1 – ii).

Update the JNDIName value following the name of the Java Project (in Step 2 – i).


ii) Create Adapter Metadata object in ESR

Create a new namespace in ESR and then create a new Adapter Metadata object. The combination of adapter name and namespace must match exactly the values used in Step 3 – ii above.


Upon creation of the object, it will provide a default metadata. Overwrite this metadata by importing the modified SampleRA.xml above.


Activate the new metadata object.


Step 5 – Building and Deploying the Adapter

We are now ready to build and deploy the adapter!

i) Export JAR file for Java project

Firstly, we export the JAR file of the Java project. The destination of the export will be the connectorModule folder of the RAR project.


Once the export is completed, refresh the RAR project and verify that the JAR file is in the connectorModule folder.


ii) Export RAR file for RAR project

Right click on the RAR project and export it as a RAR file.


The destination will be the root folder of the RAR project itself.


Once the export is completed, refresh the RAR project and verify that the RAR file is available.


iii) Deploy the RAR file to the SAP AS Java server

Prior to deployment, make sure that the AS Java server is configured under Windows > Preferences > SAP As Java.

Switch to the Deployment perspective. Click Import and select the RAR file from the workspace.



Click Start to begin deployment of the RAR file.


Upon completion, the following pop up dialog will display the result of the successful deployment.


iv) Verify deployment was successful

We can verify that the deployment was really successful with the following tools.

Go to NWA > Troubleshooting > Logs and Traces > Log Viewer. Check that the following errors are generated – they are just sample messages and can be ignored.


Go to NWA > Configuration > Infrastructure > Application Modules. Enter the filters for Type and Application to verify that the resource adapter is available.


Go to NWA > Troubleshooting > Java > JNDI Browser. Navigate to the deployedAdapters folder and verify that the JNDI object name is correctly registered. The JNDI name specified in the Adapter Metadata must match this value.


Go to NWA > Operations > System > Start & Stop. Select Java Applications tab and filter by the adapter name. Check that the application status is started.


Step 6 – Using the Adapter in a Communication Channel

After successful deployment, we can create communication channels using this new adapter.

Select the Adapter from the list of adapter and populate all the mandatory fields.


Activate the channel and check that it’s successful in the Communication Channel Monitor.



This channel can then be used in an integration scenario as per normal configuration. However, usage of this channel which is based on the sample adapter’s behavior will not be covered here.


As shown above, with clear and concise steps, we are able to setup the projects in NWDS correctly to build and deploy a clone copy of the sample JCA adapter. Communication channels can then be created to use this adapter in integration scenarios. The sample JCA adapter provides some simple logic to connect to the file system of the PI system.

This clone adapter forms the basis for the subsequent posts in this series. We will look at the different aspects of the development, and aim to change the logic and behavior of the adapter according for an example requirement.

In the next post we will be examining the source codes of the custom adapter, looking at some of the key classes and methods in order to understand the behavior of the adapter. Watch this space!

Other Parts of this Series

Demystifying Custom Adapter Development: Part 1a – Cloning the Sample JCA Adapter

Demystifying Custom Adapter Development: Part 2 – Examining the Adapter’s Key Classes and Methods

Demystifying Custom Adapter Development: Part 3 – Examining the Deployment and Metadata Files

Demystifying Custom Adapter Development: Part 4 – Modifying the Adapter’s Functionality

Demystifying Custom Adapter Development: Part 5 – Creating an HTTP Poller with OAuth 2.0 authentication

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Aditya Adepu
      Aditya Adepu

      Hello Eng,

      I followed the blog with the required steps. But due to some system settings, I need to deploy from command line on the server. So I copy the rar onto server and run the deploy command. I face following issue :

      * Connector Class Existence: managedconnectionfactory-class "" cannot be loaded. Check loader references., file:, severity: error]
      Hint: 1) The given archive file is not a valid Java EE or SAP specific application.] is my modified package name.

      So seeing this I thought I will export  as SAPRAR, but that does not export with required jars or the manifest files. Any suggestions.


      Author's profile photo Eng Swee Yeoh
      Eng Swee Yeoh
      Blog Post Author

      It is hard to pinpoint the root cause of the error as Adapter development is a very complex process, and I can't tell what steps you have done or not. I would suggest as a start, to follow exactly the steps and names listed in this blog series. Once you are able to get such a sample adapter built and deployed correctly, then you can venture on to refactoring it to your specific needs.

      Author's profile photo Alexander Apel
      Alexander Apel

      Hi Eng,


      after Deploying my adapter i get the following message in communiction channel


      Any suggestions whats wronge?


      regards, Alex