cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in JNDI Lookup of Deployable Proxy inside logon.par

Former Member
0 Kudos

Hi,

I have customized the Logon par file and have a functionality to call a webservice when the Password Reset happens.

<b>From the ResetPassword.jsp , SAPMLogonLogic.java is getting called ,and there is a method called performResetPassword().</b>

I am calling a Deployable Proxy in that method by using the below code,

<b>Gateway objGateway=(SMSGateway)ctx.lookup("java:comp/env/MailProxy");

MailGatewayViDocument objSMSGatewayViDocument=(MailGatewayViDocument )objGateway.getLogicalPort("wsPort_Document",MailGatewayViDocument.class);

objMailGatewayViDocument.sendMail(...);</b>

I am getting the Exception,

com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at java:comp, the whole lookup name is java:comp/env/MailProxy.

I have deployed the Deployable Proxy in the J2EE Engine and add this API Jar as the External Library (Project >Properties>Java Build Path ---> Add External jars...Added the .jar file generated in the Proxy Project).

<b>Please let me know the possible solutions where i can call a deployable proxy inside the logon par file.</b>

Thanks and Regards,

Sekar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sekar!

I think the JNDI name is not correct. Normally it's like this, more or less:

wsclients/proxies/yourvendor/yourproxyProyectName/proxyPackage.yourproxy

Replace string between * * with yours. You can also check it out at Visual Administrator -> Services->Destinations.

Hope this helps

Eneko.

Former Member
0 Kudos

Hi Eneko,

<b>I have the Destination name ,

sap.com/CHEPSMSProxy/com.ms.sap.sms.SMSProxy/wsPort_Document</b>

in the Visual Admin Services --> Destinations.

Is this the JNDI name i need to use?.

How i can lookup this name.

Is it like this,

<b>MailGateway objMailGateway=(MailGateway)ctx.lookup("java:comp/env/sap.com/MailProxy/com.ms.sap.sms.MailProxy/wsPort_Document");</b>

Is that correct?.

Thanks and Regards,

Sekar

Former Member
0 Kudos

Hi Sekar!

Try this:

MailGateway objMailGateway=(MailGateway)ctx.lookup

("wsclients/proxies/sap.com/MailProxy/com.ms.sap.sms.MailProxy/wsPort_Document");

I have understood you're deploying a par file... if you are doing this way, don't forget to put a reference to the webservice in portalApp.xml:

<property name="PrivateSharingReference" value="SAPJ2EE::sap.com/com.ms.sap.sms.MailProxy"/>

Hope this can work.

Are you sure this destination is the one you are looking for?

sap.com/CHEPSMSProxy/com.ms.sap.sms.SMSProxy/wsPort_Document

It seems to be anther app. If this is the correct app then the JNDI should be:

MailGateway objMailGateway=(MailGateway)ctx.lookup

("wsclients/proxies/sap.com/CHEPSMSProxy/com.ms.sap.sms.SMSProxy/wsPort_Document");

If this fails and if you have have source code of the proxy app, check out the application.xml file, and look for Display name. Also look for the application-j2ee-engine.xml file, and look for the 'Vendor name', and post them please.

Eneko

Message was edited by:

Eneko Rodriguez

Former Member
0 Kudos

Hi again!

Here you can look the definitive JNDI name:

Visual Admin->JNDI Registry->wsclients->proxies

Search your service, and the JNDI name will be the complete tree beginning from wsclients (wsclients/proxies/....), but no considering the last leafs (ClassName and Object Value).

For example, if you find wsclients->proxies->A->B->C->ClassName,ObjectValue

The JNDI will be wsclients/proxies/A/B/C

Hope this is the good one.

Eneko.

Former Member
0 Kudos

Hi Eneko,

Yes...You are right. I have resolved this JNDI naming Exception.

Regards,

Sekar

ashish_shah
Contributor
0 Kudos

Hi Sekar,

Can you share what should be the correct JNDI name for a DC?

My DC name is abc/sc/dc_aptea , i have taken this name from application.xml file of Enterprise archieve project from the tag <display-name> </display-name>

Vendor name is abc.com , taken from application-j2ee-engine.xml file of Enterprise archieve project

my stateless bean name is FetchDataBean taken from ejbjar.xml file from tag <ejb-name></ejb-name> of EJB DC.

and in my ejb-j2ee-engine.xml file i have given the JNDI name as

<jndi-name>FetchDataBean</jndi-name>

while referring to the JNDI name from Command bean DC i have given JNDI name as



private FetchDataHome home = (FetchDataHome) 
javax.rmi.PortableRemoteObject.narrow(context.lookup("FetchDataBean"),FetchDataHome.class);

Is everything correct here?

Regards,

Ashish Shah

Answers (0)