Log files shows error signaled.:
11:08:38,338 WARN SettingsFactory:82 - Could not obtain connection metadata
java.sql.SQLException: Io exception:
Connection refused(DESCRIPTION=(TMP=)(VSNNUM=168821248)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
Cause
Having had configured the URL (connect string) for JDBC this way:
File: [ hibernate.cfg.xml ]
<property name="hibernate.connection.url">jdbc:oracle:thin:@HOST:521
PF2P</property>
Since error TNS_12505 means there was a problem resolving SID or Service name when trying to connect.
SID "DPF2P" in connect string was invalid.
Solution
Change the url configuration to specify a service name instead of SID (instance name).
The service name is verified in the DB server by runing: lsnrctl services
Correct jdbc url::
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTO =TCP)(HOST=host)(PORT=521)))(CONNECT_DATA=(SERVICE_NAME=dpf2p)))
Partager