Problem
While creating a Oracle Data source in weblogic 12c, If you are encountering the below error message upon TestConnection.
Though all the SID(Database name) and Host and Port are Correct
Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
<br/>oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743).
<br/>oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
<br/>oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
<br/>oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
<br/>weblogic.jdbc.common.internal.DataSourceUtil.testConnection0(DataSourceUtil.java:340)<br/>weblogic.jdbc.common.internal.DataSourceUtil.access$000(DataSourceUtil.java:22)<br/>weblogic.jdbc.common.internal.DataSourceUtil$1.run(DataSourceUtil.java:254)<br/>java.security.AccessController.doPrivileged(Native Method)<br/>weblogic.jdbc.common.internal.DataSourceUtil.testConnection(DataSourceUtil.java:251)<br/>com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:751)
For Example: Given below is my JDBC URL string where
dbserver.mwinventory.in is my DB HOST
userrepo is my SID/DATABASE NAME
Full Connection URL: jdbc:oracle:thin:@dbserver.mwinventory.in:1522:usersrepo
Solution
As obvious, the solution to the problems are always simple
You just have to tweak your Connection URL
From:
jdbc:oracle:thin:@dbserver.mwinventory.in:1522:usersrepo
to
jdbc:oracle:thin:@dbserver.mwinventory.in:1522/usersrepo
Yes, You got it right!. It's just replacing ":" Colon with "/" slash
I was actually banging my head for lot of time. I hope I saved your head 🙂
More from Middleware Inventory
Weblogic 12c Nodemanger Native Version ExceptionException: weblogic.nodemanager.common.configexception: native version is enabled but nodemanager native library could not be loaded Solution: For Weblogic10 & 11g Go to your $WL_HOME/common/nodemanager/ Edit the nodemanger.properties file ( If not available create it) Change the value of NativeVersionEnabled=true to NativeVersionEnabled=false Restart the Nodemanager For Weblogic 12c Go to your Domain/nodemanager directory (i.e: /apps/oracle-weblogic/domains/mwidomain/nodemanager/) Edit…
-
What is ORACLE_HOME,MW_HOME,WL_HOME in Weblogic 12cThe Objective In this post, we are going to see what are the different types of home directories available in weblogic and the various options or methods to find the ORACLE_HOME, MW_HOME and WL_HOME of your weblogic 12c installation. The commands and the methods are mostly given for the LINUX…
-
Docker Weblogic : Run Oracle Weblogic 12c on DockerThe Introduction to Docker Weblogic In this post, we are going to be exploring the quick and easy option available to get started with weblogic and Docker. In this post, we are going to see how to create a weblogic container in docker in a few easy steps. The post's…
-
Recover weblogic password in 4 steps - Weblogic 12cThe Objective In this post, we will see the easiest way possible to decrypt the WebLogic admin server password. in other words, recovering WebLogic password. You do not need to create a JAR file or copy any security-related files etc. You do not even need your AdminServer to be running. Just…
-
Weblogic Active Gridlink Datasource creation script WLSTThe Objective The post is about how to do Weblogic Active Grid Link Data source creation using WLST. We are giving WLST script here to accomplish the same. It has some nice features like Duplicate Validation Test Connection Database Credential validation Bulk Datasource creation. We hope you would find it…