Environment
Novell NetWare 6.5
NetWare based OES
Apache 2.0.59
ApacheManager for NetWare
NetWare based OES
Apache 2.0.59
ApacheManager for NetWare
Situation
When trying to access the ApacheManager on NetWare 6.5 or NetWare
based OES an error 500 exception is received. The first line of the
java dump (below the error 500 section) shows it failing in the
following area: "org.apache.jasper.JasperException: Array index out
of range: #" An example of the full error is given in the
additional notes section.
When you edit the httpd.conf file using the ApacheManager utility you will see comments like the ones listed below:
# TABLE: (4)
# TABLE: (5)
The error is because the application is trying to read an item in a vector, but there aren't that many items in the vector. So in other words, either the "TABLES" sections are either out of order numerically, or some of them are missing. This could be caused by a manual edit. In fact an easy way to reproduce this error is to simply go in and remove one of the TABLE sections and then try and access the ApacheManager.
When trying to track down where the issue lies in the httpd.conf you simply need to look at the number at the end of the array error. The number at the end of the array indicates the last thing it tried to execute when the failure occurred. In this case the error received was (org.apache.jasper.JasperException: Array index out of range: 4) so we can see that it failed on TABLE (4) because in fact the TABLE (3) section was removed. So when it found #4 it ran into the issue. Let's look at another example. If the number at the end of the array was 10 then you would either expect the TABLE (9) section to be missing or that there was some manual edit around that same area that is causing issues.
When you edit the httpd.conf file using the ApacheManager utility you will see comments like the ones listed below:
# TABLE: (4)
# TABLE: (5)
The error is because the application is trying to read an item in a vector, but there aren't that many items in the vector. So in other words, either the "TABLES" sections are either out of order numerically, or some of them are missing. This could be caused by a manual edit. In fact an easy way to reproduce this error is to simply go in and remove one of the TABLE sections and then try and access the ApacheManager.
When trying to track down where the issue lies in the httpd.conf you simply need to look at the number at the end of the array error. The number at the end of the array indicates the last thing it tried to execute when the failure occurred. In this case the error received was (org.apache.jasper.JasperException: Array index out of range: 4) so we can see that it failed on TABLE (4) because in fact the TABLE (3) section was removed. So when it found #4 it ran into the issue. Let's look at another example. If the number at the end of the array was 10 then you would either expect the TABLE (9) section to be missing or that there was some manual edit around that same area that is causing issues.
Resolution
You can either try and find the manual edit or missing TABLE
section (see situation section on how to narrow down the section)
or you can copy the httpd.conf file from a working server to see if
that will then allow you to access the ApacheManager.
Additional Information
Here is example of the full error.
HTTP Status 500 -
typeException report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Array index out of range: 4
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:207)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
root cause
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 4
at java.util.Vector.get(Vector.java:709)
at com.novell.application.configadmin.FileConfigReader.readConfig(FileConfigReader.java:209)
at com.novell.application.configadmin.ApacheManager.readConfig(ApacheManager.java:209)
at com.novell.application.configadmin.ApacheManager.readConfig(ApacheManager.java:194)
at org.apache.jsp.initialize_jsp._jspService(initialize_jsp.java:158)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)