Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to fix this error: The server encountered an internal error ()

Posted on 2006-06-30
4
Medium Priority
?
325 Views
Last Modified: 2010-04-01
I get this when I try to go to this servlet

http://localhost:8080/chapters/pub?action=show_policy

Any idea what this error is about. Any help will be greatly appreciated

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at java.lang.String.substring(String.java:1444)
      at java.lang.String.substring(String.java:1411)
      at com.ccim.servlet.PublicServlet.processRequest(PublicServlet.java:53)
      at com.ccim.servlet.PublicServlet.doGet(PublicServlet.java:29)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
      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.coyote.http11.Http11Processor.process(Http11Processor.java:799)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
      at java.lang.Thread.run(Thread.java:534)
0
Comment
Question by:huzefaq
4 Comments
 
LVL 28

Expert Comment

by:rrz
ID: 17021682
>at com.ccim.servlet.PublicServlet.doGet(PublicServlet.java:29)  
Show us  line 29 of  PublicServlet.  Are you looking for a character in a String that isn't there ? Or are you in a loop ? If you are in a loop, then show us the whole loop.
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 17029429
>>com.ccim.servlet.PublicServlet.doGet(PublicServlet.java:29)  
At this place he is calling the method processRequest which is getting the error...

>>com.ccim.servlet.PublicServlet.processRequest(PublicServlet.java:53) i.e. we need to look at the line 53 of processRequest.. most probably you are trying to do a substring of a string which is not there or is not long enough...
Show us the code & we will be in a better situation to hep


0
 
LVL 11

Expert Comment

by:Isisagate
ID: 17036630
in at com.ccim.servlet.PublicServlet.processRequest(PublicServlet.java:53)

there is a substring functin being called on a string that is empty or your substring is starting looks something like substring(-1,1) or something and that's making the page throw up.  Check to make sure the string is not empty before doing your substring or has at least the expected amount of characters.
0
 
LVL 5

Accepted Solution

by:
muktajindal earned 2000 total points
ID: 17072056
Most probably you are trying to do some string manipulation by passing some boundary values out of its range.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Your business may be under attack from a silent enemy that is hard to detect. It works stealthily in the shadows to access and exploit your critical business information, sensitive confidential data and intellectual property, for commercial gain. T…
In this article, the configuration steps in Zabbix to monitor devices via SNMP will be discussed with some real examples on Cisco Router/Switch, Catalyst Switch, NAS Synology device.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question