1

I installed Oracle 12c database server created the database using DBCA on RedHat Enterprise Linux 7. I can connect to the database using sqldeveloper on windows 7. I configured SSH Tunnel in putty. I start a putty session by logging to the RHEL 7 server. Then I start the sqldeveloper and login to the database. I have Weblogic 12c server installed on the same RHEL 7 machine and I am configuring a Generic Datasource to connect to the database on the same RHEL 7 machine and getting the following error:

Connection test failed.

Listener refused the connection with the following error: 
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:774)
oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:702)
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:39)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:691)
weblogic.jdbc.common.internal.DataSourceUtil.testConnection0(DataSourceUtil.java:371)
weblogic.jdbc.common.internal.DataSourceUtil.access$000(DataSourceUtil.java:24)
weblogic.jdbc.common.internal.DataSourceUtil$1.run(DataSourceUtil.java:285)
java.security.AccessController.doPrivileged(Native Method)
weblogic.jdbc.common.internal.DataSourceUtil.testConnection(DataSourceUtil.java:282)
com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:937)
com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:524)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)
org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)
...

I don't see tnsnames.ora, listener.ora and sqlnet.ora files under /network/admin folder. I heard from someone that if I am working on the server there is no need to have those files. I tried to create listener.ora and tnsnames.ora file to see if it resolves the error. But, that didn't help. If I have tnsnames or listener files, I see the failure to connect from my windows machine using sqldeveloper as well. Any help is greatly appreciated.

Thanks.

2
  • Well the error says the listener used in connection string used by WebLogic is not up or active. Check the output of lsnrctl status to see the listener is up otherwise the restart the listener lsnrctl stop followed by lsnrctl start. Commented Apr 16, 2018 at 0:59
  • Thanks for the reply. Listener is up. Here is what I see: STATUS of the LISTENER Alias LISTENER Version TNSLSNR for Linux: Version 12.2.0.1.0 - Trace Security ON: Local OS Authentication SNMP OFF Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ip-10-122-55-57.internal)(PORT=1521))) Services Summary... Service "devstats.internal" has 1 instance(s). Instance "DEVSTATS", status READY, has 1 handler(s) for this service... Commented Apr 16, 2018 at 20:09

1 Answer 1

1

The issue was resolved by replacing the SID with service name in connect string in datasource configuration of weblogic

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.