NullPointerException on FinalReportPage (



After submitting files, I am encountering the error below. Looking at the source, I've found the offending line, but can't reason why there is a NPE. The trace is below, as is the offending line of code. Any help would be appreciated.





// ----------------------------------------------------------
    public boolean canMarkupFile()
        return !markupFileName().startsWith("public/");

    // --------THis must be returning null. Why?--------------------------------------------------
    public String markupFileName()
        String result = markupFileNameRaw();
        if ( result == null )
            result = fullyQualifiedClassName();
            if (result != null)
                result =  "clover/" + result.replace( '.', '/' ) + ".html";
        return result;

Date/time:   2015-08-07 02:24:37 Etc/GMT
Request: /webcat/WebObjects/Web-CAT.woa/wo/
Occurrences: 39
Component:   org.webcat.grader.FinalReportPage
SessionID: TzCUFsntiOkqjPplDuYnPM


Extra information:
CurrentComponent = org.webcat.grader.FinalReportPage
PreviousPageList = ("org.webcat.core.StatusPage", "org.webcat.grader.StudentsForAssignmentPage", "org.webcat.core.StatusPage", "org.webcat.grader.UploadSubmissionPage", "org.webcat.core.StatusPage", "org.webcat.grader.UploadSubmissionPage", "org.webcat.grader.ConfirmSubmissionPage", "org.webcat.grader.FinalReportPage", "org.webcat.core.StatusPage", "org.webcat.core.StatusPage", "org.webcat.core.StatusPage", "org.webcat.reporter.DebuggingPage", "org.webcat.admin.AdminStatusPage", "org.webcat.admin.SubsystemManagerPage", "D2W-Web-CAT: QueryAll ", "org.webcat.admin.SubsystemManagerPage", "org.webcat.admin.AdminStatusPage", "org.webcat.core.StatusPage", "org.webcat.core.StatusPage", "org.webcat.core.StatusPage", "org.webcat.core.StatusPage", "org.webcat.core.StatusPage", "org.webcat.core.StatusPage", "org.webcat.grader.StudentsForAssignmentPage", "org.webcat.grader.GradeStudentSubmissionPage", "org.webcat.grader.EditFileCommentsPage", "org.webcat.grader.GradeStudentSubmissionPage", "org.webcat.grader.GradeStudentSubmissionPage", "org.webcat.grader.StudentsForAssignmentPage", "org.webcat.grader.StudentsForAssignmentPage", "org.webcat.grader.GradeStudentSubmissionPage", "org.webcat.grader.StudentsForAssignmentPage", "org.webcat.core.StatusPage", "org.webcat.grader.UploadSubmissionPage", "org.webcat.grader.ConfirmSubmissionPage", "org.webcat.grader.FinalReportPage")
Headers = {user-agent = "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.130 Safari/537.36"; cookie = "org.webcat.core.AuthenticationDomain.lastUsed=Rutgers; wosid=TzCUFsntiOkqjPplDuYnPM; woinst=-1; JSESSIONID=48A22FD2208C5AE5A32C85F29F052B50; visid_incap_425582=+dznEA7iT4SuiBVk4ZC/uw5asVUAAAAAQUIPAAAAAAAvOJdk0++ewJD10jtUSqRF"; accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"; remote_addr = ""; x-webobjects-servlet-server-port = "443"; referer = ""; x-webobjects-servlet-server-name = ""; x-webobjects-adaptor-version = "5.2"; upgrade-insecure-requests = "1"; accept-encoding = "gzip, deflate, sdch"; original_context_id = "95"; content-length = "0"; host = ""; accept-language = "en-US,en;q=0.8"; connection = "keep-alive"; }
CurrentPage = org.webcat.grader.FinalReportPage
current tab = Most Recent <-- Results <-- student <-- root
URL = /webcat/WebObjects/Web-CAT.woa/wo/

Stack trace:
at canMarkupFile(
at invoke(
at invoke(
at invoke(
at methodValue(
at valueInObject(
at valueForKey(
at valueForKey(
at valueForKeyPath(
at valueForKeyPath(
at valueForKeyPath(
at valueForKeyPath(





After 18 hours of debugging. I figured it out.


Apparently, if you configure the grader to include a [data] file, but do not explicitly EXclude it from static analysis, you will see this behavior.


Solution: Exclude any source files from static analysis that you plan to drop into students' directories.


Hope this helps someone!


I have been able to reliably

I have been able to reliably reproduce this bug now.


It occurs only when static analysis via checkstyles or pmd are enabled.

I have v 1.42 of the script from sourceforge along with the latest build.xml.


Careful review of the logs indicates that the static analysis completes correctly and without error. ant.log is unremarkable. It seems that when static analysis is enabled, the only thing that doesn't happen is that the class/file name is not passed back into SubmissionFileStats, and thus causes the NullPointerException.

I don't really know where to go from here, other than disabling static analysis.


Does anyone have any ideas as to why this is happening on my install?