After installing Harweb, when we try to start up Tomcat it has this error:
Loading DB authentication from SCM...
Loading authentication successful.
ConnectionPool: JDBCDriver = oracle.jdbc.driver.OracleDriver
ConnectionPool: JDBCConnectionURL: jdbc:oracle:thin:@oracle=server:1530:ORATNS
ConnectionPool: ConnectionPoolSize = 5
ConnectionPool: ConnectionPoolMax = 100
ConnectionPool: ConnectionUseCount = 5
ConnectionPool: ConnectionTimeout = 2 seconds
ConnectionPool: Registering oracle.jdbc.driver.OracleDriver
..created pool of size 5java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
Release : 14.0
During Harweb installation it asks for the Oracle database's hostname, port number and SID. Accordingly it builds the JDBCConnectionURL in this format:
In many cases, the Oracle SID and the TNS Service Name are the same, but sometimes they're different. To build the JDBCConnectionURL to use the TNS Service Name instead of the SID you have to use this format:
In this case we knew the TNS Service Name but not the SID so we edited the harweb.cfg file inside <tomcathome>\webapps\Harweb\WEB-INF and changed the format of the JDBCConnectionURL to have the slash instead of the colon.
After this, Tomcat and Harweb were able to start normally.