kdureidy
kdureidy

Reputation: 960

Grails dynamic scaffolding error

I am new to Grails, I installed Grails 2.4 on Ubuntu 14.04

I have this Grails Domain:

class EndUser {

    String username
    String password
    String fullName

    String toString() {
        "$fullName"
    }

    static hasMany = [projects: Project, tasks: Task]

    static constraints = {
        fullName()
        username()
        password()
    }
}

and it's controller:

class EndUserController {

    static scaffold = true

    def index = {
//      redirect(action: "list")
    }
}

I am getting the error below, and everytime i create a new EndUser, I am getting an error page showing this message:

Error 500: Internal Server Error
URI
/ProjectTracker/endUser/create
Class
java.lang.NullPointerException
Message
null

What did I do wrong? and how can I fix it? Please let me know if I need to provide more info.

|Running Grails application
|Server running. Browse to http://localhost:8080/ProjectTracker
| Error 2014-06-09 01:59:47,663 [http-bio-8080-exec-7] ERROR errors.GrailsExceptionResolver  - NullPointerException occurred when processing request: [GET] /ProjectTracker/endUser/edit/1
Stacktrace follows:
Message: Error processing GroovyPageView: Error executing tag <g:form>: Error executing tag <g:render>: null
    Line | Method
->>  527 | doFilter  in /endUser/edit
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Caused by GrailsTagException: Error executing tag <g:form>: Error executing tag <g:render>: null
->>   38 | doCall    in /endUser/edit
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Caused by GrailsTagException: Error executing tag <g:render>: null
->>   33 | doCall    in /endUser/edit
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 


Caused by NullPointerException: null
->>  333 | hash      in java.util.concurrent.ConcurrentHashMap
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    988 | get       in     ''
|    141 | getValue  in grails.util.CacheEntry
|     81 | getValue  in     ''
|     33 | doCall .  in endUser_edit$_run_closure2_closure27
|     38 | doCall    in endUser_edit$_run_closure2
|     40 | run . . . in endUser_edit
|    189 | doFilter  in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|     63 | doFilter  in grails.plugin.cache.web.filter.AbstractFilter
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread

Thanks, Khalil.

Upvotes: 2

Views: 769

Answers (1)

Germ&#225;n Sancho
Germ&#225;n Sancho

Reputation: 111

It looks like you hit this bug: https://jira.grails.org/browse/GRAILS-11430. It will be fixed in Grails 2.4.1; you can either wait until that version is released or try the workaround provided in the comments of that link, which has been reported to work.

Upvotes: 1

Related Questions