cancel
Showing results for 
Search instead for 
Did you mean: 

Checking code in custom adapter module

Former Member
0 Kudos

Hello gurus,

In one of our scenarios, we have a custom adapter module (localejbs/RenameAttachment).

whenever the message passes through this module, timestamp is automatically appended to the filename.

This is not desired.

I want to confirm this and also check the java code written.

I am new to module processing. Hence the lack of knowledge on the topic.

Please help.

Regards,

Xineohpi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

We do have a similar module at our receiver file channel where in we want to append only date at the end of the file name .We opted custom module because our's is bypass scenario.

Coming to your case .Ask the person who developed that module and deployed it to share EAR file.

Import the EAR file shared by him into your NWDS and edit according to your req and redeploy into your PI server from NWDS.

Regards

Venkat

Former Member
0 Kudos

Hi Venkat

Thanks for your response.

The one who had deployed has left the firm. Is there any other place where i can view the code?

Else i will give your solution a try..

Regards,

Xineohpi.

vadimklimov
Active Contributor
0 Kudos

Hi Xineohpi,

  1. Identify application name where the adapter module is located. This information can be retrieved using JNDI browser (NWA: Troubleshooting > Java > JNDI Browser) by searching for JNDI entries against adapter module name.
  2. Download idenitifed deployed application artifacts from the PI application server. By default, they should be available in the following directory: /usr/sap/<SID>/<instance>/j2ee/cluster/apps/<vendor>/<application name>/ . Precisely speaking, the deployable that we will be interested in is the EJB that contains implementation of the adapter module. This one is located in sub-directory /EJBContainer/applicationjars/<ejb name> of the application directory indicated above.
  3. Decompile retrieved JAR file that is build of the EJB project (that, in its turn, implements the adapter module) and check its internals (source code, deployment descriptors). For decompilation of Java binaries, I personally use JD-GUI (standalone version) and JD-Eclipse (Eclipse plugin) - that are parts of Java Decompiler Project (Java Decompiler) - but you can find variety of freeware and commercial tools that are helpful in Java binaries decompilation process. Source code of adapter modules is not obfuscated by default, so source code that will be an outcome of JAR file decompilation should provide you with details of the adapter module implementation. If the JAR file contains implementation of several adapter modules, you should be able to identify the specific Java class that implements the module in question checking deployment desscriptors (in the JAR file): ejb-j2ee-engine.xml - to find mapping of EJB name to JNDI name, ejb-jar.xml - to find the class name that implements the specific EJB.

Regards,

Vadim

Former Member
0 Kudos

Hi

When i use NWA i get the following message with a warning sign "No data available to the System Selector" and a blank blue screen. 

What do <vendor> and <applicationname> refer to?

The reason i am asking this is because we donot have OS level authorization. I will have to refer this to another team with specific details in order to retrieve the jar files...

Regards,

Xineohpi.

Former Member
0 Kudos

Hi ,

I think you are bit confused .I will guide you in simple terms.

Using Filezilla/putty/telnet login to your PI server OS level.Go to the below location.

/usr/sap/<SID>/DVEBMGS<SystemNo>/j2ee/cluster/apps/sap.com/ (Here u will find your EAR file)

Download the ear file to your local machine .Now unzip it .you can see a folder named EJBContainer\applicationjars\ your jar file.

Now take that file and unzip it .

As above said download JD GUI de compiler -->File-->openfile-->select the .class file in your jar file.

Now modify the changes according to your wish and redeploy from NWDS.

Regards

Venkat

  

Former Member
0 Kudos

Hi Venkat

Thanks for the detailed explaination.

Our team doesnot have OS level authorization. I have raised a ticket with the team handling OS. Will revert with my findings.

Thanks again.

Regards,

Xineohpi.

Former Member
0 Kudos

hello

i got the Usermodule_EJB.jar file from the location. I downloaded JD GUI and can see the code written in RenameAttachmentBean.class

I would like to comment one line which appends the datetimestamp and try to test.

Accordingly I edited the .java file in eclipse. However, i donot know how to proceed. I donot want to touch the existing module as it is being used in other scenarios. so i saved the .java file as renameAttachmentBean_test.java

How can i go about it?

Regards,

Xineohpi.

Former Member
0 Kudos

Hi,

Create new ejb project by copy pasting the existing code and changing the package,class names .After completion of every thing deploy ear file once again .

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

Regards

Venkat

Former Member
0 Kudos

Hi Venkat

With the help of the link you had provided, i was able to create a new EJB project with the modified code. But i could not find an EAR/JAR file to proceed...

Also i tried deploying the project to our development server from NWDS.. but i keep getting the error "Server couldnot be started"

i looked up in SDN and taking cues, exported the EAR project from NWDS as SAP EAR file. should i deploy it using JSPM / SDM ?

Regards,

Xineohpi.


Former Member
0 Kudos

Hi ,

>>Also i tried deploying the project to our development server from NWDS.. but i keep getting the error "Server couldnot be started"

go to windows-->preferences-->SAP AS JAVA-->give your PI system host name,System no.-->click on register sap instance

From my experience some times suddenly it stops working ,by giving IP address instead of host name in the above step will work.

Regards

Venkat

Former Member
0 Kudos

Hi,

Forgot to say If you couldn't able to deploy from NWDS other option is sharing EAR file to basis to deploy .

right click on EAR project -->export-->j2ee-->EAR file-->give the name and your loc machine path .

You can deploy from NWDS if you have right credentials to access to your PI machine .I always succeeded in deploying from NWDS.

Regards

Venkat

vadimklimov
Active Contributor
0 Kudos

Hi,

Please check the SAP Note 1715441 ("How to deploy .SDA / .EAR files on J2EE servers on Netweaver release 7.1 and higher") that describes possible options and tools for deployment on AS Java 7.1+, and SAP Notes referred in the mentioned SAP Note.

Regards,

Vadim

Former Member
0 Kudos

Hi,

Plz chk the below links:

1.Create Modules for the JEE Adapter Engine:

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

Please refer the link provided by Mr.Mr.Venkat Nimmagadda for the above query. Also additionally you can refer the below link.

2.Convert EAR to SDA File :

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20a221c6-3943-2e10-5198-dada408de...

..........

Mutti

Answers (0)