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.
lsnrctl statusto see the listener is up otherwise the restart the listenerlsnrctl stopfollowed bylsnrctl start.