cancel
Showing results for 
Search instead for 
Did you mean: 

Please help with first Adapter Module Bean NWDS deployment

Former Member
0 Kudos

Hello experts,

I am following instructions to deploy a first Java Adapter Module Bean to our development system and getting a problem. I really appreciate any help in this case.

I am following these instructions:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e674...

I have copied the library files and referenced them as mentioned in the document, but maybe these differ based on PI version? We are on 7.11.

I'm trying to load this source code:

In NWDS when I deploy it has a warning:

1. File:E:\Data\NWDS-workspace\ReplaceString-ear\ReplaceString-ear.ear

  Name:ReplaceString-ear

  Vendor:sap.com

  Location:localhost

  Version:2015.02.06.17.25.55

  Deploy status:Warning

  Version:NEW

  Description:

  1. Warning occurred on server 8900550 during deploy sap.com/ReplaceString-ear : References Test: There are no matching deploy time references (described in META-INF/SAP_MANIFEST.MF) for the following runtime references [sap.com/engine.security.facade, sap.com/engine.j2ee14.facade, sap.com/com.sap.aii.af.svc.facade, sap.com/com.sap.aii.af.ifc.facade, sap.com/com.sap.aii.af.lib.facade, sap.com/com.sap.base.technology.facade] (described in the META-INF/application-j2ee-engine.xml)., file: ReplaceString-ear.ear, column 0, line 0, severity: warning

  2. Exception has been returned while the [sap.com/ReplaceString-ear] was starting. Warning/Exception :[

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

  com.sap.engine.services.deploy.container.DeploymentException: Cannot find business method 'process' with args [interface com.sap.aii.af.lib.mp.module.ModuleContext, class com.sap.aii.af.lib.mp.module.ModuleData] in class com.sap.adaptermodule.ReplaceStringBean for component sap.com/ReplaceString-ear*xml|ReplaceString-ejb.jar*xml|ReplaceString]

Result

Status:Warning

I used these parameters in the module config:

When starting the Comm Channel and sending a message it says:

Message processing failed. Cause: com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception during lookup operation of object with name localejbs/ReplaceString, cannot resolve object reference. [Root exception is javax.naming.NamingException: Error occurs while the EJB Object Factory trying to resolve JNDI reference Reference Class Name: Type: clientAppName Content: sap.com/ReplaceString-ear Type: interfaceType Content: local Type: ejb-link Content: ReplaceString Type: jndi-name Content: ReplaceString Type: local-home Content: com.sap.aii.af.lib.mp.module.ModuleLocalHome Type: local Content: com.sap.aii.af.lib.mp.module.ModuleLocal com.sap.engine.services.ejb3.runtime.impl.refmatcher.EJBResolvingException: Cannot start applicationsap.com/ReplaceString-ear; nested exception is: java.rmi.RemoteException: [ERROR CODE DPL.DS.6125] Error occurred while starting application locally and wait.; nested exception is: com.sap.engine.services.deploy.container.DeploymentException: Cannot find business method 'process'



When I look at default trace it contains similar info:

[ERROR CODE DPL.DS.5029] Exception in operation [startApp] with application [sap.com/ReplaceString-ear].
[EXCEPTION]
com.sap.engine.services.deploy.exceptions.ServerDeploymentException: [ERROR CODE DPL.DS.5029] Exception in operation [startApp] with application [sap.com/ReplaceString-ear].
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:324)

...

Caused by: com.sap.engine.services.deploy.container.DeploymentException: Cannot find business method 'process' with args [interface com.sap.aii.af.lib.mp.module.ModuleContext, class com.sap.aii.af.lib.mp.module.ModuleData] in class com.sap.adaptermodule.ReplaceStringBean for component sap.com/ReplaceString-ear*xml|ReplaceString-ejb.jar*xml|ReplaceString

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

So I had multiple issues holding me back, but glad to say I have the Module Adapter deployed now and it is working as it should in development.

I wonder what is your experience for source control with these adapter modules. Is it possible to transport them like mapping or config objects? Or maybe we define landscape of QA and Production in NWDS and "run" the ejb project to each platform when it is ready? Looking for practical advice here.

Thank you!

engswee
Active Contributor
0 Kudos

Hi Aaron

Glad to hear that your issues have been resolved.

For the sake of completeness and also future reference for others, can you share what actually you did to resolve them?

Was it the module code, the JDK, the NWDS version, the module sequence, etc, all of the above?

Regarding the source control and transport, the SAP recommended way would be to have NWDI. In reality though not every organization will have NWDI, so it's a manual deployment into each landscape - either through NWDS directly, or packaged into an SDA for Basis consultant to deploy.

Rgds

Eng Swee

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Aaron,

For module transport, you can use CTS+ for this. There is an option there to attach an ejb, once it gets imported, the module is automatically deployed on the target system.

Regards,

Mark

Former Member
0 Kudos

Thanks Mark, we are using CTS+. How do we export a module ejb object to transport proposal?

Former Member
0 Kudos

Good point Eng,

For maybe helping someone else, so far my issues were:


1) NWDS deployment was failing because the hostname of server system seemed to be case sensitive.


2) I placed Java Bean code in wrong place of NWDS project, so deployment could not find necessary module implementation

3) I was worried about warnings of the referenced libraries but these could be ignored.

4) I configured Adapter Modules in wrong order

5) Module Code or Parameters

  • Getting null error at runtime, had to remove single quotes from separator
  • Getting null error at runtime because module code (or perhaps Java version) not detecting empty string (e.g. want to replace string with empty string
  • Java replaceAll method was not working with string arrays, had to convert to actual strings (again maybe this is down to a java version)

6) Wondering best practice to deploy module to different platforms

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Aaron,

You won't be able to attach it on that page. You need to go to the cts admin page (where you release or modify your transport) and there is an option there to attach the ejb.

In the screenshot, there should be an attach option, but since I am not an admin I don't have it.

As far as I know, there are two URLs for cts +, the first one is when you click modify/create request and the second is the admin URL.

Regards,

Mark

Former Member
0 Kudos

Ok I see it. I have the option to upload a file from client or server and apply it to an application as in the screen shot. What file would I attach from the NWDS project? Would it get deployed correctly to the other servers in the transport workflow?

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Aaron,

The file type should be J2EE and your file should be in .ear format. It would get correctly deployed

in the server once you import it in stms.

Regards,

Mark

Answers (4)

Answers (4)

juan_vasquez2
Active Participant
0 Kudos

Change position of modules

Numer  module

  1           Replace....

  2          callSapAdapter

this is a nice url:

Former Member
0 Kudos

Thanks Juan, I noticed that mistake also 🙂

Former Member
0 Kudos

Ok, I could see that I had my ReplaceString bean code in the wrong part of the project. After resolving that, I am seeing some warnings about the project. The first 5 are about the PI_AF_LIBS jars. These files are all existing in the path on my PC, downloaded from PI in c:\PIJars\UserModuleLib

Can someone help me understand these warnings and how to correct? Many thanks!

Ryan-Crosby
Active Contributor
0 Kudos

Hi Aaron,

None of those warnings listed in Eclipse should stop you from building the archive and deploying it to your system.  The first five just indicate that the libraries you are referencing will not be packaged in the build and deployed to the system which is fine because they will already exist.  The others about the archive and the MANIFEST stretch too far to see the full text but the others can be ignored and will not cause any issues at runtime.

Regards,

Ryan Crosby

engswee
Active Contributor
0 Kudos

Hi Aaron

I've noticed from the screenshot that you are using JDK 1.6 for your NWDS. If you have a look at the following Wiki, it says that PI 7.1x is running on JVM 5.1.

Troubleshooting PI ESR and Integration Builder Logon Issues - Process Integration - SCN Wiki

Therefore you need a JDK 1.5 for your NWDS. Also, can you confirm which version and SP of NWDS are you using? For PI 7.11, you need NWDS CE 7.11 and not anything higher.

NWDS Download Links - Java Development - SCN Wiki

Rgds

Eng Swee

RaghuVamseedhar
Active Contributor
0 Kudos

Aaron,

FYI. replacing string can also be achieved using Java mapping. If you are not using FCC or other modules after replacing string, I would suggest using Java Mapping.

replaceAll("ns0:something","ns0_somthing").replaceAll("foobar","_");

Link1, Link2.

Former Member
0 Kudos

Thanks Raghu, I thought this could be nice to configure at will for reusability. I think in mapping for each new use case we need to redeploy if it were to change slightly? However, I may still try it. Thanks for posting that video!

anandvithal
Active Participant
0 Kudos

Hi,

Did you implement Module interface in your bean implementation class?

Looks like your code has some problem, share your bean implementation class code.

Thanks,

Anand

Former Member
0 Kudos

Good call Anand, I looked back at the bean class code and found an error. I will come back soon