NPE Hard to Debug

A little background on the project. It is for a Learning Management System (Blackboard). The overall project was finished, but we were tasked with minor changes. We decided to incorporate Gradle into the project to make certain parts easier. Now onto the problem, the original war file given to us works. We broke it apart and created a new project. The project was separated into two subprojects, utilities and web, where the web project is dependent on the utilities project. I think that I have set all of the dependencies within the build file correctly. So far, the NPE doesn’t point to any line in the project files. I don’t know what other general information that I could provide to help, but please let me know and I can get it.

Part of the error message:
java.lang.NullPointerException at blackboard.portal.servlet.JspModuleClass.getModuleBody( at blackboard.web.portal_005fjsp.layout.display_005fmodule_jsp._jspService( at org.apache.jasper.runtime.HttpJspBase.service( at javax.servlet.http.HttpServlet.service( at sun.reflect.GeneratedMethodAccessor412.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at$

Web project build file:

version = '1.5'
project.ext {
     learnVersion = "9.1.110082.0"
    deployServer = ""
    deployInstance = "BBLEARN"

repositories {
  maven {
    url ""

dependencies {
    compile project(":utils")

    providedCompile files("BBLibs/bb-platform.jar")
    providedCompile files("BBLibs/bb-cms-admin.jar")
    providedCompile files("BBLibs/bb-taglibs.jar")
    providedCompile files("BBLibs/servlet-api.jar")

war {
from ('utils') {
    include '*.jar'
    into 'WEB-INF/classes/'
// Replace version in Blackboard Manifest'version', version)

filesMatching("**/bb-manifest.xml") {
    expand version: version
filesMatching("**/web.xml") {
    expand version: version

manifest {

        'Implementation-Title': 'Leaderboard Blackboard building block',
        'Implementation-Version': version,
        'Implementation-Vendor': 'GroupThree',
        'Provider': 'Gradle'



Your NPE appears to be in one of your JSP files (one of the reasons for not allowing scriptlets in JSPs).

If you’re using Eclipse, you might try installing the “JD-Eclipse Realign” plugin so that you can decompile the code in that class and possibly set breakpoints.

There’s no indication yet this is a Gradle problem.

The original project was developed in Eclipse, but, when we moved towards using Gradle, we included the Eclipse plugin. We mostly developed the project in Notepad++. I will make sure that I setup the Eclipse side right and try your suggestion. How could you tell that it was in one of my JSP files? The biggest problem with me going through this was I couldn’t figure out where to start.

I could tell by the following stack trace entries:

blackboard.portal.servlet.JspModuleClass.getModuleBody( at 
blackboard.web.portal_005fjsp.layout.display_005fmodule_jsp.jspService( at org.apache.jasper.runtime.HttpJspBase.service( at 

The presence of “jsp” everywhere was a huge clue, but the obviously dynamically constructed package path usually goes with compiled JSP pages.