cancel
Showing results for 
Search instead for 
Did you mean: 

Prolem in JNDI lookup after restarting server

Former Member
0 Kudos

Hi,

After every restart of SAPWebAS for java,java code in one of our deployed EAR application failing in JNDI lookup of datasource. If we redeploy the same EAR everything works fine. Could any one throw some clues about this problem? Is there any setting for JNDI service to start immediately after starting Web AS

thanks,

Kiran

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kiran,

The JNDI service does start immediately after the Web AS and long before your application. No need to search for such setting. Your racing problem most probably is that someone has not performed binding of your datasource whenever your application is being deployed. Check whoever is creating the datasource and the dependancies between your applications. If you have declared the datasource in application A, then make sure that application B that tries to use it has declared that it should be started after A.

HTH

Peter

Former Member
0 Kudos

Here is a URL describing the tags in the application-j2ee-engine.xml (the file that manages references between applications)

http://help.sap.com/saphelp_erp2005vp/helpdata/en/6f/80c8a05835b54ba68e5b79354b011a/frameset.htm

Former Member
0 Kudos

Hi,

Thanks for your reply.

>>..has not performed binding of your datasource whenever your

Where is the binding performed? We have already configured the datasource through Visual Administrator. The application does a servlet initialization, where JNDI lookup has to be performed in the init() method, due to this one of our backend service fails.

Our environent:

1.SAP Web As for Java

2.application.ear files

3.DataSource configured in Visual Admin

regards,

Kiran

Former Member
0 Kudos

Hi Kiran,

Whenever you create a datasource by the visual administrator, you must fill one field "Application name" the server would think of it as an application with this name that contains just this resource.

However the server will not have any information in what order it should start the applications, unless you tell it.

It could be that your application is started before the datasource or vice-versa. The "way" to tell it is via the link I have already provided. Please check, you must provide reference from your application to the application that was created behind the scenes from VA whenever you created there the datasource. As a bonus your application will not be deployed if someone has not created the datasource in the Visual Administrator.

Btw, the way to avoid such troubles and also to minimize the manual installation steps is not to create resources manually in VA but to declare them via the deployment descriptors and deploy them together with your application. Please check this link :

http://help.sap.com/saphelp_erp2005vp/helpdata/en/bb/69da54d8aedc419d46d9ea074e4d41/frameset.htm

the second paragraph explains how to do that.

HTH

Peter