header
header
Main Menu
Home
Eviware Store
Downloads
Products
News
Forum
Eviware Blog
Search
FAQs
Customer Area
Support
Documentation
Tutorials
CookBook
Downloads
Forum
Login Form
Welcome, Guest. Please login or register.
November 22, 2008, 02:40:32 am
Username: Password:
Login with username, password and session length

Forgot your password?
 
JDBC connection problems
Welcome, Guest. Please login or register.
November 22, 2008, 02:40:32 am
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  JDBC connection problems
« previous next »
Pages: [1] Print
Author Topic: JDBC connection problems  (Read 582 times)
TomK
soapui pro users
Newbie
*
Posts: 25


« on: June 13, 2008, 12:35:09 pm »

Hi all,

I searched through the forums and people have posted similar issues but no resolution was posted to those. Hence I'm posting again.

I'm trying to connect to DB2 via JDBC from soapUI (tried both Datasource and Groovy script) and they both complain about not finding a suitable driver when I have copied the jar file in soapui/bin/ext (and jre/lib/ext).

This is the driver and string I'm using:
COM.ibm.db2.jdbc.app.DB2Driver
jdbc:db2://xxxxxxx.uk.gl3:XXXXX/XXXXXX

I would appreciate any advice.

Thanks,

Tom
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #1 on: June 13, 2008, 12:44:02 pm »

Hi Tom!

2 questions for you:

1) Can you see in the soapui log that the driver jar is being loaded at startup?
2) What is the exact error message you are getting? (details in the error-log?)

regards,

/Ole
eviware.com
Logged
TomK
soapui pro users
Newbie
*
Posts: 25


« Reply #2 on: June 13, 2008, 01:42:15 pm »

1) Can you see in the soapui log that the driver jar is being loaded at startup?
Yes
Fri Jun 13 11:03:28 BST 2008:INFO:Added [file:/C:/Program%20Files/eviware/soapUI-Pro-2.0.2/bin/ext/db2java-8.jar] to classpath

2) What is the exact error message you are getting? (details in the error-log?)
Fri Jun 13 11:03:45 BST 2008:ERROR:java.sql.SQLException: No suitable driver found for jdbc:db2://xxxxxx.uk.gl3:000000/XXXXXX

Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #3 on: June 15, 2008, 08:06:23 am »

Hi Tom,

are there any other error messages in the console log? Could it be that the db2 driver requires some other dependencies also to be loaded?

regards,

/Ole
eviware.com
Logged
TomK
soapui pro users
Newbie
*
Posts: 25


« Reply #4 on: June 16, 2008, 06:34:08 pm »

I have managed to narrow it down to that this driver may not support username and passord in the URL.
I have used another driver (db2jcc) which supports the user and password in the string and now I'm getting:

Mon Jun 16 06:30:19 BST 2008:ERROR:An error occured [[ibm][db2][jcc][10103][10941] Method executeQuery cannot be used for update.], see error log for details

This is the SQL I'm using:

"SELECT * FROM YESNONA"

I'm really frustrated with this. I would want to purchase soapUI pro and get started with my testing, but I really can't do any testing with a DB connection.

Any help would be very much appreciated.
Logged
ramesh nallavolu
Newbie
*
Posts: 30


« Reply #5 on: June 17, 2008, 03:13:55 pm »

While copying driver information on saop UI, be cautious... extra spaces might cause problem in identifying driver.  So remove any extra spaces when you filled driver information in data source form
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #6 on: June 18, 2008, 06:16:39 am »

Hi,

thanks for pointing this out, we'll make this a bit more error-proof in the next release..

regards!

/Ole
eviware.com
Logged
TomK
soapui pro users
Newbie
*
Posts: 25


« Reply #7 on: June 18, 2008, 10:48:04 am »

I don't think I had any extra spaces in there.

Managed to figure out the following.

IBM DB2 Type 2 driver does not work from Datasource step as it does not support user and password attributes in the URL.

so this driver won't work: COM.ibm.db2.jdbc.app.DB2Driver (db2java.jar) from Datasource step. (It works from a groovy script)

Instead IBM DB2 Type 4 driver (db2jcc.jar) does work:

com.ibm.db2.jcc.DB2Driver and connection URL:

jdbc:db2:[//server:port/]database:user=XXX;password=XXX;

Also quotes around the SQL in the SQL field cause an exception to be thrown.
« Last Edit: June 18, 2008, 10:50:41 am by TomK » Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
header header
header
header