Could not find fixture: connect (SQL Server)

347 views
Skip to first unread message

Mahi

unread,
Oct 31, 2014, 5:41:36 PM10/31/14
to db...@googlegroups.com
Hello,

I am new user to DBFit, and trying to get it working but getting error

Connect
java.lang.UnsupportedOperationException: Java Runtime Environment (JRE) version 1.8 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0. at com.microsoft.sqlserver.jdbc.SQLServerConnection.(SQLServerConnection.java:304) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1011) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at dbfit.api.AbstractDbEnvironment.connect(AbstractDbEnvironment.java:50) at dbfit.environment.SqlServerEnvironment.connect(SqlServerEnvironment.java:54) at dbfit.api.AbstractDbEnvironment.connect(AbstractDbEnvironment.java:77) at dbfit.DatabaseTest.connect(DatabaseTest.java:44) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at fitlibrary.closure.MethodClosure.invoke(MethodClosure.java:31) at fitlibrary.closure.MethodClosure.invokeTyped(MethodClosure.java:24) at fitlibrary.closure.CalledMethodTarget.invokeTyped(CalledMethodTarget.java:67) at fitlibrary.closure.CalledMethodTarget.invokeTyped(CalledMethodTarget.java:82) at fitlibrary.closure.CalledMethodTarget.invokeAndWrap(CalledMethodTarget.java:242) at fitlibrary.traverse.workflow.caller.ActionCaller.run(ActionCaller.java:25) at fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretRow(DoTraverseInterpreter.java:152) at fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:94) at fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:87) at fitlibrary.DoFixture.interpretWholeTable(DoFixture.java:69) at fitlibrary.suite.InFlowPageRunner.run(InFlowPageRunner.java:34) at fitlibrary.DoFixture.interpretTables(DoFixture.java:42) at dbfit.DatabaseTest.interpretTables(DatabaseTest.java:26) at fit.Fixture.doTables(Fixture.java:80) at fit.FitServer.process(FitServer.java:81) at fit.FitServer.run(FitServer.java:56) at fit.FitServer.main(FitServer.java:41)

I have downloaded and installed jdbc4.0.jar file in lib folder.

Can you please guide me to get there?

Thanks,
Mahi

Mahi

unread,
Oct 31, 2014, 5:51:43 PM10/31/14
to db...@googlegroups.com


On Friday, October 31, 2014 9:41:36 PM UTC, Mahi wrote:
Hello,

I am new to DBFit, and trying to get it working but getting error
DBFit.JPG

MatMan

unread,
Oct 31, 2014, 5:55:21 PM10/31/14
to db...@googlegroups.com
Which version of the driver is that you have?

Yavor Nikolov

unread,
Oct 31, 2014, 6:31:01 PM10/31/14
to db...@googlegroups.com
Hi Mahi,

Please try this:
1) download latest version of MSSQL JDBC driver as described here 
2) then make sure you copy sqljdbc4.jar to DBFIT lib folder and that you do NOT have the other jar there (sqljdbc.jar).

Let us know if that helps.

Best regards,
Yavor


On Fri, Oct 31, 2014 at 11:55 PM, MatMan <mark_...@hotmail.com> wrote:
Which version of the driver is that you have?

--
You received this message because you are subscribed to the Google Groups "dbfit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dbfit+un...@googlegroups.com.
To post to this group, send email to db...@googlegroups.com.
Visit this group at http://groups.google.com/group/dbfit.
For more options, visit https://groups.google.com/d/optout.

Mahi

unread,
Nov 1, 2014, 12:28:25 AM11/1/14
to db...@googlegroups.com
Hi Yavor,

This was useful and solved the problem. Thanks for your help.

Now I am getting - Login failed for user 'SQLServer'. ClientConnectionId:cc16eabd-5b9b-41b7-9a92-06bab01968bd, error

On my machine, I do not use password for SQLServer, and below statement I am using to connect to SQL Server

!|Connect|SQLServer-pc|SQLServer| |AdventureWorks2012|

How do I get around this problem?
SQLSERver.JPG

Mark Matten

unread,
Nov 1, 2014, 6:00:48 AM11/1/14
to db...@googlegroups.com
If you're using Windows/AD authentication you still need to provide these credentials and you also need to make sure your JDBC URL contains "integratedSecurity=true".


So I think you might need to use the full connection string method of connecting.

Sent from my iPad
<SQLSERver.JPG>

Mahi

unread,
Nov 1, 2014, 10:01:12 AM11/1/14
to db...@googlegroups.com
Thanks matman, It worked.
I am trying to execute below code:

!path lib/*.jar
!|dbfit.SqlServerTest|
!|Connect|jdbc:sqlserver://localhost;databaseName=AdventureWorks2012;integratedSecurity=true;
!|Query|select 'test' as x|

I am getting below error now:
 
java.lang.IllegalArgumentException: No open connection to a database is available. Make sure your database is running and that you have connected before performing any queries.
at dbfit.api.AbstractDbEnvironment.checkConnectionValid(AbstractDbEnvironment.java:226)
at dbfit.api.AbstractDbEnvironment.getConnection(AbstractDbEnvironment.java:151)
at dbfit.api.AbstractDbEnvironment.createStatementWithBoundFixtureSymbols(AbstractDbEnvironment.java:107)
at dbfit.fixture.Query.getDataTable(Query.java:43)

But my SQLServer is up and running, where could be the problem?

Thanks in advance.

-Mahi

MatMan

unread,
Nov 1, 2014, 10:54:02 AM11/1/14
to db...@googlegroups.com
Try a blank line before the

!|Query|

Mahi

unread,
Nov 1, 2014, 11:35:01 AM11/1/14
to db...@googlegroups.com
Still getting same error message...

MatMan

unread,
Nov 1, 2014, 11:55:47 AM11/1/14
to db...@googlegroups.com
and this:

!path lib/*.jar

!|dbfit.SqlServerTest|
!|Connect|jdbc:sqlserver://localhost;databaseName=AdventureWorks2012;integratedSecurity=true;|

!|Query|select 'test' as x|

MatMan

unread,
Nov 1, 2014, 11:57:52 AM11/1/14
to db...@googlegroups.com
Sorry typo, this:

!path lib/*.jar

!|dbfit.SqlServerTest|

|Connect|jdbc:sqlserver://localhost;databaseName=AdventureWorks2012;integratedSecurity=true;|
|Query|select 'test' as x|

Mahi

unread,
Nov 1, 2014, 12:18:55 PM11/1/14
to db...@googlegroups.com
Tried but still getting same error message.

Mahi

unread,
Nov 1, 2014, 1:14:34 PM11/1/14
to db...@googlegroups.com
Resolved... a PIPE was missing at the end. Below is working code.

!path lib/*.jar

!|dbfit.SqlServerTest|

!|Connect|jdbc:sqlserver://127.0.0.1;databaseName=AdventureWorks2012;integratedSecurity=true|

!|Query|SELECT 'Welcome to dbFit' AS AddressId |
|Addressid|


MatMan

unread,
Nov 1, 2014, 1:27:29 PM11/1/14
to db...@googlegroups.com
Any other exceptions listed in the page captured output?

Try adding the username and password parameters in the URL.

MatMan

unread,
Nov 1, 2014, 1:31:02 PM11/1/14
to db...@googlegroups.com
Yes, I'd added the missing pipe. May be you didn't copy and paste what I put up.

Your test doesn't specify any expected results. How about:

|Query|SELECT 'Welcome to dbFit' AS AddressId |
|Addressid|
|Welcome to dbFit|

?

Mahi

unread,
Nov 1, 2014, 3:37:39 PM11/1/14
to db...@googlegroups.com
Sure, i will try it out. I am getting exception when the resultset is large, what is the maximum records dbfit can handle?

MatMan

unread,
Nov 1, 2014, 4:42:57 PM11/1/14
to db...@googlegroups.com
There are some recent discussions on this forum regarding that. The available Java heap size could be the main factor.

But what are you trying to do with dbfit with large data sets? I think people are generally using dbfit with small (often just big enough) data sets to test code functionality, although not exclusively.

Mahi

unread,
Nov 1, 2014, 5:08:35 PM11/1/14
to db...@googlegroups.com
Actually we are trying to automate our ETL scripts for testing purpose, and that's the reason i was trying out will large datasets.

What are the maximum records dbfit can handle?

MatMan

unread,
Nov 1, 2014, 5:56:10 PM11/1/14
to db...@googlegroups.com
So, data warehouse testing? Or general ETL/data integration?
If it's not performance testing then how much data you actually need to test the functionality?

Mahi

unread,
Nov 1, 2014, 6:08:17 PM11/1/14
to db...@googlegroups.com
Its general ETL/Data integration testing, it's not performance testing but we have large data sets (minimum 1 million record sets), is it possible through DBFit?

-Mahi

MatMan

unread,
Nov 1, 2014, 6:12:38 PM11/1/14
to db...@googlegroups.com
Who knows, if you can find enough heap space!

But, I'd seriously consider what you're actually trying to do with the tool.

Tell us how you think you're going to use DbFit?

Are you really going to define 1 million expected rows on a test page?!

Mahi

unread,
Nov 2, 2014, 2:24:43 AM11/2/14
to db...@googlegroups.com
Actually, i will be doing except on 2 squal queries and find any mismatches, but in the background query will process million records and if there is mismatch then it should populate all those records. So the million dollar question is, can dbfit process large datasets in background?. Also you said about heap, which i am unaware of, is there any way i can set that on my local machine with some settings?

If there is any way where i can see if the mismatched records are more then 0 then i should just display 'test failed' else 'passed' then probably i don't have to define 1 million records on test page. Is this possible?

Kind Regards,
Mahesh

MatMan

unread,
Nov 2, 2014, 4:58:42 AM11/2/14
to db...@googlegroups.com
I'm still not quite sure what you're doing but I think it's a MINUS/EXCEPT query where both sets are large and then
* either you're writing the results to a table and then want to test what's in the table
* or you want to directly test the result of the MINUS/EXCEPT query.

With DbFit you need to declare what you expect the result to be so that DbFit can either pass or fail your test.

If you simply want to see what the actual result of that query is then I dont think you need DbFit.

MatMan

unread,
Nov 2, 2014, 5:08:27 AM11/2/14
to db...@googlegroups.com
For heap size tuning see:

http://stackoverflow.com/questions/1565388/increase-heap-size-in-java

but if you do as you suggested (use COUNT(*) > 0) to test then you probably won't need to play with this.

Reply all
Reply to author
Forward
0 new messages