FOM/OMLR microservice fails to start due to ORA-12505 error

FOM/OMLR microservice fails to start due to ORA-12505 error

book

Article ID: KB0072720

calendar_today

Updated On:

Products Versions
TIBCO Order Management 5.0.0

Description

Use case:
The oracle database and listeners are up and running, but the microservice fails to start and below traces are logged in FOSStarter.log file:
===
Jan 04, 2022 4:12:03 PM com.tibco.fom.configShare.FOSStarter main
SEVERE: Exception occur due to java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743)
        at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
        at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
        at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)
        at com.tibco.fom.configShare.ShareConfigurationDownload.downloadAllFiles(ShareConfigurationDownload.java:171)
        at com.tibco.fom.configShare.FOSStarter.main(FOSStarter.java:130)
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

        at oracle.net.ns.NSProtocolStream.negotiateConnection(NSProtocolStream.java:275)
        at oracle.net.ns.NSProtocol.connect(NSProtocol.java:264)
        at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
        ... 7 more
===
 

Environment

ALL

Resolution

The error is encountered most probably because the database name is not correct in configDBrepo.properties (configurator.db.jdbcUrl property) of the failing microservice.

To solve the issue:

1. Get database name. This can be done by executing the sql query:
-select name from V$database;
Ex:
===
SQL> select name from V$database;

NAME
---------
ORCL12
===
Or 
-"select * from global_name;".
ex:
===
SQL> select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
ORCL12.LOCALDOMAIN
===
Please note that GLOBAL_NAME has the default value of "db_name + db_domain".

2. Provide the correct database name for the property "configurator.db.jdbcUrl" in configDBrepo.properties of the failing microservice.  
Ex:
==
configurator.db.jdbcUrl=jdbc:oracle:thin:@localhost:1521:ORCL12
==

Also, please make sure that there are no syntax/typo errors in the value of "configurator.db.jdbcUrl" property. 

Issue/Introduction

This article deals with the failure to start up of a FOM/OMLR microservice (omsServer, configurator, omsui, aopd and ocs) due to "ORA-12505" error, although the database and listeners are up and running.