Topic
3 replies Latest Post - ‏2013-04-05T21:07:14Z by vpetrill
SystemAdmin
SystemAdmin
1632 Posts
ACCEPTED ANSWER

Pinned topic Erro -connection was unsuccessful

‏2012-11-26T08:40:59Z |
I can't connect to db2 database from Data Studio. The same error was exists when I try connect to the same db2 database from application written in java.

A connection attempt was unsuccessful.

Summary

SQL4220N A connection attempt has failed and generated an SQLException.

Try the following suggestions to help solve the problem:

Follow the link in the Additional Resources section to learn more about the SQL code generated and how to fix it.
Verify that the host name and other properties on the General page are valid.
To further diagnose the problem, return to the Properties section and use the Tracing page to enable tracing. Contact the database administrator and provide the trace and other support information available.
Full message content: jcc1040211146http://4.13.111 Cannot convert Unicode string to Ebcdic string.

Explanation

Explanation:

The connection attempt has generated an SQLException. The content of the SQLException is: jcc1040211146http://4.13.111 Cannot convert Unicode string to Ebcdic string. ERRORCODE=-4220, SQLSTATE=null

User response:

Inspect the SQL code associated with the SQLException to determine the cause of the problem.
SQLSSTATE: null

Support

Connection Properties

Database : name
URL : jdbc:db2://127.0.0.1:50001/name:retrieveMessagesFromServerOnGetMessage=true;
User name : name
Password : (Not Shown)

Environment

Driver class name = com.ibm.db2.jcc.DB2Driver
Driver version = 4.13.111
Driver JAR file path = C:\Program Files (x86)\IBM\SDPShared\plugins\com.ibm.datatools.db2_2.1.403.v20120228_2105\driver\db2jcc4.jar;C:\Program Files (x86)\IBM\SDPShared\plugins\com.ibm.datatools.db2_2.1.403.v20120228_2105\driver\db2jcc_license_cisuz.jar
Operating system name = Windows 7
Operating system architecture = x86
Operating system version = 6.1 build 7601 Service Pack 1
JVM implementation vendor = IBM Corporation
JVM runtime = Java(TM) SE Runtime Environment
Java version = JRE 1.6.0 IBM J9 2.4 Windows 7 x86-32 jvmwi3260sr10-20111207_96808 (JIT enabled, AOT enabled)
J9VM - 20111207_096808
JIT - r9_20111107_21307ifx1
GC - 20110519_AA
Launcher = C:\Program Files (x86)\IBM\DS3.1.1\eclipse.exe

Stack Trace

com.ibm.db2.jcc.am.SqlException: jcc1040211146http://4.13.111 Cannot convert Unicode string to Ebcdic string. ERRORCODE=-4220, SQLSTATE=nullcom.ibm.db2.jcc.am.id.a(Unknown Source)
com.ibm.db2.jcc.am.id.a(Unknown Source)
com.ibm.db2.jcc.am.id.a(Unknown Source)
com.ibm.db2.jcc.am.y.a(Unknown Source)
com.ibm.db2.jcc.t4.fb.a(Unknown Source)
com.ibm.db2.jcc.t4.fb.a(Unknown Source)
com.ibm.db2.jcc.t4.gb.c(Unknown Source)
com.ibm.db2.jcc.t4.gb.b(Unknown Source)
com.ibm.db2.jcc.t4.gb.a(Unknown Source)
com.ibm.db2.jcc.t4.b.c(Unknown Source)
com.ibm.db2.jcc.t4.b.b(Unknown Source)
com.ibm.db2.jcc.t4.b.b(Unknown Source)
com.ibm.db2.jcc.t4.b.c(Unknown Source)
com.ibm.db2.jcc.t4.b.a(Unknown Source)
com.ibm.db2.jcc.t4.b.a(Unknown Source)
com.ibm.db2.jcc.t4.b.<init>(Unknown Source)
com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(Unknown Source)
com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(Unknown Source)
com.ibm.db2.jcc.DB2Driver.connect(Unknown Source)
com.ibm.db2.jcc.DB2Driver.connect(Unknown Source)
org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(Unknown Source)
org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(Unknown Source)
org.eclipse.datatools.connectivity.DriverConnectionBase.open(Unknown Source)
org.eclipse.datatools.enablement.ibm.db2.internal.luw.JDBCLUWConnectionFactory.createConnection(Unknown Source)
org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(Unknown Source)
org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(Unknown Source)
com.ibm.datatools.connection.internal.ui.databases.NewDatabaseConnnectionWizardPage.handleTestConnection(Unknown Source)
com.ibm.datatools.connection.internal.ui.databases.NewDatabaseConnnectionWizardPage.access$6(Unknown Source)
com.ibm.datatools.connection.internal.ui.databases.NewDatabaseConnnectionWizardPage$10.handleEvent(Unknown Source)
org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
org.eclipse.jface.window.Window.runEventLoop(Unknown Source)
org.eclipse.jface.window.Window.open(Unknown Source)
com.ibm.datatools.adm.explorer.ui.action.NewDatabaseConnectionProfileAction.run(Unknown Source)
org.eclipse.jface.action.Action.runWithEvent(Unknown Source)
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(Unknown Source)
org.eclipse.jface.action.ActionContributionItem.access$2(Unknown Source)
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(Unknown Source)
org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Source)
org.eclipse.ui.internal.Workbench.runUI(Unknown Source)
org.eclipse.ui.internal.Workbench.access$4(Unknown Source)
org.eclipse.ui.internal.Workbench$7.run(Unknown Source)
org.eclipse.core.databinding.observable.Realm.runWithDefault(Unknown Source)
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source)
org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source)
org.eclipse.ui.internal.ide.application.IDEApplication.start(Unknown Source)
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Unknown Source)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.eclipse.equinox.launcher.Main.invokeFramework(Unknown Source)
org.eclipse.equinox.launcher.Main.basicRun(Unknown Source)
org.eclipse.equinox.launcher.Main.run(Unknown Source)
org.eclipse.equinox.launcher.Main.main(Unknown Source)
Updated on 2013-04-05T21:07:14Z at 2013-04-05T21:07:14Z by vpetrill
  • IrisWang
    IrisWang
    5 Posts
    ACCEPTED ANSWER

    Re: Erro -connection was unsuccessful

    ‏2012-12-05T08:57:21Z  in response to SystemAdmin
    Hello,

    In order to do further investigation, could you please provide following information?
    1.What is the db2 version of your db?
    2.What is the codepage and codeset of your db?
    3.What is the locale of your machine which is running Data Studio in?

    Thanks in advance!
    Iris
  • SystemAdmin
    SystemAdmin
    1632 Posts
    ACCEPTED ANSWER

    Re: Erro -connection was unsuccessful

    ‏2013-04-04T06:24:36Z  in response to SystemAdmin
    Hi, i had a same problem.

    DB2 10.1 in Ubuntu 12.04 x64
    DS 3.2 in Windows 7 x64
    Problem results from a windows user name, you can not have Polish (or another national) characters in its name.

    Creating a new user without Polish characters solved the problem.

    for example, my name is " Michał", "ł" it can not appear.
  • vpetrill
    vpetrill
    21 Posts
    ACCEPTED ANSWER

    Re: Erro -connection was unsuccessful

    ‏2013-04-05T21:07:14Z  in response to SystemAdmin
    Is your question answered? If so, can you indicate this in the post? It helps us identify threads that are stale.