[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.dtp] Re: Unable to connect to a DB2 8.x database

Earlier versions of DB2 for LUW, such as v8.2, are is still supported. The Connection Profile dialog only seems to know about v9.1, but you can tell it that your database is 9.1 and it should work OK. The problem in this case might be that the JDBC driver you are using is old enough that it doesn't match the version of Java the code was compiled with.

You can get new DB2 JDBC drivers by downloading DB2 Express-C (a free download) from http://www-01.ibm.com/software/data/db2/express/download.html
After installing it you can find the JDBC drivers in the
<install location>/java directory. I think you need the db2jcc.jar and db2jcc_license_cu.jar. You can add the jar paths in the "Jar List" tab of the Driver Definition wizard for the connection profile.


JSP wrote:
I am using Datatools 1.6.2 (although this didn't work in 1.6.1 either).

When I select DB2 for Linux, UNIX and Windows from the Connection Profile Types and then open the "New Driver Definition" dialog, I only see the following two options:

IBM Data Server Driver for JDBC  V9.1
Other Driver V9.1

The problem is that I am using an 8.x driver and nothing shows up for previous versions of DB2.

I get this error when I attempt to test the connection:
java.lang.AbstractMethodError: com.ibm.db2.jcc.a.f.getJDBCMajorVersion()I
at org.eclipse.datatools.enablement.ibm.db2.internal.luw.JDBCLUWJDBCConnection.initVersions(JDBCLUWJDBCConnection.java:59)


at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:112)

at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:53)

at org.eclipse.datatools.enablement.ibm.db2.internal.luw.JDBCLUWConnectionFactory.createConnection(JDBCLUWConnectionFactory.java:27)

at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)

at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:355)

at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)

    at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

I can actually connect if I use the Generic JDBC connection profile type but that gives me another issue, plus I can't get any information when my code accesses the connection profile because it's generic.

Am I doing something wrong? Are previous versions of DB2 not supported any more?