Thursday, May 22, 2014

weblogic.common.ResourceException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

You are trying to restart your soa server and you are getting below error in the soa error logs

Failed to initialize the application 'SOADataSource' due to error weblogic.application.ModuleException: .
weblogic.application.ModuleException:
at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:327)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159)
Truncated. see log file for complete stacktrace
Caused By: weblogic.common.ResourceException: weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor


This is not allowing you to start your soa server.

As you can notice that it is failing while connecting to your data source.

The reason is that the database to which the data source was connecting is down.

Ideally we expect that even if the custom data source is not able to connect to the backend data base it should not restrict the soa to get started.

Normally when a soa server starts up or shrink the initial capacity is used.
By default when a data source is configured the initial capacity is set to 1.

This creates the issue, when server is started if finds the initial capacity is set to 1 hence it will keep on trying to connect to the backend database , but since the backend database is down it will not complete this and will cause issue in soa server start.

Hence in order to resolve this issue one can set the initial capacity to zero.
This will allow soa not try to connect to the database using the datasource.

One can go to the soa admin console.

Go to Services--->Data sources

Select your data source and go to connection pool tab

and update the Initial capacity to 0


No comments: