NullPointer exception when scaffolding first Grails app -


starting out grails have installed grails version 2.4.0 , using jdk 1.7.0_55 on gnu/linux sequence of actions below keep getting nullpointerexception. can provide pointer missing or doing wrong ?

grails create-app firstgrails  cd firstgrails  grails  grails> run-app 

i go localhost:8080/firstgrails , see generated page.

next do

grails> create-domain-class tag 

and go firstgrails/grails-app/domain/firstgrails folder , edit tag.groovy contains:

// tag.groovy package firstgrails  class tag {     string name     string description } 

next

grails> create-controller tag 

and edit firstgrails/grailsapp/controllers/firstgrails/tagcontroller.groovy into

// tagcontroller.groovy package firstgrails  class tagcontroller {     static scaffold = tag } 

i reload in browser , firstgrails.tagcontroller added list of available controllers under welcome message. selecting it, create tag name , description , tag shows in list of tags expected. whenever try add second tag 500 error: internal server error with

uri: /firstgrails/tag/create class: java.lang.nullpointerexception message: null 

the trace in console is:

 error 2014-06-03 18:28:31,714 [http-bio-8080-exec-2] error errors.grailsexceptionresolver  - nullpointerexception occurred when processing request: [get] /firstgrails/tag/create stacktrace follows: message: error processing groovypageview: error executing tag <g:form>: error executing tag <g:render>: null     line | method ->>  527 | dofilter  in /tag/create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  caused grailstagexception: error executing tag <g:form>: error executing tag <g:render>: null ->>   35 | docall    in /tag/create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  caused grailstagexception: error executing tag <g:render>: null ->>   30 | docall    in /tag/create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  caused nullpointerexception: null ->>  333 | hash      in java.util.concurrent.concurrenthashmap - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  |    988 |       in     '' |    141 | getvalue  in grails.util.cacheentry |     81 | getvalue  in     '' |     73 | docall .  in tag_create$_run_closure2_closure24 |     78 | docall    in tag_create$_run_closure2 |     81 | run . . . in tag_create |    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 | error 2014-06-03 18:30:33,050 [http-bio-8080-exec-9] error errors.grailsexceptionresolver  - nullpointerexception occurred when processing request: [get] /firstgrails/tag/create stacktrace follows: message: error processing groovypageview: error executing tag <g:form>: error executing tag <g:render>: null     line | method ->>  527 | dofilter  in /tag/create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  caused grailstagexception: error executing tag <g:form>: error executing tag <g:render>: null ->>   35 | docall    in /tag/create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  caused grailstagexception: error executing tag <g:render>: null ->>   30 | docall    in /tag/create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  caused nullpointerexception: null ->>  333 | hash      in java.util.concurrent.concurrenthashmap - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  |    988 |       in     '' |    141 | getvalue  in grails.util.cacheentry |     81 | getvalue  in     '' |     73 | docall .  in tag_create$_run_closure2_closure24 |     78 | docall    in tag_create$_run_closure2 |     81 | run . . . in tag_create |    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 | error 2014-06-03 18:32:21,796 [http-bio-8080-exec-5] error errors.grailsexceptionresolver  - nullpointerexception occurred when processing request: [get] /firstgrails/tag/create stacktrace follows: message: error processing groovypageview: error executing tag <g:form>: error executing tag <g:render>: null     line | method ->>  527 | dofilter  in /tag/create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  caused grailstagexception: error executing tag <g:form>: error executing tag <g:render>: null ->>   35 | docall    in /tag/create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  caused grailstagexception: error executing tag <g:render>: null ->>   30 | docall    in /tag/create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  caused nullpointerexception: null ->>  333 | hash      in java.util.concurrent.concurrenthashmap - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  |    988 |       in     '' |    141 | getvalue  in grails.util.cacheentry |     81 | getvalue  in     '' |     73 | docall .  in tag_create$_run_closure2_closure24 |     78 | docall    in tag_create$_run_closure2 |     81 | run . . . in tag_create |    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 

i tried , able reproduce it. if generate view resolved without views giving error. there issue in grails jira, see this issue have provided patch it.

hope helps.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -