Seen in lessonbuilder-1.5.x-fall2013 but this code is the same in trunk.
Fatal internal error handling request: Target exception of class java.lang.NullPointerException Successive lines until stack trace show causes progressing to exception site:
java.lang.NullPointerException at org.sakaiproject.lessonbuildertool.tool.producers.ShowPageProducer.fillComponents(ShowPageProducer.java:2211) at uk.org.ponder.rsf.view.support.ViewCollector.fillComponents(ViewCollector.java:56) at uk.org.ponder.rsf.view.support.LayoutCollector.fillComponents(LayoutCollector.java:68) at sun.reflect.GeneratedMethodAccessor2985.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) at com.sun.proxy.$Proxy185.fillComponents(Unknown Source)
so clearly response could be null. Perhaps the check is intended to be if (!isAvailable && response != null), otherwise null response should be checked before calling getShortAnswer().
Activity
Show:
Charles Hedrick February 26, 2014 at 1:43 PM
It was intended to be ||. We want to disable submit if the item is not available, but also if an answer has already been submitted. Currently we don't permit students to change answers.
Seen in lessonbuilder-1.5.x-fall2013 but this code is the same in trunk.
Fatal internal error handling request:
Target exception of class java.lang.NullPointerException
Successive lines until stack trace show causes progressing to exception site:
java.lang.NullPointerException
at org.sakaiproject.lessonbuildertool.tool.producers.ShowPageProducer.fillComponents(ShowPageProducer.java:2211)
at uk.org.ponder.rsf.view.support.ViewCollector.fillComponents(ViewCollector.java:56)
at uk.org.ponder.rsf.view.support.LayoutCollector.fillComponents(LayoutCollector.java:68)
at sun.reflect.GeneratedMethodAccessor2985.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at com.sun.proxy.$Proxy185.fillComponents(Unknown Source)
The code here is:
UIInput shortanswerInput = UIInput.make(questionForm, "shortanswerInput", "#{simplePageBean.questionResponse}");
if(!isAvailable || response != null) {
shortanswerInput.decorate(new UIDisabledDecorator());
if(response.getShortanswer() != null) {
shortanswerInput.setValue(response.getShortanswer());
}
}
so clearly response could be null. Perhaps the check is intended to be if (!isAvailable && response != null), otherwise null response should be checked before calling getShortAnswer().