NullPointerException on FinalReportPage (SubmissionFileStats.java:159)

 

Hello,

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.

 

Thanks,

-andrew

 

// ----------------------------------------------------------
    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/95.0.0.0.29.1.8.0.1.3.2.2.1.1.1.0.0.1.15
Referer: https://edsvc.cs.rutgers.edu/webcat/WebObjects/Web-CAT.woa/wo/94.0.0.0.2...
Occurrences: 39
Component:   org.webcat.grader.FinalReportPage
SessionID: TzCUFsntiOkqjPplDuYnPM

Exception:
----------
java.lang.NullPointerException:
null

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 = "24.193.178.212"; x-webobjects-servlet-server-port = "443"; referer = "https://edsvc.cs.rutgers.edu/webcat/WebObjects/Web-CAT.woa/wo/94.0.0.0.29.1.6.1.1.1.0.0.1.13"; x-webobjects-servlet-server-name = "edsvc.cs.rutgers.edu"; x-webobjects-adaptor-version = "5.2"; upgrade-insecure-requests = "1"; accept-encoding = "gzip, deflate, sdch"; original_context_id = "95"; content-length = "0"; host = "edsvc.cs.rutgers.edu"; 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/95.0.0.0.29.1.8.0.1.3.2.2.1.1.1.0.0.1.15

Stack trace:
-----------------
at canMarkupFile(SubmissionFileStats.java:159)
at invoke(GeneratedMethodAccessor544.java:NA)
at invoke(DelegatingMethodAccessorImpl.java:25)
at invoke(Method.java:597)
at methodValue(NSKeyValueCoding.java:636)
at valueInObject(NSKeyValueCoding.java:1134)
at valueForKey(EOCustomObject.java:1498)
at valueForKey(NSKeyValueCoding.java:447)
at valueForKeyPath(NSKeyValueCodingAdditions.java:212)
at valueForKeyPath(EOCustomObject.java:1588)
at valueForKeyPath(NSKeyValueCodingAdditions.java:149)
at valueForKeyPath(NSKeyValueCodingAdditions.java:217)
 

Groups:

Comments

atjang

RESOLVED

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!

atjang

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 execute.pl 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?