victorio
victorio

Reputation: 6636

oracle weblogic - create new jdbc data source - connection test failed

I just installed oracle webligic 12.1.1, and I follow this videos's instructions: youtube video

I write everything the same as in the video, when I wanted to test it, I got this exception:

Connection test failed.
IO exception: The Network Adapter could not establish the connection<br/>oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:458)
    oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
    oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
    oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
    weblogic.jdbc.common.internal.DataSourceUtil.testConnection(DataSourceUtil.java:298)
    com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:746)
    com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:474)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    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)
    org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:52)
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:97)
...

...

What could be the error, how could I solve it? Please, help me! Thank you!

Upvotes: 0

Views: 9838

Answers (4)

Liz Lemon
Liz Lemon

Reputation: 81

In my case, the error was in Weblogic 12.2.1.3.0. I was creating a new datasource connection using a tnsnames that works perfectly fine in WL 12.1.3. The fix was add more TRANSPORT_CONNECT_TIMEOUT (from 3 to 10) in the connection defined in the tnsnames, because apparently it wasn't enough for stablish a connection. After that, the error was:

Blockquote Could not establish a connection because of java.lang.IllegalArgumentException: ONS configuration failed

I solved this by putting this in setDomainEnv:

-Doracle.jdbc.fanEnabled=false

Upvotes: 1

Jorge Rocha
Jorge Rocha

Reputation: 724

  1. First you have to create a DB, with MySQL or Oracle Database( SQLplus ), but that you already have done.
  2. Then you have to go in your IDE (Eclipse or NetBeans) and select the option to see Services like Databases and Servers.
  3. In Databases with right click (in Netbeans) you can see the option "new database connection", enter your credentials of the database that you already have created and this should resolve your problem if you are using NebBeans.

Upvotes: 2

Geetha reddy Manukonda
Geetha reddy Manukonda

Reputation: 100

weblogic gives us many database options to choose. you have to make sure your database up and running before you try to connect. Just try to create a small DB table and query it by 'SELECT' option and check your DB is perfectly running. Connect giving your DB details correctly like name and type of DB. DERBY database is the inbuilt database provided in weblogic.

Upvotes: 1

Tatarao Vana
Tatarao Vana

Reputation: 621

Error: The Network Adapter could not establish the connection

The main cause of the above issue is the database is down or not pingable or not reachble...check your db services...make sure it is running fine.

Upvotes: 2

Related Questions