Query Could not find fixture: Query - OracleTest

119 views
Skip to first unread message

Kanakalakshmi Kandasamy

unread,
Dec 10, 2017, 8:39:27 PM12/10/17
to dbfit
!path lib\dbfit-core-3.2.0.jar;lib\...

!|import fixture|
|dbfit.fixtures|

!|dbfit.OracleTest|
|Connect|QASWE12:1521|DB|Password123|Table

|Query|select REQ_ID from REQ|
|REQ_ID|
|6|


I am new to DBfit and referred http://dbfit.github.io/dbfit/docs/getting-started.html#installing-dbfit for setting up. I am facing below error after solving lots of other issues. It would be helpful if I get an help on this.
Query
Could not find fixture: Query
Thanks
Kanaka

Mark Matten

unread,
Dec 11, 2017, 9:25:42 AM12/11/17
to db...@googlegroups.com

Can you please provide the full text of your test page. The snippet below looks invalid so it's hard to say what might be the issue at the moment.




From: db...@googlegroups.com <db...@googlegroups.com> on behalf of Kanakalakshmi Kandasamy <kana...@gmail.com>
Sent: 11 December 2017 01:39
To: dbfit
Subject: Query Could not find fixture: Query - OracleTest
 
--
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 https://groups.google.com/group/dbfit.
For more options, visit https://groups.google.com/d/optout.

Kanakalakshmi Kandasamy

unread,
Dec 11, 2017, 9:41:40 AM12/11/17
to dbfit
attached
error.jpg

Mark Matten

unread,
Dec 11, 2017, 10:07:28 AM12/11/17
to db...@googlegroups.com

Can we see the source text (from the page editor / content.txt), please, instead of the rendered output?




From: db...@googlegroups.com <db...@googlegroups.com> on behalf of Kanakalakshmi Kandasamy <kana...@gmail.com>
Sent: 11 December 2017 14:41
To: dbfit
Subject: Re: Query Could not find fixture: Query - OracleTest
 

Kanakalakshmi Kandasamy

unread,
Dec 11, 2017, 10:11:22 AM12/11/17
to dbfit
Below is the source text

!path lib\dbfit-core-3.2.0.jar;lib\...

!|import fixture|
|dbfit.fixtures|

!|dbfit.OracleTest|
|Connect|QASWE12:1521|DB|Password123|Table

|Query|select REQ_ID from REQ|
|REQ_ID|
|6|


Thanks
Kanaka

Mark Matten

unread,
Dec 11, 2017, 10:53:23 AM12/11/17
to db...@googlegroups.com

What if you try:-


!path lib\*.jar


!|dbfit.OracleTest|

|Connect|QASWE12:1521|DB|Password123|Table


|Query|select REQ_ID from REQ|

|REQ_ID|

|6|


What is the "..." for you your !path directive?

If you're using Standalone mode then import dbfit.fixture not dbfit.fixtures. Don't use this in Flow Mode.



From: db...@googlegroups.com <db...@googlegroups.com> on behalf of Kanakalakshmi Kandasamy <kana...@gmail.com>
Sent: 11 December 2017 15:11

Kanakalakshmi Kandasamy

unread,
Dec 11, 2017, 10:56:51 AM12/11/17
to dbfit
!path lib\*.jar

!|dbfit.OracleTest|

|Connect|QASWE12:1521|DB|Password123|Table


|Query|select REQ_ID from REQ|

|REQ_ID|

|6|

Tried above one, still facing the same issue 

Mark Matten

unread,
Dec 11, 2017, 11:06:58 AM12/11/17
to db...@googlegroups.com

Please check the syntax of the fixture for 


|Connect|


I don't think this should have a missing "|" at the end. Have you got the right number of fields? Check in the documentation.



From: db...@googlegroups.com <db...@googlegroups.com> on behalf of Kanakalakshmi Kandasamy <kana...@gmail.com>
Sent: 11 December 2017 15:56

Kanakalakshmi Kandasamy

unread,
Dec 12, 2017, 5:29:14 PM12/12/17
to dbfit
Hi Mark

I am trying to use Flow mode for my connections setup. below is my code. Now facing JDBC driver error. I have attached the screenshot.

!path lib\*.jar

!|dbfit.OracleTest|
|Connect|QASWE12:1521|DB|Password123|Table|

|query|select REQ_ID from REQ|
|REQ_UUID|


Thanks
Kanaka
JDBC error.JPG

Yavor Nikolov

unread,
Dec 13, 2017, 8:18:41 AM12/13/17
to dbfit
Hi, where is your ojdbc6.jar located? It should be under the lib folder in dbfit (next to other jars).

Do you by chance have any spaces in the full path to your dbfit installation? (Folders containing spaces are causing issues sometimes).

Best Regards,
Yavor

To unsubscribe from this group and stop receiving emails from it, send an email to dbfit+unsubscribe@googlegroups.com.

Kanakalakshmi Kandasamy

unread,
Dec 13, 2017, 9:26:07 AM12/13/17
to dbfit
Hi Yavor

Thanks for your input. I have added ojdbc6.jar under lib folder of dbfit. also I don't have any spaces in my dbfit path. This is my path C:\Kanaka\dbfit

Below is the error message which I am facing after adding ojdbc6.jar

query
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:237) at dbfit.api.AbstractDbEnvironment.getConnection(AbstractDbEnvironment.java:162) at dbfit.api.AbstractDbEnvironment.createStatementWithBoundFixtureSymbols(AbstractDbEnvironment.java:108) at dbfit.fixture.Query.getDataTable(Query.java:43) at dbfit.fixture.RowSetFixture.doRows(RowSetFixture.java:92) at fit.Fixture.doTable(Fixture.java:156) at fitlibrary.traverse.AlienTraverseHandler.doTable(AlienTraverseHandler.java:21) at fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:104) at fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:89) at fitlibrary.DoFixture.interpretWholeTable(DoFixture.java:73) at fitlibrary.suite.InFlowPageRunner.run(InFlowPageRunner.java:27) at fitlibrary.DoFixture.interpretTables(DoFixture.java:42) at dbfit.DatabaseTest.interpretTables(DatabaseTest.java:26) at fit.Fixture.doTables(Fixture.java:81) at fit.FitServer.process(FitServer.java:81) at fit.FitServer.run(FitServer.java:56) at fit.FitServer.main(FitServer.java:41)


Thanks
Kanaka

Yavor Nikolov

unread,
Dec 13, 2017, 9:37:26 AM12/13/17
to dbfit
OK, good.

May you add a blank line between these both:

!|dbfit.OracleTest|

|Connect|QASWE12:1521|DB|Password123|Table|


Also - make sure that your connection string is correct.
* Is it true that the hostname of the server where your database is running is QASWE12? (This should be the OS hostname, not a tnsnames.ora entry)
* Is your database name (SID) called Table?

Best Regards,
Yavor

To unsubscribe from this group and stop receiving emails from it, send an email to dbfit+unsubscribe@googlegroups.com.

Kanakalakshmi Kandasamy

unread,
Dec 13, 2017, 10:22:13 AM12/13/17
to dbfit
tnsnames.ora has below content. I have only this data with me. I also tried to give QASWE12.objectstream.com didn't help me. 

Table=

 (DESCRIPTION=

    (ADDRESS=

      (PROTOCOL=TCP)

      (HOST=QASWE12)

      (PORT=1521)

    )

    (CONNECT_DATA=

      (SERVICE_NAME=Table)

    )

  )


If I try to Leave space as you suggested, I am getting null pointer exception.
java.lang.NullPointerException at dbfit.fixture.RowSetFixture.addSurplusRows(RowSetFixture.java:142) at dbfit.fixture.RowSetFixture.doRows(RowSetFixture.java:94) at fit.Fixture.doTable(Fixture.java:156) at fitlibrary.traverse.AlienTraverseHandler.doTable(AlienTraverseHandler.java:21) at fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:104) at fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:89) at fitlibrary.DoFixture.interpretWholeTable(DoFixture.java:73) at fitlibrary.suite.InFlowPageRunner.run(InFlowPageRunner.java:27) at fitlibrary.DoFixture.interpretTables(DoFixture.java:42) at dbfit.DatabaseTest.interpretTables(DatabaseTest.java:26) at fit.Fixture.doTables(Fixture.java:81) at fit.FitServer.process(FitServer.java:81) at fit.FitServer.run(FitServer.java:56) at fit.FitServer.main(FitServer.java:41)

Thanks
Kanaka

Kanakalakshmi Kandasamy

unread,
Dec 13, 2017, 11:21:16 AM12/13/17
to dbfit
My developers are connecting to DB using this 

Thanks
Kanaka

Yavor Nikolov

unread,
Dec 13, 2017, 2:28:05 PM12/13/17
to dbfit
Service name and database name are different things in Oracle.

Can you try with /table instead of table? (I.e. add a forward slash)

To unsubscribe from this group and stop receiving emails from it, send an email to dbfit+unsubscribe@googlegroups.com.

Kanakalakshmi Kandasamy

unread,
Dec 13, 2017, 2:45:09 PM12/13/17
to dbfit
no luck same issue "No open connection to a database is available"

Yavor Nikolov

unread,
Dec 13, 2017, 3:00:44 PM12/13/17
to dbfit
OK. I wasn't sure about the forward slash syntax.

Could you try with |Connect Using File| syntax?

Or using jdbc url (as single connect parameter):


To unsubscribe from this group and stop receiving emails from it, send an email to dbfit+unsubscribe@googlegroups.com.

Kanakalakshmi Kandasamy

unread,
Dec 13, 2017, 3:11:47 PM12/13/17
to dbfit
Tried using jdbc url as single connect parameter as how developer used. I am getting below error.

oracle.net.ns.NetException: Listener refused the connection with the following error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor at oracle.net.ns.NSProtocol.connect(NSProtocol.java:399) at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1140) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:340) at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:553) at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:254) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at dbfit.api.AbstractDbEnvironment.connect(AbstractDbEnvironment.java:51) at dbfit.api.AbstractDbEnvironment.connect(AbstractDbEnvironment.java:57) at dbfit.DatabaseTest.connect(DatabaseTest.java:52) 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:35) at fitlibrary.closure.MethodClosure.invokeTyped(MethodClosure.java:28) at fitlibrary.closure.CalledMethodTarget.invokeTyped(CalledMethodTarget.java:77) at fitlibrary.closure.CalledMethodTarget.invokeTyped(CalledMethodTarget.java:95) at fitlibrary.closure.CalledMethodTarget.invokeAndWrap(CalledMethodTarget.java:358) at fitlibrary.traverse.workflow.caller.ActionCaller.run(ActionCaller.java:37) at fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretRow(DoTraverseInterpreter.java:176) at fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:96) at fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:89) at fitlibrary.DoFixture.interpretWholeTable(DoFixture.java:73) at fitlibrary.suite.InFlowPageRunner.run(InFlowPageRunner.java:27) at fitlibrary.DoFixture.interpretTables(DoFixture.java:42) at dbfit.DatabaseTest.interpretTables(DatabaseTest.java:26) at fit.Fixture.doTables(Fixture.java:81) at fit.FitServer.process(FitServer.java:81) at fit.FitServer.run(FitServer.java:56) at fit.FitServer.main(FitServer.java:41)

Yavor Nikolov

unread,
Dec 13, 2017, 3:13:26 PM12/13/17
to dbfit
What exactly is the url?

To unsubscribe from this group and stop receiving emails from it, send an email to dbfit+unsubscribe@googlegroups.com.

Kanakalakshmi Kandasamy

unread,
Dec 13, 2017, 3:16:54 PM12/13/17
to dbfit

Mark Matten

unread,
Dec 13, 2017, 6:12:35 PM12/13/17
to dbfit
Have you tried the

Host:port:Sid

format?

See https://docs.oracle.com/cd/B28359_01/java.111/b31224/jdbcthin.htm

I think the /sid format is not usually used for JDBC/thin.

Yavor Nikolov

unread,
Dec 13, 2017, 6:25:49 PM12/13/17
to dbfit
host:port/service-name should be OK too. Could you try with:

!|Connect|jdbc:oracle:thin:DB/Password123@//QASWE12.objectstream.com:1521/table|


--
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+unsubscribe@googlegroups.com.

Kanaka

unread,
Dec 13, 2017, 8:54:43 PM12/13/17
to dbfit
Mark, I don't have SID only Service I have. 

Yavor, I tried with the format which you have mentioned but still I face the same issue. 

If there is any firewall issue, can we find it?

Thanks
Kanaka

On Wednesday, December 13, 2017 at 5:25:49 PM UTC-6, Yavor Nikolov wrote:
host:port/service-name should be OK too. Could you try with:

!|Connect|jdbc:oracle:thin:DB/Password123@//QASWE12.objectstream.com:1521/table|
On Thu, Dec 14, 2017 at 1:12 AM, Mark Matten <mark_...@hotmail.com> wrote:
Have you tried the

Host:port:Sid

format?

See https://docs.oracle.com/cd/B28359_01/java.111/b31224/jdbcthin.htm

I think the /sid format is not usually used for JDBC/thin.

--
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.

Kanaka

unread,
Dec 13, 2017, 9:35:30 PM12/13/17
to dbfit
Also tried with the below format
|Connect|jdbc:sqlserver://myhost\myinstance;user=myuser;password=mypassword;databaseName=mydbname|

Now again started to see No suitable driver error message. Is there any different format for oracle?

Yavor Nikolov

unread,
Dec 13, 2017, 11:10:21 PM12/13/17
to dbfit
Could you try to connect with another tool - sqlplus, sql developer, ...

To unsubscribe from this group and stop receiving emails from it, send an email to dbfit+unsubscribe@googlegroups.com.

Kanaka

unread,
Dec 13, 2017, 11:14:57 PM12/13/17
to db...@googlegroups.com
We are using toad for Oracle so is it possible for us to use syntax of sql?

You received this message because you are subscribed to a topic in the Google Groups "dbfit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dbfit/7PJG9omuwRk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dbfit+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages