OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.15k stars 588 forks source link

NullpointerException in JSP after upgrade #18941

Closed DantePichardo closed 2 years ago

DantePichardo commented 2 years ago

Describe the bug
Upgraded to 21.0.0.9 with fix IFPH39418. The eba web app no longer works, when I try to open the login page, it crashes.

BundleLoader[com.ibm.ws.webcontainer_1.1.56.cl210920210824-2341] found local class com.ibm.websphere.servlet.response.StoredResponseCompat 13ms ModuleClassLoader[com.ibm.ws.webcontainer_1.1.56.cl210920210824-2341].loadClass(javax.servlet.http.HttpServletResponseWrapper) BundleLoader[com.ibm.ws.webcontainer_1.1.56.cl210920210824-2341].findClass(javax.servlet.http.HttpServletResponseWrapper) BundleLoader[com.ibm.ws.webcontainer_1.1.56.cl210920210824-2341] loading from import package: javax.servlet.http -> [com.ibm.websphere.javaee.servlet.3.1_1.0.56.cl210920210824-2341] BundleLoader[com.ibm.websphere.javaee.servlet.3.1_1.0.56.cl210920210824-2341].findLocalClass(javax.servlet.http.HttpServletResponseWrapper) BundleLoader[com.ibm.websphere.javaee.servlet.3.1_1.0.56.cl210920210824-2341] found local class javax.servlet.http.HttpServletResponseWrapper 0ms BundleLoader[com.ibm.ws.webcontainer_1.1.56.cl210920210824-2341] found local class com.ibm.websphere.servlet.response.StoredResponse 33ms BundleLoader[com.ibm.ws.webcontainer_1.1.56.cl210920210824-2341] found local class com.ibm.websphere.servlet.filter.ChainedResponse 36ms ModuleClassLoader[com.ibm.ws.webcontainer_1.1.56.cl210920210824-2341].loadClass(com.ibm.ws.webcontainer.util.ApplicationErrorUtils) BundleLoader[com.ibm.ws.webcontainer_1.1.56.cl210920210824-2341].findClass(com.ibm.ws.webcontainer.util.ApplicationErrorUtils) BundleLoader[com.ibm.ws.webcontainer_1.1.56.cl210920210824-2341].findLocalClass(com.ibm.ws.webcontainer.util.ApplicationErrorUtils) ModuleClassLoader[com.ibm.ws.webcontainer_1.1.56.cl210920210824-2341 - /Users/dantepichardo/Documents/development/522/vtd_web/server/server/lib/com.ibm.ws.webcontainer_1.1.56.jar].findClassImpl(com.ibm.ws.webcontainer.util.ApplicationErrorUtils) read 6608 bytes from /Users/dantepichardo/Documents/development/522/vtd_web/server/server/lib/com.ibm.ws.webcontainer_1.1.56.jar!/com/ibm/ws/webcontainer/util/ApplicationErrorUtils.class defining class com.ibm.ws.webcontainer.util.ApplicationErrorUtils BundleLoader[com.ibm.ws.webcontainer_1.1.56.cl210920210824-2341] found local class com.ibm.ws.webcontainer.util.ApplicationErrorUtils 14ms ModuleClassLoader[com.ibm.ws.webcontainer_1.1.56.cl210920210824-2341].loadClass(java.lang.StackTraceElement) ModuleClassLoader[com.ibm.ws.webcontainer_1.1.56.cl210920210824-2341].loadClass(com.ibm.websphere.ras.TruncatableThrowable) BundleLoader[com.ibm.ws.webcontainer_1.1.56.cl210920210824-2341].findClass(com.ibm.websphere.ras.TruncatableThrowable) BundleLoader[com.ibm.ws.webcontainer_1.1.56.cl210920210824-2341] loading from import package: com.ibm.websphere.ras -> [org.eclipse.osgi_3.16.0.cl210920210824-2341] [ERROR ] SRVE0777E: Exception thrown by application class 'java.io.File.:277' java.lang.NullPointerException at java.io.File.(File.java:277) at com.ibm.ws.jsp.webcontainerext.JspDependent.isOutdated(JspDependent.java:84) at [internal classes]

in this line:

getServletContext( ).getRequestDispatcher( "/login.jsp" ).forward( request, response );

Steps to Reproduce
Open the login page, using /Login path, which forwards to login.jsp

Expected behavior
Open the login page

Diagnostic information:

Additional context

epj commented 2 years ago

Can you please recreate the issue with this trace in effect: *=info:com.ibm.ws.webcontainer*=all:com.ibm.wsspi.webcontainer*=all:HTTPChannel=all:GenericBNF=all:com.ibm.ws.jsp=finer

I don't need the trace from server startup, just start the trace before your login is attempted for the first time on the server.

Send along trace.log and messages.log. Thanks @DantePichardo .

DantePichardo commented 2 years ago

ffdc_21.10.11_20.46.20.0.log messages.log trace_21.10.11_21.04.12.0.log

epj commented 2 years ago

The trace does not include the start of the login.jsp request. Were there additional trace logs besides the one? Can you please also send up the web.xml and ibm-web-ext.xml for your app?

DantePichardo commented 2 years ago

trace_21.10.11_21.04.10.0.log trace_21.10.11_21.04.10.1.log trace_21.10.11_21.04.10.2.log trace_21.10.11_21.04.11.0.log

trace_21.10.11_21.04.11.1.log trace_21.10.11_21.04.11.2.log trace_21.10.11_21.04.11.3.log

DantePichardo commented 2 years ago

web.xml.log

I changed the extension so github allows me to upload those.

DantePichardo commented 2 years ago

I closed ticket by mistake, please re-open if needed.

epj commented 2 years ago

[10/11/21 21:04:11:433 CDT] 00000496 id=00000000 com.ibm.ws.jsp.webcontainerext.JSPExtensionContext 2 getRealPath FileNotFound exception while obtaining realPath: null, exception was: java.io.FileNotFoundException: /WEB-INF/tlds/storage.tld

This error is trapped before the NPE but the missing file appears to be the cause of the NPE. Can you check that /WEB-INF/tlds/storage.tld exists in your application? If it is indeed missing, please either add the file or remove its taglib call from the JSP, and see if the NPE goes away.

Meanwhile, our code shouldn't hit a NPE so I'll continue to work on a fix for it.