cancel
Showing results for 
Search instead for 
Did you mean: 

PI 7.1 Custom module deployment

steve_coombes
Participant
0 Kudos

Hello,

I am struggling to implement and deploy a custom module. I have found some comprehensive documents on SCN but can't see what I might be doing wrong.

I have written a module using NWDS 7.3 and have deployed to our PI 7.1 server. From Netweaver Administrator I can see the JNDI reference :

Reference Class Name:
Type: clientAppName
Content: sap.com/DMISC_Module_EAR
Type: interfaceType
Content: remote
Type: home
Content: com.sap.aii.af.lib.mp.module.ModuleHome
Type: ejb-link
Content: DMISCJournalFormat
Type: jndi-name
Content: DMISCJournalFormatHeader
Type: remote
Content: com.sap.aii.af.lib.mp.module.ModuleRemote

I have configured a Communication Channel to use the new module, but it then fails with a NamingException :

Module Exception 'com.sap.aii.af.lib.mp.processor.ModuleProcessorException: Error during processing local bean: localejbs/DMISCJournalFormatHeader' found, cause: com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception during lookup operation of object with name localejbs/DMISCJournalFormatHeader, 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/DMISC_Module_EAR
Type: interfaceType
Content: local
Type: ejb-link
Content: DMISCJournalFormat
Type: jndi-name
Content: DMISCJournalFormatHeader
Type: local-home
Content: com.sap.aii.af.lib.mp.module.ModuleLocalHome
Type: local
Content: com.sap.aii.af.lib.mp.module.ModuleLocal

javax.ejb.EJBException: 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.exceptions.ServerDeploymentException: [ERROR CODE DPL.DS.5029] Exception in operation startApp with application sap.com/DMISC_Module_EAR.

I notice that PI is using a JNDI name with a 'localejbs/' prefix. I also notice that it appears to be attempting to access the EJB remotely, and the JNDI details in the stack trace don't include the remote configuration which is in the ejb-jar.xml..

My ejb-jar.xml is as follows :

        <session>

            <icon/>

            <ejb-name>DMISCJournalFormat</ejb-name>

            <home>com.sap.aii.af.lib.mp.module.ModuleHome</home>

            <remote>com.sap.aii.af.lib.mp.module.ModuleRemote</remote>

            <local-home>com.sap.aii.af.lib.mp.module.ModuleLocalHome</local-home>

            <local>com.sap.aii.af.lib.mp.module.ModuleLocal</local>

            <ejb-class>com.sap.adaptermodule.DMISCJournalFormatBean</ejb-class>

            <session-type>Stateless</session-type>

            <transaction-type>Container</transaction-type>

        </session>

It looks to me like the JNDI lookup is not returning the Java class to be used. Have I missed something?

Finally, I have used a SAP package 'com.sap.adaptermodule' for my EJB. This was done in the example I was following but is this correct. or should I use a custom package?

Kind regards

Steve

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Your ejb-jar.xml file looks OK to me, but since u r using NWDS 7.3 to create ur AM so i hope while creating ejb project u might have selected ejb version as 2.1?

In addition to that, u can check below wiki for the error codes

http://wiki.scn.sap.com/wiki/display/TechTSG/%28JSTTSG%29%28TG%29Q1100

Thanks

Amit Srivastava

steve_coombes
Participant
0 Kudos

Hello Amit

Many thanks for your message. I was using  EJB version 2.1.

The error codes are very useful. From the Communcation Channel Monitor I get error code DPL.DS.5029 and according to the error code page I should log a call with SAP.

If I get anything back from them I'll update this discussion.

Kind regards

Steve

Answers (2)

Answers (2)

anandvithal
Active Participant
0 Kudos

Hi Steve,

Do not use any prefix in the module name of process sequence. Just provide the value of JNDI that you have provided while creating the project.

Thank,

Anand

steve_coombes
Participant
0 Kudos

Hello Anand

Many thanks. I have taken the prefix off.

The lookup seems to find the details I entered in JNDI, but then fail starting the remote client.

Kind regards

Steve

steve_coombes
Participant
0 Kudos

With some help I have managed to deploy a custom module. I used NWDS (also known as Composition Environment) 7.1 which is the same version as our PI server.

I used the instructions in 'How to ... Create Modules for the JEE Adapter Engine' version 1.1 from June 2008 for PI 7, which includes more configuration steps than the version for NWDS 7.3.

Unfortunately the custom module does not allow me to do what I had originally wanted to achieve, which is to change the message payload before Content Conversion takes place in a Sender File Communication Channel.

Steve

Former Member
0 Kudos

Hi Steve,

Is the module deployed without any warnings?

I hope your module has been deployed with warnings.

Can you please do the below steps.

1. Right click on EJB project folder. Go to properties -> Java Compiler. By default the compiler level will be 1.6. Please change it to 1.5 and save.

2. EJB project folder will turn in to red color. Ignore the same and re-deploy the module. It should be deployed without any error or warnings.

Regards,

Veerendra.

steve_coombes
Participant
0 Kudos

Hello Veerendra

The module was deployed with warnings, but your thanks to your suggestion it is deployed successfully without warnings.

I changed the Compiler Level to 1.6. I also changed the Java Facet to use Java 5.0 and that removed the errors in NWDS.

I still get an error when submitting a file but am making progress.

Kind regards

Steve

Former Member
0 Kudos

What is the error now you are facing?

steve_coombes
Participant
0 Kudos

Hello Veerendra

The following is taken from the Communication Channel Monitor :

MP: processing local module localejbs/DMISCJournalFormatHeader

MP: exception caught with cause com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception during lookup operation of object with name localejbs/DMISCJournalFormatHeader, 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/DMISC_Module_EAR Type: interfaceType Content: remote Type: ejb-link Content: DMISCJournalFormat Type: jndi-name Content: localejbs/DMISCJournalFormatHeader Type: home Content: com.sap.aii.af.lib.mp.module.ModuleHome Type: remote Content: com.sap.aii.af.lib.mp.module.ModuleRemote javax.ejb.EJBException: 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.exceptions.ServerDeploymentException: [ERROR CODE DPL.DS.5029] Exception in operation startApp with application sap.com/DMISC_Module_EAR. at

...

I looked up the error codes using the page that Amit supplied, but unfortunately it doesn't explain the problem or provide a solution, but suggests logging a call with SAP. The error codes are DPL.DS.5029 and DPL.DS.6125.

Kind regards

Steve