Question

I am a newbie to talend tool and I am trying to create a job for which I had established a DB connection It was working fine before but since I restarted talend I had to import the existing project into new workspace and now the connection doesnt happen I get

Connection failure. You must change the Database Settings.
  java.lang.RuntimeException: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
      at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:179)
      at org.talend.core.model.metadata.builder.database.ExtractMetaDataUtils.connect(ExtractMetaDataUtils.java:1034)
      at org.talend.core.model.metadata.builder.database.ExtractMetaDataFromDataBase.testConnection(ExtractMetaDataFromDataBase.java:300)
      at org.talend.repository.ui.utils.ManagerConnection.check(ManagerConnection.java:293)
      at org.talend.repository.ui.wizards.metadata.connection.database.DatabaseForm.checkConnection(DatabaseForm.java:2008)
      at org.talend.repository.ui.wizards.metadata.connection.database.DatabaseForm.access$39(DatabaseForm.java:1933)
      at org.talend.repository.ui.wizards.metadata.connection.database.DatabaseForm$23.widgetSelected(DatabaseForm.java:2261)
      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
      at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
      at org.eclipse.jface.window.Window.open(Window.java:801)
      at org.talend.repository.ui.actions.metadata.CreateConnectionAction.doRun(CreateConnectionAction.java:207)
      at org.talend.repository.ui.actions.AContextualAction$2.run(AContextualAction.java:608)
      at org.talend.repository.RepositoryWorkUnit.executeRun(RepositoryWorkUnit.java:93)
      at org.talend.core.repository.model.AbstractRepositoryFactory.executeRepositoryWorkUnit(AbstractRepositoryFactory.java:237)
      at org.talend.repository.localprovider.model.LocalRepositoryFactory.executeRepositoryWorkUnit(LocalRepositoryFactory.java:3197)
      at org.talend.core.repository.model.ProxyRepositoryFactory.executeRepositoryWorkUnit(ProxyRepositoryFactory.java:1979)
      at org.talend.repository.ui.actions.AContextualAction.run(AContextualAction.java:617)
      at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
      at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
      at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
      at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
      at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
      at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
      at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
      at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      at org.talend.rcp.intro.Application.start(Application.java:145)
      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
  Caused by: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:489)
      at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)
      at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:254)
      at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)
      at org.talend.core.model.metadata.builder.database.DriverShim.connect(DriverShim.java:41)
      at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:170)
      ... 48 more
  Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
      at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:439)
      at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:454)
      at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:693)
      at oracle.net.ns.NSProtocol.connect(NSProtocol.java:251)
      at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1140)
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:340)
      ... 54 more
  Caused by: java.net.ConnectException: Connection refused: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(Unknown Source)
      at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:149)
      at oracle.net.nt.ConnOption.connect(ConnOption.java:133)
      at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:405)
      ... 59 more

Help me resolve this issue. I googled a lot but not able to solve this issue.

Was it helpful?

Solution

The error you're getting might simply be pointing to the fact that the database is not accessible from your machine, as in the hostname cannot be reached.

To verify the same, try connecting to the database using any IDe of your choice - SQLDeveloper/Toad or simply SQL*plus.

OTHER TIPS

Error is pointing about unavailability of database for your machine. To check status of any service including databases simply execute command services.msc in run menu, and you can enable service manually if it is disabled by choosing Start service option. And you will be good to go.

Try checking your connection details, Sometimes there might be a chance to have irrelevant values passing to the connection details to your components like passing wrong context variables or values. Or sometimes there might be a chance that your output or input component is not connected with the component from which you are passing the context.

**Check:**Try to print the connection details you are passing and see whether they are appropriate or not. If not try to find out for the possible reason by checking the above situations.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top