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

Web services: NPEs due to formattedText property not initialized

    XMLWordPrintable

    Details

    • Test Plan:
      Hide
      • Whether using the attached PHP 8 script or some other means, attempt to use the copySite method of the SakaiScript class. 
        • If using the attached PHP script, modify the first three variables to have valid, non-null values. You might also need to edit $sakai_server to point at the desired instance of Sakai.
        • Run the script which will print out the string returned from the copySite method. If the bug is manifest, the string will be:
          • java.lang.NullPointerException : null
        • Likewise, check the catalina.out log for the server. When the bug is manifest, an ERROR will be logged similar to the following example below.

      Example error logged in catalina.out:

      23-Mar-2021 16:36:14.171 ERROR [http-nio-20013-exec-21] org.sakaiproject.webservices.SakaiScript.copySite WS copySite(): java.lang.NullPointerException : null

      Show
      Whether using the attached PHP 8 script or some other means, attempt to use the copySite method of the SakaiScript class.  If using the attached PHP script, modify the first three variables to have valid, non-null values. You might also need to edit $sakai_server to point at the desired instance of Sakai. Run the script which will print out the string returned from the copySite method. If the bug is manifest, the string will be: java.lang.NullPointerException : null Likewise, check the catalina.out log for the server. When the bug is manifest, an ERROR will be logged similar to the following example below. Example error logged in catalina.out: 23-Mar-2021 16:36:14.171 ERROR [http-nio-20013-exec-21] org.sakaiproject.webservices.SakaiScript.copySite WS copySite (): java.lang.NullPointerException : null

      Description

      SOAP web service methods that are subclasses of AbstractWebService that rely on the formattedText property (introduced with SAK-44172) will throw NullPointerExceptions because this property is not initialized.

      An example that meets the above criteria is the copySite method of the SakaiScript class. It fails to copy sites because the formattedText property is null.

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                hornersa Sean Horner
                Reporter:
                hornersa Sean Horner
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration