cancel
Showing results for 
Search instead for 
Did you mean: 

Developing Custom Adapter in PI by using Sample Adapter provided

Former Member
0 Kudos

Hi Experts,

I am developing a custom adapter by looking into below link.

http://help.sap.com/saphelp_nwpi711/helpdata/en/69/e1e6667710415a9c331ec2e0715561/frameset.htm

Could anyone please clarify the below Queries.

1. Which project needs to be created as RAR file. Step1 or Step2 Project folder in NWDS?

2. How to create the RAR file.

Thanks in advance...

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>1. Which project needs to be created as RAR file

you can go for j2ee project - the same as with coding

>>>2. How to create the RAR file.

this may surprise you but with.... WINRAR hehe

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi Mich,

Thanks for your reply...

1) As per the below link i have created a Java Project called "Test" in NWDS

http://help.sap.com/saphelp_nwpi711/helpdata/en/b6/8ddaedaf1e40f7a76fd098a8ec5d53/content.htm

2)I have created a General Project called "Test_RAR" based on the below link which consists of only META-INF directory in the project.

http://help.sap.com/saphelp_nwpi711/helpdata/en/be/0a3ddd91d34ea39ad406da59c303eb/content.htm

Could you please let me know how to proceed with the below queries..

1) I should generate the RAR file for which project; Test or Test_RAR?

2) For generating the RAR file; i should go to my workplace and right click on my project and create a RAR file?

Thanks.

ernesto_cruz
Participant
0 Kudos

Hi Veerendra! Could you update the thread, or tell us what was your experience with this error?

Regards, from Argentina

Former Member
0 Kudos

I have generated the RAR file and deployed in PI server. It worked.

siddhardha_dnk
Active Participant
0 Kudos

Hi Veerendra,

I am working on the same now. I am at the stage that you were earlier. My query is the one you passed.

Please help me on following queries.

1. Which project(in your case, Test or Test_RAR) should be converted to RAR and how?

2. Have you used NWDS to deploy RAR or any other tool?

3. I commented the following lines in "SPIManagedConnection" java code, as i couldn't find the         required "com.sap.security.api.ssf" package for "ISsfProfile" interface. Can you please let me     know where can i find this package.

//ISsfProfile privKeyProf = ksMgr.getISsfProfile(ks, privKeyAlias, null); //Since code based permission is used no password needs to be supplied

//java.security.PrivateKey privKey = privKeyProf.getPrivateKey();

//TRACE.infoT(SIGNATURE, XIAdapterCategories.CONNECT_AF, "Got configured private key {0}", new Object[] {privKey.toString()});

Warm Regards,

DNK Siddhardha.

Former Member
0 Kudos

Hi Siddhardh,

Please find my responses..

1. Which project(in your case, Test or Test_RAR) should be converted to RAR and how?

--> export Test_RAR as J2EE RAR file

2. Have you used NWDS to deploy RAR or any other tool?

--> NWDS itself is used to deploye the RAR file. Go to the deploy view in the NWDS and add the exported RAR file to "External Deployable Archives" and deploy it.

3. I commented the following lines in "SPIManagedConnection" java code, as i couldn't find the         required "com.sap.security.api.ssf" package for "ISsfProfile" interface. Can you please let me     know where can i find this package

You can find that jar file from your PI server itself...check with your basis team for that..they will help you...

Regards,

Veerendra.

siddhardha_dnk
Active Participant
0 Kudos

Hi Veerendra,

Thanks a lot for your fast reply. I need your help one more time.

When im exporting the Test_RAR as J2EE RAR, its asking for Connector module, as im unable to figure it out. There is nothing in the drop down list. Please let me know, what should be provided in that field.

Warm Regards,

DNK Siddhardha.

Former Member
0 Kudos

Hi Siddhardha,

While creating project Test_RAR, you have to create it as an J2EE-Connector project but not java project.

Regards,

Veerendra.

siddhardha_dnk
Active Participant
0 Kudos

Hi Veerendra,

Thanks for your reply. Im very glad to see your reply. I tried with your suggestion. But its not getting deployed and the errors are

1.Empty or incorrect application, which is not recognized by registered containers.

2.An AS Java service, which is providing a container, is stopped or not deployed.

3.The containers, which processed it, are not implemented correctly, because the application was deployed or started initially, but containers didn't return information about deployed components].

Then i copied the package which i created in Test into Test_RAR and deployed. It got deployed with some warnings.

Actually, the entire code is in Test and META_INF is in Test_RAR. There is no connection between these two projects. If we deploy only Test_RAR without package in Test, how the code gonna work...? That's why i copied the package into TEST_RAR and deployed.

Am i right in this prospective...? Please let me know... Will be waiting for your suggestion...

Warm Regards,

Siddhardha Datla

Former Member
0 Kudos

Hi,

Not suer about the errors you got during deployment.

-->Then i copied the package which i created in Test into Test_RAR and deployed. It got deployed with some warnings.

Instead of copying the package created in Test... do follow the below steps...

1. you need to export Test project as jar file.

2. Go to the workspace where your connector project is saved and delete com.sap.aii.adapter.sample.ra.jar file present in connectormodule folder.

3. After deleting the jar file, replace it with the jar file that you have exported for the Test project.

Regards,

Veerendra.

siddhardha_dnk
Active Participant
0 Kudos

Hi Veerendra,

I was keep on trying the same from so many days. As you told, i have exported project "Test" as jar file and added it to connector module folder. Then, I exported "Test_RAR" as J2EE RAR and it was deployed with the following warnings.

1. Exception has been returned while the [sap.com/com.test.YourAdapterName.adapter.ra] was starting. Warning/Exception :[

][[ERROR CODE DPL.DS.6193] Error while ; nested exception is:

          com.sap.engine.services.deploy.exceptions.ServerDeploymentException: [ERROR CODE DPL.DS.5030] Clusterwide exception: [server ID 5429350:com.sap.engine.services.deploy.exceptions.ServerDeploymentException: [ERROR CODE DPL.DS.5029] Exception in operation [startApp] with application [sap.com/com.test.YourAdapterName.adapter.ra].

          at com.sap.engine.services.deploy.server.application.ApplicationTransaction.rollbackPart(ApplicationTransaction.java:496)

          at com.sap.engine.services.deploy.server.application.ParallelAdapter.rollbackPart(ParallelAdapter.java:318)

          at com.sap.engine.services.deploy.server.application.StartTransaction.rollbackPart(StartTransaction.java:530)

          at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:380)

          at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhases(ParallelAdapter.java:428)

          at com.sap.engine.services.deploy.server.application.StartTransaction.makeAllPhases(StartTransaction.java:499)

          at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:1487)

          at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:806)

          at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:788)

          at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:776)

          at com.sap.engine.services.dc.lcm.impl.J2EELCMProcessor.doStart(J2EELCMProcessor.java:105)

          at com.sap.engine.services.dc.lcm.impl.LifeCycleManagerImpl.start(LifeCycleManagerImpl.java:78)

          at com.sap.engine.services.dc.cm.deploy.impl.LifeCycleManagerStartVisitor.visit(LifeCycleManagerStartVisitor.java:34)

          at com.sap.engine.services.dc.cm.deploy.impl.DeploymentItemImpl.accept(DeploymentItemImpl.java:83)

          at com.sap.engine.services.dc.cm.deploy.impl.DefaultDeployPostProcessor.postProcessLCMDeplItem(DefaultDeployPostProcessor.java:91)

          at com.sap.engine.services.dc.cm.deploy.impl.DefaultDeployPostProcessor.postProcess(DefaultDeployPostProcessor.java:61)

          at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.doPostProcessing(DeployerImpl.java:866)

          at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.performDeploy(DeployerImpl.java:814)

          at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.doDeploy(DeployerImpl.java:644)

          at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.deploy(DeployerImpl.java:363)

          at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.deploy(DeployerImpl.java:252)

          at com.sap.engine.services.dc.cm.deploy.impl.DeployerImplp4_Skel.dispatch(DeployerImplp4_Skel.java:897)

          at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:368)

          at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:69)

          at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:67)

          at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:41)

          at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:977)

          at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:57)

          at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:55)

          at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)

          at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)

          at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:327)

Caused by: java.lang.UnsupportedClassVersionError: com/test/YourAdapterName/adapter/ra/SPIManagedConnectionFactory : Unsupported major.minor version 50.0

          at java.lang.ClassLoader.defineClass1(Native Method)

          at java.lang.ClassLoader.defineClass(ClassLoader.java:677)

          at com.sap.engine.boot.loader.ResourceMultiParentClassLoader.loadClassLocal(ResourceMultiParentClassLoader.java:183)

          at com.sap.engine.boot.loader.MultiParentClassLoader.findClassInLoaderGraph(MultiParentClassLoader.java:312)

          at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:271)

          at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:243)

          at com.sap.engine.services.connector.deploy.util.ResourceAdapterStarter.instantiateMCF(ResourceAdapterStarter.java:315)

          at com.sap.engine.services.connector.deploy.util.ResourceAdapterStarter.initResourceAdapter(ResourceAdapterStarter.java:122)

          at com.sap.engine.services.connector.deploy.ConnectorContainerImpl.prepareStart(ConnectorContainerImpl.java:303)

          at com.sap.engine.services.deploy.server.utils.container.ContainerWrapper.prepareStart(ContainerWrapper.java:363)

          at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:345)

          at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:300)

          at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:374)

          ... 28 more

]]

and i have created NameSpace, Adapter metadata using YourAdapterName.xml and also Comm channel in ID. But while checking in Comm Channel monitoring it shows an error like... "No adapter registered for this channel".

While checking in sdn regarding the warnings in NWDS. It says that "application alias already exists". I couldn't figure it out.

Please let me know if u have any solution for this. Your reply is highly appreciated.

siddhardha_dnk
Active Participant
0 Kudos

Hi Veerendra,

I am out of all the warnings in NWDS and it is successfully deployed now. The issue is with compiler version for TEST project in NWDS and in ra.xml file in META-INF folder. I changed them to 5.0 and then it got successfully deployed.

Checking some blogs in sdn regarding the status in Communication Channel Monitoring for my channel,  i restarted my java application in NWA --> Operational Management --> Systems --> Start&Stop --> Java EE Applications. Earlier the status for the package was "Failed to start" and after successful deployment, it got turned to "Stared". Again i restarted the Java application in NWA and also Java stack in PI Server. After all these, i checked Communication channel monitoring and the status remains as "No adapter registered for this channel".

Please help me out on this.

Warm Regards,

Siddhardha Datla.

Former Member
0 Kudos

Hi Siddhardha,

There might be issue in the Adapter metadafile file that you have uploaded in ESR or in ra.xml file.

Cross check the JNDI name, namespace, adapter type in both the files.

Hope you have done the required changes in MetaINF files in NWDS.

Regards,

Veerendra

siddhardha_dnk
Active Participant
0 Kudos

Hi Veerendra,

After all permutations and combinations, we found the reason for the error.

The version in ra.xml in META-INF, should be changed to 1.6 from 1.4. I think that's the version of JDK in PI Server to be mentioned. Now the status for my Communication Channel in Comm Channel Monitoring is "Up & Running".

While testing the sample adapter, I sent a test from Integration Engine and im getting the following error in Communication Channel Monitoring.

Message processing failed. Cause: java.lang.Exception: Cannot lookup the ra connectionFactory. Reason: Path to object does not exist at com.sap.aii.adapter.sample.ra, the whole lookup name is deployedAdapters/com.sap.aii.adapter.sample.ra/shareable/com.sap.aii.adapter.sample.ra.

In SampleRa.xml(Meta Data), I changed the JNDI name as per the document and in "SPIManagedConnectionFactory.java" file, which is not mentioned in the document.

I tried all the permutations like keeping the same JNDI name in "SPIManagedConnectionFactory.java" and replacing with new one. Nothing worked.

Please help me out on this.

Warm Regards,

DNK Siddhardha.

Former Member
0 Kudos

Hi Siddhardha,

I hope you got that error in the receiver communication channel

If this is the case, in the receiver channel you to need to provide the module parameters using module configuration.

Below are the parameters you need to pass...

JNDIName

pwd

userName

Values:

For JNDIName, go to NWA - ProblemManagement - JNDI Browser and search for your adapter module. Copy the object name and use it as JNDI name.

While creating this scenario, somewhere you would have provided username and password. Use those details.

Regards,

Veerendra.

siddhardha_dnk
Active Participant
0 Kudos

Hi Veerendra,

Finally its working. Thanks a lot for your help and suggestions through out the process.

Warm Regards,

DNK Siddhardha.

Answers (1)

Answers (1)

ernesto_cruz
Participant
0 Kudos

Hello!

In this link there is info related to question:

cheers!