'Application throwing 500 error when image not found instead of 404
We have shifted from Jboss 6 to Jboss 7.2.9 and we observed one changes in the site.
Earlier when we were not find an image then we were getting 404 error which is acceptable but after moving to Jboss 7.2.9 now we see it's throwing a 500 error which is an issue.
We haven't change anything in code or in web.xml but hard to understand why this is happening.
Note : Our site is deployed in Java ATG
Thank You.
Code in web.xml
<error-page>
<error-code>404</error-code>
<location>error404.jsp</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>error.jsp</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>error500.jsp</location>
</error-page>
Server log error:
java.lang.RuntimeException: javax.servlet.ServletException: JBWEB004036: File imagePath(Any Image) not found at io.undertow.servlet.spec.HttpServletResponseImpl.doErrorDispatch(HttpServletResponseImpl.java:204) [undertow-servlet-2.0.30.SP4-redhat-00001.jar:2.0.30.SP4-redhat-00001] at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:276) [undertow-servlet-2.0.30.SP4-redhat-00001.jar:2.0.30.SP4-redhat-00001] at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78) [undertow-servlet-2.0.30.SP4-redhat-00001.jar:2.0.30.SP4-redhat-00001] at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133) [undertow-servlet-2.0.30.SP4-redhat-00001.jar:2.0.30.SP4-redhat-00001] at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130) [undertow-servlet-2.0.30.SP4-redhat-00001.jar:2.0.30.SP4-redhat-00001] at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) [undertow-servlet-2.0.30.SP4-redhat-00001.jar:2.0.30.SP4-redhat-00001] at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-2.0.30.SP4-redhat-00001.jar:2.0.30.SP4-redhat-00001] at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
