Ticket #311 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Errors in study wizard after editing events multiple times

Reported by: business@… Owned by: work@…
Priority: major Milestone: Should have
Component: Unknown Version: 0.6.3
Keywords: Cc:
Product: Operating system:
URL: Hardware:

Description

Currently on  http://test.dbnp.org, the PPSH study gives an error when you go from the Samples step to next:

2011-02-10 10:41:37,516 [TP-Processor23] ERROR builder.ClosureInvokingAction  - Exception occured invoking flow action: Cannot get property 'samples' on null object
java.lang.NullPointerException: Cannot get property 'samples' on null object
	at dbnp.studycapturing.Study$_deleteSample_closure19.doCall(Study.groovy:288)
	at dbnp.studycapturing.Study.deleteSample(Study.groovy:288)
	at dbnp.studycapturing.Study$deleteSample.call(Unknown Source)
	at dbnp.studycapturing.StudyWizardController$_eventPage_closure20_closure197_closure200_closure203.doCall(StudyWizardController.groovy:1590)
	at dbnp.studycapturing.StudyWizardController$_eventPage_closure20_closure197_closure200.doCall(StudyWizardController.groovy:1588)
	at dbnp.studycapturing.StudyWizardController$_eventPage_closure20_closure197.doCall(StudyWizardController.groovy:1586)
	at dbnp.studycapturing.StudyWizardController$_eventPage_closure20.doCall(StudyWizardController.groovy:1540)
	at dbnp.studycapturing.StudyWizardController.eventPage(StudyWizardController.groovy:1521)
	at dbnp.studycapturing.StudyWizardController$_closure2_closure40_closure103.doCall(StudyWizardController.groovy:586)
	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774)
	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896)
	at java.lang.Thread.run(Thread.java:662)

I'm confused at where this error comes from. Looking in the database, everything seems to be OK - all samples have parent study, subject and events and the assays and templates are OK too.

The Assays step also gives an error:

2011-02-10 10:53:53,358 [TP-Processor16] ERROR view.GroovyPageView  - Error processing GroovyPageView: Error executing tag <af:page>: Cannot get property 'template' on null object at /home/tomcat/apache-tomcat-6.0.29/webapps/gscf-0.6.4-dbnptest/WEB-INF/grails-app/views/studyWizard/pages/_assays.gsp:1
org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <af:page>: Cannot get property 'template' on null object at /home/tomcat/apache-tomcat-6.0.29/webapps/gscf-0.6.4-dbnptest/WEB-INF/grails-app/views/studyWizard/pages/_assays.gsp:1
	at home_tomcat_apache_tomcat_6_0_29_webapps_gscf_0_6_4_dbnptest_WEB_INF_grails_app_views_studyWizard_pages__assays_gsp.run(home_tomcat_apache_tomcat_6_0_29_webapps_gscf_0_6_4_dbnptest_WEB_INF_grails_app_views_studyWizard_pages__assays_gsp:84)
	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774)
	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException: Cannot get property 'template' on null object
	at dbnp.studycapturing.Study$_giveAssaysForTemplate_closure7.doCall(Study.groovy:151)
	at dbnp.studycapturing.Study.giveAssaysForTemplate(Study.groovy:151)
	at dbnp.studycapturing.Study$giveAssaysForTemplate$0.call(Unknown Source)
	at home_tomcat_apache_tomcat_6_0_29_webapps_gscf_0_6_4_dbnptest_WEB_INF_grails_app_views_studyWizard_pages__assays_gsp$_run_closure1_closure2.doCall(home_tomcat_apache_tomcat_6_0_29_webapps_gscf_0_6_4_dbnptest_WEB_INF_grails_app_views_studyWizard_pages__assays_gsp:63)
	at home_tomcat_apache_tomcat_6_0_29_webapps_gscf_0_6_4_dbnptest_WEB_INF_grails_app_views_studyWizard_pages__assays_gsp$_run_closure1.doCall(home_tomcat_apache_tomcat_6_0_29_webapps_gscf_0_6_4_dbnptest_WEB_INF_grails_app_views_studyWizard_pages__assays_gsp:57)
	at home_tomcat_apache_tomcat_6_0_29_webapps_gscf_0_6_4_dbnptest_WEB_INF_grails_app_views_studyWizard_pages__assays_gsp$_run_closure1.doCall(home_tomcat_apache_tomcat_6_0_29_webapps_gscf_0_6_4_dbnptest_WEB_INF_grails_app_views_studyWizard_pages__assays_gsp)
	at nl.grails.plugins.ajaxflow.AjaxflowTagLib$_closure7.doCall(AjaxflowTagLib.groovy:422)
	... 7 more

As does the Assay tab of the Study overview:

2011-02-10 10:55:39,001 [TP-Processor23] ERROR view.GroovyPageView  - Error processing GroovyPageView: Cannot get property 'token' on null object
java.lang.NullPointerException: Cannot get property 'token' on null object
	at gsp_gscf_studyshow_assays_gsp$_run_closure1_closure2.doCall(gsp_gscf_studyshow_assays_gsp.groovy:43)
	at gsp_gscf_studyshow_assays_gsp$_run_closure1.doCall(gsp_gscf_studyshow_assays_gsp.groovy:31)
	at gsp_gscf_studyshow_assays_gsp.run(gsp_gscf_studyshow_assays_gsp.groovy:29)
	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774)
	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896)
	at java.lang.Thread.run(Thread.java:662)
2011-02-10 10:55:39,010 [TP-Processor23] ERROR errors.GrailsExceptionResolver  - Exception occurred when processing request: [GET] /gscf-0.6.4-dbnptest/study/show_assays/58
Stacktrace follows:
org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Cannot get property 'token' on null object
	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774)
	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException: Cannot get property 'token' on null object
	at gsp_gscf_studyshow_assays_gsp$_run_closure1_closure2.doCall(gsp_gscf_studyshow_assays_gsp.groovy:43)
	at gsp_gscf_studyshow_assays_gsp$_run_closure1.doCall(gsp_gscf_studyshow_assays_gsp.groovy:31)
	at gsp_gscf_studyshow_assays_gsp.run(gsp_gscf_studyshow_assays_gsp.groovy:29)
	... 6 more

I'm lost here... Jeroen do you have an idea?

Change History

Changed 3 years ago by work@…

I just had a look with HEAD at the dbnptest database, and for me it works fine untill I get to the assays step:

2011-02-10 12:36:54,538 [http-8080-4] ERROR StackTrace  - Sanitizing stacktrace:
org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error evaluating expression [study.giveAssaysForTemplate(template)] on line [41]: Cannot get property 'template' on null object
	at org.codehaus.groovy.grails.web.pages.GroovyPage.evaluate(GroovyPage.java:242)
	at sun.reflect.GeneratedMethodAccessor436.invoke(Unknown Source)
	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:88)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
	at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1070)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1003)
	at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1070)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:706)
	at groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:44)
	at groovy.lang.MetaClassImpl.invokeMethodOnGroovyObject(MetaClassImpl.java:1123)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1017)
	at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1070)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:161)
	at Users_jeroen_Workspace_grails_gscf_grails_app_views_studyWizard_pages__assays_gsp$_run_closure1_closure14.doCall(_assays.gsp:56)
	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:88)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
	at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1070)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
	at groovy.lang.Closure.call(Closure.java:276)
	at groovy.lang.Closure.call(Closure.java:289)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1198)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1174)
	at org.codehaus.groovy.runtime.dgm$109.invoke(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:270)
	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
	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:124)
	at Users_jeroen_Workspace_grails_gscf_grails_app_views_studyWizard_pages__assays_gsp$_run_closure1.doCall(_assays.gsp:48)
	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.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:225)
	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
	at Users_jeroen_Workspace_grails_gscf_grails_app_views_studyWizard_pages__assays_gsp$_run_closure1.doCall(_assays.gsp)
	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:88)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
	at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1070)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
	at groovy.lang.Closure.call(Closure.java:276)
	at groovy.lang.Closure.call(Closure.java:271)
	at org.codehaus.groovy.grails.web.taglib.GroovyPageTagBody.executeClosure(GroovyPageTagBody.java:175)
	at org.codehaus.groovy.grails.web.taglib.GroovyPageTagBody.captureClosureOutput(GroovyPageTagBody.java:139)
	at org.codehaus.groovy.grails.web.taglib.GroovyPageTagBody.call(GroovyPageTagBody.java:188)
	at org.codehaus.groovy.grails.web.taglib.GroovyPageTagBody$call.call(Unknown Source)
	at nl.grails.plugins.ajaxflow.AjaxflowTagLib$_closure7.doCall(AjaxflowTagLib.groovy:422)
	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:88)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
	at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1070)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
	at groovy.lang.Closure.call(Closure.java:276)
	at org.codehaus.groovy.grails.web.pages.GroovyPage.invokeTag(GroovyPage.java:369)
	at org.codehaus.groovy.grails.web.pages.GroovyPage$invokeTag.callCurrent(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)

Changed 3 years ago by work@…

The strange thing is that this error is caused in the following template code:

		<g:each var="template" in="${study.giveAllAssayTemplates()}">
			<g:set var="showHeader" value="${true}" />
			<h1>${template}</h1>
			<div class="tableEditor">
			<g:each var="assay" in="${study.giveAssaysForTemplate(template)}">

So, it is caused in a "study.giveAllAssayTemplates()" loop where the variable "template" is set. But then it complains in "study.giveAssaysForTemplate(template)" that it cannot get propert 'template' "on a null object" ?? That makes no sense at all...

Changed 3 years ago by work@…

just performed some extensive testing with the dynamic validators (there was a bug in validating Text fields), but no strangeness to be seen with this study...

Changed 3 years ago by business@…

  • status changed from new to closed
  • resolution set to fixed

Changed 3 years ago by business@…

The error in the assays step was solved by correcting a GORM mistake in the database, see  https://trac.nbic.nl/gscf/ticket/334#comment:3.

Note: See TracTickets for help on using tickets.