Test Templates Plugin

generate-controller fails in Grails 1.1

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch Submitted:
    Yes

Description

In Grails 1.1, with Test-Template 1.3.2, the following error occurs when running generate-controller:

Error executing script GenerateController: java.lang.NullPointerException: Cannot invoke method lastIndexOf() on null object
gant.TargetExecutionException: java.lang.NullPointerException: Cannot invoke method lastIndexOf() on null object
at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:331)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:344)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:334)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.processTargets(Gant.groovy:495)
at gant.Gant.processTargets(Gant.groovy:480)
Caused by: java.lang.NullPointerException: Cannot invoke method lastIndexOf() on null object
at _GrailsCreateArtifacts_groovy$_run_closure1.doCall(_GrailsCreateArtifacts_groovy:36)
at _GrailsCreateArtifacts_groovy$_run_closure1.doCall(_GrailsCreateArtifacts_groovy)
at _Events$_run_closure1.doCall(_Events.groovy:11)
at _GrailsEvents_groovy$_run_closure5.doCall(_GrailsEvents_groovy:59)
at _GrailsGenerate_groovy.generateForDomainClass(_GrailsGenerate_groovy:91)
at _GrailsGenerate_groovy$_run_closure1.doCall(_GrailsGenerate_groovy:50)
at GenerateController$_run_closure1.doCall(GenerateController.groovy:33)
at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
... 10 more

The attached patch modifies the way createArtifact is called in the _Events script, making it work with Grails 1.1.

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: