Forum Discussion
Kevin_Mannering
14 years agoOccasional Contributor
Well I had a lot of fun solving this, and would like to share it.
First I upgraded to the latest version of soapui-Pro. The installation causes the first problem: I am running a German version of windows, so although Windows will have no problem finding "c:\Programme" rather than "C: \program files" Soapui will have them and won't find the drivers as a result, do so don't take the default at installation set up, tell it to use "C:\Programme" or whatever if you are using a non_English version of windows.
Second, don't use the desktop icon to start Soapui. This is the property of what the install created and it doesn't load the drivers.
C:\Programme\SmartBear\soapUI-Pro-4.5.1\bin\soapUI-Pro-4.5.1.exe
Start Soapui-pro from C:\Programme\SmartBear\soapUI-Pro-4.5.1\bin\. this will open a cmd black window and provide you with a log. (Soapui also tries to save this log, but that failed on me because of permissions.)
Here comes the exciting bit: it will log this info, telling you which drivers he has picked up!!
If your driver is not there, it won't find it later
12:54:51,056 INFO [SoapUI] Adding [C:\Program Files\SmartBear\soapUI-Pro-4.5.1\
bin\ext\jconn3.jar] to extensions classpath
12:54:51,057 INFO [SoapUI] Adding [C:\Program Files\SmartBear\soapUI-Pro-4.5.1\
bin\ext\postgresql-8.3-604.jdbc3.jar] to extensions classpath
12:54:51,057 INFO [SoapUI] Adding [C:\Program Files\SmartBear\soapUI-Pro-4.5.1\
bin\ext\postgresql-8.3-604.jdbc4.jar] to extensions classpath
12:54:51,058 INFO [SoapUI] Adding [C:\Program Files\SmartBear\soapUI-Pro-4.5.1\
bin\ext\sqljdbc.jar] to extensions classpath
Those readers still awake will have noticed that on my pc those directory paths are wrong, but that doesn't bother our hero, he found the drivers there and if he is happy, so am I.
the key driver for me is the jconn3.jar for sybase.
Now for the connection strings. First you have to set your preferences: select preferences from the File dropdown on the soapui front page.
goto you JDBC driver properties and put this in:
Driver Connection String template
com.sybase.jdbc3.jdbc.SybDriver jdbcsybase:Tds<HOST:127.0.0.1>:<PORT:5000>/<DB>?user=<USER>&password=<PASSWORD>
You are ready to test the connection. In your JDBC Request chose the Driver you just put in your preferences and fill in the rest of the form. Click on test connection and surprise everyone in the office by performing somersaults if it works.
in you groovy script try this:
def sql = Sql.newInstance('jdbc:sybase:Tds:host:port/db', "user","password", 'com.sybase.jdbc3.jdbc.SybDriver')
"" probably work as well as ' '.
Put on your best clown's hat and redo your somersault routine.
This has taken me two days to get working.
First I upgraded to the latest version of soapui-Pro. The installation causes the first problem: I am running a German version of windows, so although Windows will have no problem finding "c:\Programme" rather than "C: \program files" Soapui will have them and won't find the drivers as a result, do so don't take the default at installation set up, tell it to use "C:\Programme" or whatever if you are using a non_English version of windows.
Second, don't use the desktop icon to start Soapui. This is the property of what the install created and it doesn't load the drivers.
C:\Programme\SmartBear\soapUI-Pro-4.5.1\bin\soapUI-Pro-4.5.1.exe
Start Soapui-pro from C:\Programme\SmartBear\soapUI-Pro-4.5.1\bin\. this will open a cmd black window and provide you with a log. (Soapui also tries to save this log, but that failed on me because of permissions.)
Here comes the exciting bit: it will log this info, telling you which drivers he has picked up!!
If your driver is not there, it won't find it later
12:54:51,056 INFO [SoapUI] Adding [C:\Program Files\SmartBear\soapUI-Pro-4.5.1\
bin\ext\jconn3.jar] to extensions classpath
12:54:51,057 INFO [SoapUI] Adding [C:\Program Files\SmartBear\soapUI-Pro-4.5.1\
bin\ext\postgresql-8.3-604.jdbc3.jar] to extensions classpath
12:54:51,057 INFO [SoapUI] Adding [C:\Program Files\SmartBear\soapUI-Pro-4.5.1\
bin\ext\postgresql-8.3-604.jdbc4.jar] to extensions classpath
12:54:51,058 INFO [SoapUI] Adding [C:\Program Files\SmartBear\soapUI-Pro-4.5.1\
bin\ext\sqljdbc.jar] to extensions classpath
Those readers still awake will have noticed that on my pc those directory paths are wrong, but that doesn't bother our hero, he found the drivers there and if he is happy, so am I.
the key driver for me is the jconn3.jar for sybase.
Now for the connection strings. First you have to set your preferences: select preferences from the File dropdown on the soapui front page.
goto you JDBC driver properties and put this in:
Driver Connection String template
com.sybase.jdbc3.jdbc.SybDriver jdbcsybase:Tds<HOST:127.0.0.1>:<PORT:5000>/<DB>?user=<USER>&password=<PASSWORD>
You are ready to test the connection. In your JDBC Request chose the Driver you just put in your preferences and fill in the rest of the form. Click on test connection and surprise everyone in the office by performing somersaults if it works.
in you groovy script try this:
def sql = Sql.newInstance('jdbc:sybase:Tds:host:port/db', "user","password", 'com.sybase.jdbc3.jdbc.SybDriver')
"" probably work as well as ' '.
Put on your best clown's hat and redo your somersault routine.
This has taken me two days to get working.