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, 01:40:28 pm
Username: Password:
Login with username, password and session length

Forgot your password?
 
Datasource for Oracle
Welcome, Guest. Please login or register.
November 22, 2008, 01:40:28 pm
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  Datasource for Oracle
« previous next »
Pages: [1] 2 Print
Author Topic: Datasource for Oracle  (Read 1448 times)
Jon Disen
Newbie
*
Posts: 8


« on: September 04, 2007, 12:40:43 pm »

I get the exception:
java.lang.NullPointerException
        at com.eviware.soapui.impl.wsdl.teststeps.datasource.JdbcDataSource.load(SourceFile:64)
        at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.next(SourceFile:253)


when connecting to an oracle XE instance. What is the syntax for the connection string in the JDBC Datasource step?

Thanks in advance and for a great product!
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #1 on: September 04, 2007, 12:42:33 pm »

Hi!

what jdbc driver are you using?

regards!

/Ole
eviware.com
Logged
Jon Disen
Newbie
*
Posts: 8


« Reply #2 on: September 04, 2007, 12:55:02 pm »

I'm using oracle.jdbc.driver.OracleDriver.
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #3 on: September 04, 2007, 12:59:41 pm »

ok.. the connection string should be in the line of

jdbc:oracle:<drivertype>:@<hostname>:<port>:<database_sid>

for example

jdbc:oracle:thin:@10.185.13.158:1521:ora9i

If this doesn't help, here are some more questions:
- have you put the oracle jdbc driver jar in the <soapui>\bin\ext folder (and can you see in the soapui log that soapUI Pro is picking it up when starting)?
- when are you getting the error? when running the testcase? or testing the datasource in the editor?

regards!

/Ole
eviware.com
Logged
Jon Disen
Newbie
*
Posts: 8


« Reply #4 on: September 04, 2007, 01:07:40 pm »

That's the same connection string that I'm using.
The ojdbc.jar is in the java.class.path (shown in the soapUI System Properties).

The error is reported when testing the step in the editor.
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #5 on: September 04, 2007, 01:14:19 pm »

ok thanks..

- do you get this error when running the testcase?
- do you see any other errors in the console window or soapui log?
- are you using the latest snapshot or the 1.7.5 release?

regards!

/Ole
eviware.com
Logged
Jon Disen
Newbie
*
Posts: 8


« Reply #6 on: September 04, 2007, 01:36:03 pm »

When running the testcase I get this exception:

java.sql.SQLException: invalid arguments in call
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:236)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:439)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at com.eviware.soapui.impl.wsdl.teststeps.datasource.JdbcDataSource.prepare(SourceFile:96)
        at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.prepare(SourceFile:215)
        at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.run(WsdlTestCaseRunner.java:135)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)


No, I'm using a 1.7.1 trial license.
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #7 on: September 04, 2007, 01:49:17 pm »

ok.. there seems to be some error with the connection string.. could you upgrade to the latest snapshot for testing? (your license will work with that version as well..).. also.. can you show your connections string? (mail it to me at ole@eviware.com if you want..)

regards!

/Ole
eviware.com
Logged
Jon Disen
Newbie
*
Posts: 8


« Reply #8 on: September 04, 2007, 02:13:21 pm »

After updating to 1.7.5 I get this exception when running the testcase:

15:09:30,843 ERROR [WsdlTestCaseRunner] Exception during TestCase Execution
java.lang.Exception: Failed to prepare testStep [Check db]; java.lang.Exception: Failed to init connection for drvr [ora
cle.jdbc.driver.OracleDriver], connectionString [jdbc:oracle:thin:@localhost:1521:XE]
        at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.run(WsdlTestCaseRunner.java:155)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)


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


« Reply #9 on: September 04, 2007, 02:17:42 pm »

ok thanks.. could you please try using 127.0.0.1 instead of localhost? It may be that the oracle listener is not bound to that name.. you could also test with telnet from the commandline, just open a command prompt and type

telnet localhost 1521

to see if you are getting a connect from oracle..

regards!

/Ole
eviware.com
Logged
Jon Disen
Newbie
*
Posts: 8


« Reply #10 on: September 04, 2007, 03:55:18 pm »

I get a telnet conection with localhost.
After installing 1.7.5 I forgot to put the ojdbc14.jar in the classpath!
But still I get an exception:
16:49:41,734 ERROR [WsdlTestCaseRunner] Exception during TestCase Execution
java.lang.Exception: Failed to prepare testStep [Check db]; java.sql.SQLException: invalid arguments in call
        at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.run(WsdlTestCaseRunner.java:155)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)


I've also tried with 127.0.0.1 instead of localhost, but no success.

Any idea?
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #11 on: September 04, 2007, 04:06:42 pm »

ok.. hmm.. the error actually suggests there is some problem with the sql query.. can you validate it in some other tool? is it parameterized in any way? Can you attach a screenshot of the datasource editor which shows all values, etc?

sorry for the inconvenience..

regards!

/Ole
eviware.com
Logged
Jon Disen
Newbie
*
Posts: 8


« Reply #12 on: September 04, 2007, 08:09:59 pm »

Attached is the screenshot.

And where shall I put the credentials? It should be in the connection string?
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #13 on: September 04, 2007, 08:22:40 pm »

Hi,

yes, put the credentials in the connection string as follows:

jdbc:oracle:<drivertype>:<username/password>@<hostname>:<port>:<database_sid>

for example

jdbc:oracle:thin:scott/tiger@10.185.13.158:1521:ora9i

does that help?

regards,

/Ole
eviware.com
Logged
Jon Disen
Newbie
*
Posts: 8


« Reply #14 on: September 04, 2007, 08:58:53 pm »

Great, that was the solution!! Cheesy

Thank you for enthusiastic and responsive support!

Regards,
Jon Disen
Logged
Pages: [1] 2 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