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

Unit testcase failed in gradebook tool when using IBM JDK

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.0, 2.4.1
    • Fix Version/s: 2.5.0
    • Component/s: Gradebook Classic
    • Labels:
      None
    • Environment:
      Sakai community edition 2.4 and higher on any environment.

      Description

      This problem occurs when trying to compile the gradebook tool with the IBM JDK. The cause of the problem is due to the use of XMLtransformer factory in the documentToString method.
      line 248 of GradebookServiceInternalTest.java:

      // Work around JDK 1.5 issue.
      System.setProperty("javax.xml.transform.TransformerFactory", "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
      Transformer transformer = TransformerFactory.newInstance().newTransformer(); <--- fails on this line
      ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
      transformer.transform(new DOMSource(doc.getDocumentElement()), new StreamResult(byteOut));

      error: Provider for javax.xml.transform.TransformerFactory cannot be found.

      As show above, there was a workaround implemented in sakai 2.4 to deal with this problem. I tested the latest version of sakai still requires this workaround, and removing the workaround has no effect on the IBM JDK's compilation (the test still fails).

      To correct this problem I suggest either researching why this workaround was needed and fixing the problem at its root, or, since the XMLtransformer is not used by gradebook production code, and is just being used by the test to play the role of an external site migration service, to rewrite the unit test to use a different service.

      Alex Reynolds
      Marist/IBM Joint study

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                Unassigned Unassigned
                Reporter:
                areynolds Alexander T. Reynolds (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration