DBFIT in standalone mode is throwing nullpointer exception

458 views
Skip to first unread message

niranjan singiri

unread,
May 3, 2012, 7:16:19 AM5/3/12
to dbfit
Hi ,
I am having an issue using DBFIT in standalone mode. My requirement is
to use DBFIT along with the other fixtuure in a single FitNesse case.

FitNesse case is as below:

!define ConfigFile {conf/HW.xml}

!define COMMAND_PATTERN {java -
Dcom.afs.common.abstracttype.logpii=true -cp %p %m}

!|com.xxx.fixtures.xxxFramexxxFixture|

first initialize Configuration to choose system to use
|initialize config with config file|${ConfigFile}|

Select message
|use message for application|comm|and module|resend|

Edit Msgq
|editxxxx|
|msg no|msg entity id|msg sender id|msg customer no|msg ext reference
id|msg ext customer id|set()|
|20||||||true|

Send request
|check|send Message|true|

|import fixture|
|dbfit.fixture|

!|DatabaseEnvironment|ORACLE|
|connect|abc|test|tes|123|

!|Query|select n_message_no from xyz_dat_msg_t where n_message_no in
(20,18)|
|n_message_no|
|20|



When I ran this case , i am getting null pointer exception , Please
see the stack trace below:

java.lang.NullPointerException
at dbfit.fixture.DatabaseEnvironment.connect(DatabaseEnvironment.java:
48)
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.interpretAfterFirstRow(DoTraverseInterpreter.java:
66)
at
fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretInFlow(DoTraverseInterpreter.java:
151)
at fitlibrary.DoFixture.interpretAfterFirstRow(DoFixture.java:47)
at
fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretEvaluator(DoTraverseInterpreter.java:
115)
at
fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:
101)
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 fit.Fixture.doTables(Fixture.java:79)
at fit.FitServer.process(FitServer.java:81)
at fit.FitServer.run(FitServer.java:56)
at fit.FitServer.main(FitServer.java:41)


Please let me know if further information is required to analyse the
issue.

Thanks in advance,
Niranjan

MatMan

unread,
May 11, 2012, 11:37:11 AM5/11/12
to dbfit
Are you sure those connection details are correct? What does '123'
represent?

niranjan singiri

unread,
May 17, 2012, 9:34:44 AM5/17/12
to db...@googlegroups.com
Hi Mark,
 
Thanks for the reply,  I dont want to disclose actual connection details , so I replaced them with 123 etc.
Further analysing the issue , I have noticed that the other fixture I am using in my test case is being executed on flow mode and I assume this is the root cause of the issue.
 
Please correct me if my understanding is wrong.
 
Thanks,
Niranjan

--
You received this message because you are subscribed to the Google Groups "dbfit" group.
To post to this group, send email to db...@googlegroups.com.
To unsubscribe from this group, send email to dbfit+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dbfit?hl=en.


MatMan

unread,
Jun 30, 2012, 4:45:25 PM6/30/12
to db...@googlegroups.com
I think if your first fixture is a DoFixture/SequenceFixture extension then flow mode would get activated and that fixture would process every table on the page. The DbFit fixtures wouldn't get a look in.
 
Try putting the DbFit fixtures on a separate page.
To unsubscribe from this group, send email to dbfit+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages