Throwing exception inside a mock

22,797 views
Skip to first unread message

rulien

unread,
Apr 12, 2011, 4:05:44 AM4/12/11
to Spock Framework - User
Hey

When throwing an exception inside a mock like

mock.method() >> {new Exception()}

This is not catched inside the sverice I am testing but reported in
the test as a thrown exception

Is there a way to throw an exception that you would expect the service
to catch ?

Best regards

Rune

Peter Niederwieser

unread,
Apr 12, 2011, 9:02:27 AM4/12/11
to spockfr...@googlegroups.com
You aren't throwing the exception but merely returning it. Changing your code as follows should solve the problem:

mock.method() >> { throw new Exception() }

Cheers,
Peter

> --
> You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
> To post to this group, send email to spockfr...@googlegroups.com.
> To unsubscribe from this group, send email to spockframewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.
>

rulien

unread,
Apr 12, 2011, 9:34:21 AM4/12/11
to Spock Framework - User
Sorry for the bad example, should have copy pasted :-)

Here is what i do

def "should return null if loginfailure is thrown"(){
given:
authenticator.loginServiceClientPool = clientPool
clientPool.acquire() >> service
1 * service.validateToken("2222",false) >> {throw new
LoginFailure()}
when:
def authorized = authenticator.isLoggedOn("2222")
then:
!authorized
}

service and clientPool are Mocks. service is injected in method on
invocation so that might be the problem ? but on debug I clearly see
that service is sat as a mock, but no exception is thrown in
authenticator upon invocation

Peter Niederwieser

unread,
Apr 14, 2011, 3:53:12 PM4/14/11
to Spock Framework - User
On Apr 12, 3:34 pm, rulien <lien.runel...@gmail.com> wrote:
> Here is what i do
>
>  def "should return null if loginfailure is thrown"(){
>     given:
>          authenticator.loginServiceClientPool = clientPool
>          clientPool.acquire() >> service
>          1 * service.validateToken("2222",false) >> {throw new
> LoginFailure()}
>     when:
>          def authorized = authenticator.isLoggedOn("2222")
>     then:
>          !authorized
>   }

I can't spot a problem here.

On 12.04.2011, at 10:05, rulien wrote:
> When throwing an exception inside a mock like mock.method() >> {new Exception()}
> This is not catched inside the sverice I am testing but reported in the test as a thrown exception

Assuming it's "throw new Exception()", it seems that the code you are
testing fails to catch the exception. Analyzing the stack trace should
reveal the problem.

Cheers,
Peter

Jamie Bisotti

unread,
Sep 20, 2011, 12:46:41 PM9/20/11
to spockfr...@googlegroups.com
(Reposting directly to the group as the original from Nabble never made it through.)

I'm seeing the same problem Rulien mentioned.  Did anyone ever get to the bottom of this? 

I haven't been able to confirm this, but it feels like Spock and/or the mock might not be handling the throwing of the exception appropriately.  From what I can see, if I setup a closure and have a mock throw an exception AND I expect that exception to bubble up to the Spock spec (i.e. I have a 'then' containing thrown(MyException) ), all is well.  However, if I want the code under test to catch MyException and handle it without letting it bubble all the way up to the Spock spec, that's not working.  My code never catches the exception like it should and it always ends up bubbling up to the spec.  I could be wrong, but this is my current guess. 

Any insight from anyone more knowledgeable than myself would be greatly appreciated. 

Thanks, 
   Jamie

Peter Niederwieser

unread,
Sep 21, 2011, 2:15:20 AM9/21/11
to spockfr...@googlegroups.com
I suggest the following:

1. Change the code under test to catch Throwable
2. Set a breakpoint in the corresponding try-block
3. Start the test in the debugger
4. Verify that the try-block is actually entered
5. Step through the code to see what's happening

This should give us more information. You may also want to disable Spock's stack trace filtering by creating file ~/.spock/SpockConfig.groovy with this content:

runner {
  filterStackTrace false
}

Let us know about your findings.

Cheers,
Peter

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spockframework/-/-zTbQur-T48J.

Jamie Bisotti

unread,
Sep 23, 2011, 5:21:02 PM9/23/11
to spockfr...@googlegroups.com
Peter,

Here's the actual test case:
def "Given an IOException when writing the file, the file should not exist & the failure message returned"() {
given:
def mockDatafile = Mock(MultipartFile)
1 * mockDatafile.transferTo(serverSideFile) >> { throw new IOException() }

when:
def result = this.cut.handleFormUpload("success msg", "fail msg", mockDatafile)

then:
(AbstractFileUploadController.RESPONSE_START + 'fail msg' + AbstractFileUploadController.RESPONSE_END).equals result
    }

Following your previous request:
  • I disabled Spock's stack trace filtering (I think)
  • I changed the CUT
    • it now catches Throwable
    • it now println an "I made it here" statement just before the call to transferTo(...), which is my mock that should throw an IOException, which should be caught in my CUT and a MyException rethrown (which gets caught in handleFormUpload, which simply returns a String)
    • it now prints the stack trace in the catch block:
org.codehaus.groovy.runtime.InvokerInvocationException: java.io.IOException
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:97)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
at groovy.lang.Closure.call(Closure.java:282)
at groovy.lang.Closure.call(Closure.java:295)
at org.spockframework.mock.CodeResultGenerator.generate(CodeResultGenerator.java:38)
at org.spockframework.mock.MockInteraction.accept(MockInteraction.java:60)
at org.spockframework.mock.MockInteractionDecorator.accept(MockInteractionDecorator.java:41)
at org.spockframework.mock.InteractionScope$1.accept(InteractionScope.java:38)
at org.spockframework.mock.MockController.dispatch(MockController.java:42)
at org.spockframework.mock.DefaultMockFactory$1.invoke(DefaultMockFactory.java:70)
at $Proxy15.transferTo(Unknown Source)
at com.lexmark.pssd.app.mve.file.upload.AbstractFileUploadController.saveFile(AbstractFileUploadController.java:80)
at com.lexmark.pssd.app.mve.file.upload.AbstractFileUploadController.processFile(AbstractFileUploadController.java:73)
at com.lexmark.pssd.app.mve.file.upload.AbstractFileUploadController.handleFormUpload(AbstractFileUploadController.java:52)
at com.lexmark.pssd.app.mve.file.upload.AbstractFileUploadController$handleFormUpload.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:132)
at com.lexmark.pssd.app.mve.file.upload.AbstractFileUploadControllerTest.$spock_feature_0_0(AbstractFileUploadControllerTest.groovy:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.spockframework.runtime.BaseSpecRunner.invokeRaw(BaseSpecRunner.java:235)
at org.spockframework.runtime.BaseSpecRunner.invoke(BaseSpecRunner.java:217)
at org.spockframework.runtime.BaseSpecRunner.invokeFeatureMethod(BaseSpecRunner.java:204)
at org.spockframework.runtime.BaseSpecRunner.runSimpleFeature(BaseSpecRunner.java:182)
at org.spockframework.runtime.BaseSpecRunner.doRunFeature(BaseSpecRunner.java:174)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.spockframework.runtime.BaseSpecRunner.invokeRaw(BaseSpecRunner.java:235)
at org.spockframework.runtime.BaseSpecRunner.invoke(BaseSpecRunner.java:217)
at org.spockframework.runtime.BaseSpecRunner.runFeature(BaseSpecRunner.java:152)
at org.spockframework.runtime.BaseSpecRunner.runFeatures(BaseSpecRunner.java:129)
at org.spockframework.runtime.BaseSpecRunner.doRun(BaseSpecRunner.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.spockframework.runtime.BaseSpecRunner.invokeRaw(BaseSpecRunner.java:235)
at org.spockframework.runtime.BaseSpecRunner.invoke(BaseSpecRunner.java:217)
at org.spockframework.runtime.BaseSpecRunner.run(BaseSpecRunner.java:73)
at org.spockframework.runtime.Sputnik.run(Sputnik.java:57)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:51)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:63)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:75)
at $Proxy3.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.remote.internal.MethodInvocationUnmarshallingDispatch.dispatch(MethodInvocationUnmarshallingDispatch.java:48)
at org.gradle.messaging.dispatch.DiscardOnFailureDispatch.dispatch(DiscardOnFailureDispatch.java:31)
at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:129)
at org.gradle.messaging.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:33)
at org.gradle.messaging.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:69)
at org.gradle.messaging.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:63)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:194)
at com.lexmark.pssd.app.mve.file.upload.AbstractFileUploadControllerTest$_$spock_feature_0_0_closure1.doCall(AbstractFileUploadControllerTest.groovy:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
... 74 more 

So, it appears Groovy is throwing an InvokerInvocationException...for some reason.  Any ideas?

Thanks,
   Jamie

Peter Niederwieser

unread,
Sep 23, 2011, 9:14:48 PM9/23/11
to spockfr...@googlegroups.com
You are running into http://code.google.com/p/spock/issues/detail?id=166. Updating to Spock 0.6-SNAPSHOT will solve the problem.

Cheers,
Peter

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spockframework/-/OjL6gxJgxPYJ.

Jamie Bisotti

unread,
Sep 25, 2011, 10:34:34 AM9/25/11
to Spock Framework - User
Peter,

That did the trick! Sorry I didn't see that issue earlier. Thanks for
your help (and this great project).

Jamie

On Sep 23, 9:14 pm, Peter Niederwieser <pnied...@gmail.com> wrote:
> You are running intohttp://code.google.com/p/spock/issues/detail?id=166. Updating to Spock 0.6-SNAPSHOT will solve the problem.
>
> Cheers,
> Peter
>
> On 23.09.2011, at 17:21, Jamie Bisotti wrote:
>
>
>
>
>
>
>
> > Peter,
>
> > Here's the actual test case:
> > def "Given an IOException when writing the file, the file should not exist & the failure message returned"() {
> >    given:
> >    def mockDatafile = Mock(MultipartFile)
> >    1 * mockDatafile.transferTo(serverSideFile) >> { throw new IOException() }
>
> >    when:
> >    def result = this.cut.handleFormUpload("success msg", "fail msg", mockDatafile)
>
> >    then:
> >    (AbstractFileUploadController.RESPONSE_START + 'fail msg' + AbstractFileUploadController.RESPONSE_END).equals result
> >     }
>
> > Following your previous request:
> > I disabled Spock's stack trace filtering (I think)
> > I changed the CUT
> > it now catches Throwable
> > it now println an "I made it here" statement just before the call to transferTo(...), which is my mock that should throw an IOException, which should be caught in my CUT and a MyException rethrown (which gets caught in handleFormUpload, which simply returns a String)
> > it now prints the stack trace in the catch block:
> > org.codehaus.groovy.runtime.InvokerInvocationException: java.io.IOException
> > at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:97)
> > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
> > at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(Closure MetaClass.java:273)
> > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
> > at groovy.lang.Closure.call(Closure.java:282)
> > at groovy.lang.Closure.call(Closure.java:295)
> > at org.spockframework.mock.CodeResultGenerator.generate(CodeResultGenerator.ja va:38)
> > at org.spockframework.mock.MockInteraction.accept(MockInteraction.java:60)
> > at org.spockframework.mock.MockInteractionDecorator.accept(MockInteractionDeco rator.java:41)
> > at org.spockframework.mock.InteractionScope$1.accept(InteractionScope.java:38)
> > at org.spockframework.mock.MockController.dispatch(MockController.java:42)
> > at org.spockframework.mock.DefaultMockFactory$1.invoke(DefaultMockFactory.java :70)
> > at $Proxy15.transferTo(Unknown Source)
> > at com.lexmark.pssd.app.mve.file.upload.AbstractFileUploadController.saveFile( AbstractFileUploadController.java:80)
> > at com.lexmark.pssd.app.mve.file.upload.AbstractFileUploadController.processFi le(AbstractFileUploadController.java:73)
> > at com.lexmark.pssd.app.mve.file.upload.AbstractFileUploadController.handleFor mUpload(AbstractFileUploadController.java:52)
> > at com.lexmark.pssd.app.mve.file.upload.AbstractFileUploadController$handleFor mUpload.call(Unknown Source)
> > at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArra y.java:40)
> > at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite .java:116)
> > at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite .java:132)
> > at com.lexmark.pssd.app.mve.file.upload.AbstractFileUploadControllerTest.$spoc k_feature_0_0(AbstractFileUploadControllerTest.groovy:44)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 9)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at org.spockframework.runtime.BaseSpecRunner.invokeRaw(BaseSpecRunner.java:235 )
> > at org.spockframework.runtime.BaseSpecRunner.invoke(BaseSpecRunner.java:217)
> > at org.spockframework.runtime.BaseSpecRunner.invokeFeatureMethod(BaseSpecRunne r.java:204)
> > at org.spockframework.runtime.BaseSpecRunner.runSimpleFeature(BaseSpecRunner.j ava:182)
> > at org.spockframework.runtime.BaseSpecRunner.doRunFeature(BaseSpecRunner.java: 174)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 9)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at org.spockframework.runtime.BaseSpecRunner.invokeRaw(BaseSpecRunner.java:235 )
> > at org.spockframework.runtime.BaseSpecRunner.invoke(BaseSpecRunner.java:217)
> > at org.spockframework.runtime.BaseSpecRunner.runFeature(BaseSpecRunner.java:15 2)
> > at org.spockframework.runtime.BaseSpecRunner.runFeatures(BaseSpecRunner.java:1 29)
> > at org.spockframework.runtime.BaseSpecRunner.doRun(BaseSpecRunner.java:96)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 9)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at org.spockframework.runtime.BaseSpecRunner.invokeRaw(BaseSpecRunner.java:235 )
> > at org.spockframework.runtime.BaseSpecRunner.invoke(BaseSpecRunner.java:217)
> > at org.spockframework.runtime.BaseSpecRunner.run(BaseSpecRunner.java:73)
> > at org.spockframework.runtime.Sputnik.run(Sputnik.java:57)
> > at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute( JUnitTestClassExecuter.java:51)
> > at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.process TestClass(JUnitTestClassProcessor.java:63)
> > at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestCl ass(SuiteTestClassProcessor.java:49)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 9)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatc h.java:35)
> > at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatc h.java:24)
> > at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextCl assLoaderDispatch.java:32)
> > at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHan dler.invoke(ProxyDispatchAdapter.java:75)
> > at $Proxy3.processTestClass(Unknown Source)
> > at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(Te stWorker.java:86)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 9)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatc h.java:35)
> > at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatc h.java:24)
> > at org.gradle.messaging.remote.internal.MethodInvocationUnmarshallingDispatch. dispatch(MethodInvocationUnmarshallingDispatch.java:48)
> > at org.gradle.messaging.dispatch.DiscardOnFailureDispatch.dispatch(DiscardOnFa ilureDispatch.java:31)
> > at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch. java:129)
> > at org.gradle.messaging.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:3 3)
> > at org.gradle.messaging.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:69)
> > at org.gradle.messaging.concurrent.DefaultExecutorFactory$StoppableExecutorImp l$1.run(DefaultExecutorFactory.java:63)
> > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j ava:885)
> > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: 907)
> > at java.lang.Thread.run(Thread.java:619)
> > Caused by: java.io.IOException
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce ssorImpl.java:39)
> > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru ctorAccessorImpl.java:27)
> > at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> > at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.j ava:77)
> > at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwra pNoCoerce.callConstructor(ConstructorSite.java:102)
> > at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(C allSiteArray.java:52)
> > at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(Abstr actCallSite.java:190)
> > at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(Abstr actCallSite.java:194)
> > at com.lexmark.pssd.app.mve.file.upload.AbstractFileUploadControllerTest$_$spo ck_feature_0_0_closure1.doCall(AbstractFileUploadControllerTest.groovy:41)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 9)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
> > ... 74 more
>
> > So, it appears Groovy is throwing an InvokerInvocationException...for some reason.  Any ideas?
>
> > Thanks,
> >    Jamie
>
> > --
> > You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
> > To view this discussion on the web visithttps://groups.google.com/d/msg/spockframework/-/OjL6gxJgxPYJ.
Reply all
Reply to author
Forward
0 new messages