gjeudy (5) [Avatar] Offline
#1
Hi,

I'm trying to run listing 12.15 and 12.16 and the code fails with:

name newPage, params [Page Title, Page Description]
name request, params [BackPack$_makeRemoteCall_closure4_closure9_closure10@8d4560]
method null
Exception thrown: Cannot invoke method call() on null object

java.lang.NullPointerException: Cannot invoke method call() on null object
at BackPack.invokeMethod(listing1216.groovy:51)
at BackPack$_makeRemoteCall_closure4_closure9.doCall(listing1216.groovy:37)
at BackPack$_makeRemoteCall_closure4.doCall(listing1216.groovy:36)
at BackPack.makeRemoteCall(listing1216.groovy:35)
at BackPack$_closure1.doCall(listing1216.groovy:10)
at BackPack.invokeMethod(listing1216.groovy:50)
at listing1215.run(listing1215.groovy:3)

It seems like the newPage closure calls makeRemoteCall which is also intercepted by invokeMethod() and of course it can't find the method and fail. Is there any documentation regarding this behavior change since groovy 1.0 ?
Mittie (397) [Avatar] Offline
#2
Re: Listing 12.15 doesn't run with Groovy 1.6.5
Please note that the first edition targets Groovy 1.0.
The second edition will cover Groovy 1.7.

What version are you on?

thanks for posting
Dierk
gjeudy (5) [Avatar] Offline
#3
Re: Listing 12.15 doesn't run with Groovy 1.6.5
I am on Groovy 1.6.5
Mittie (397) [Avatar] Offline
#4
Re: Listing 12.15 doesn't run with Groovy 1.6.5
ah - sorry - of course. You already mentioned it in the subject line. Silly me.

The problem with this listing seems to be that the BackPack server has changed his REST service. I currently cannot verify since I only get 503's back from it.

I guess I will follow an approach that is less dependent on external services for the 2nd edition.

thanks for posting
Dierk