Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-37676

NPE in ShowPageProducer

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.0, 10.0
    • Fix Version/s: 10.0
    • Component/s: Lessons
    • Labels:
    • 10 status:
      Resolved
    • Previous Issue Keys:
      LSNBLDR-351

      Description

      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().

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                • Assignee:
                  hedrick Charles Hedrick
                  Reporter:
                  smarquard Stephen Marquard
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Integration