[Building Sakai] Exception - String index out of range

Carlos Delgado CDelgado at bmjgroup.com
Fri Jul 17 08:09:48 PDT 2009


Thank you Matthew, it did resolve the issue.

Just note that if, after saving the changes, you edit the question, you
will have to do the same substitution before saving the changes as the
symbols will appear converted.

Best Regards,

Carlos Delgado




                                                                           
             Matthew Jones                                                 
             <jonespm at umich.ed                                             
             u>                                                         To 
             Sent by:                  Carlos Delgado                      
             jonespm at gmail.com         <CDelgado at bmjgroup.com>             
                                                                        cc 
                                       sakai-dev at collab.sakaiproject.org   
             17/07/2009 15:29                                      Subject 
                                       Re: [Building Sakai] Exception -    
                                       String index out of range           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




This is related to a bug mentioned a few days ago
(http://jira.sakaiproject.org/browse/KNL-66). It occurs when you have
the "<" character without a matching ">" character in your text.
(Which you may have if you are writing math equations or programming
examples) There is a problem parsing this type of input in some text
fields at the moment.

As a temporary workaround, if you need this symbol it looks like can
use the html &lt; and it will appear correctly. :/

Example:

IF A &lt; B THEN C = D

-Matthew

On Fri, Jul 17, 2009 at 10:08 AM, Carlos Delgado<CDelgado at bmjgroup.com>
wrote:
>
> Hi,
>
> I'm getting this exception sometimes, when I try to submit either the
text,
> an answer or a feedback of any kind in a question.
>
> The text is 574 characters long, and this didn't happened to me in other
> questions, even with longer texts.
>
> I'm using HEAD revision of Sakai 2.6.
>
> Thanks in advance!
>
> Carlos
>
>
> org.sakaiproject.portal.api.PortalHandlerException:
> org.sakaiproject.tool.api.ToolException: String index out of range: 574
>    at
>
org.sakaiproject.portal.charon.handlers.ToolHandler.doPost(ToolHandler.java:70)

>
> caused by: org.sakaiproject.tool.api.ToolException: String index out of
> range: 574
>    at
>
org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1216)

>
> caused by: javax.servlet.ServletException: String index out of range: 574
>    at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)

>
> caused by: java.lang.StringIndexOutOfBoundsException: String index out of
> range: 574
>    at java.lang.String.substring(String.java:1765)
>    at
>
org.sakaiproject.util.FormattedText.trimFormattedText(FormattedText.java:958)

>
>    at
>
org.sakaiproject.util.FormattedText.processFormattedText(FormattedText.java:259)

>
>    at
>
org.sakaiproject.util.FormattedText.processFormattedText(FormattedText.java:201)

>
>    at
>
org.sakaiproject.jsf.renderer.RichTextEditArea.decode(RichTextEditArea.java:560)

>
>    at
> javax.faces.component.UIComponentBase.decode(UIComponentBase.java:665)
>    at javax.faces.component.UIInput.decode(UIInput.java:464)
>    at
>
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:885)

>
>    at javax.faces.component.UIInput.processDecodes(UIInput.java:380)
>    at
>
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:880)

>
>    at
>
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:880)

>
>    at javax.faces.component.UIForm.processDecodes(UIForm.java:144)
>    at
>
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:880)

>
>    at
javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:306)
>    at
>
com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:79)

>
>    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
>    at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
>    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
>    at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)

>
>    at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

>
>    at
org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:565)
>    at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)

>
>    at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

>
>    at
>
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)

>
>    at
>
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)

>
>    at
>
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)

>
>    at
>
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)

>
>    at
> org.sakaiproject.jsf.util.SamigoJsfTool.dispatch(SamigoJsfTool.java:285)
>    at org.sakaiproject.jsf.util.JsfTool.doPost(JsfTool.java:256)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>    at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)

>
>    at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

>
>    at
>
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)

>
>    at
>
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)

>
>    at
>
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:364)

>
>    at
>
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)

>
>    at
>
org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:475)

>
>    at
>
org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1216)

>
>    at
>
org.sakaiproject.portal.charon.handlers.ToolHandler.doTool(ToolHandler.java:188)

>
>    at
>
org.sakaiproject.portal.charon.handlers.ToolHandler.doGet(ToolHandler.java:93)

>
>    at
>
org.sakaiproject.portal.charon.handlers.ToolHandler.doPost(ToolHandler.java:70)

>
>    at
>
org.sakaiproject.portal.charon.SkinnableCharonPortal.doPost(SkinnableCharonPortal.java:1059)

>
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>    at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)

>
>    at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

>
>    at
org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:616)
>    at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)

>
>    at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

>
>    at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

>
>    at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)

>
>    at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

>
>    at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

>
>    at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)

>
>    at
>
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>    at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
>    at
>
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)

>
>    at
>
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)

>
>    at
>
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)

>
>    at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)

>
>    at java.lang.Thread.run(Thread.java:595)
>
>
> user: admin
>
> usage-session: b744e3e2-10c2-43d0-98c9-1e94e8f81c93
>
> time: 17-Jul-2009 15:02:47
>
> Best Regards,
>
> Carlos Delgado
> Team Leader, BMJ Technology
>
> BMJ Group
> BMA House
> Tavistock Square
> London  WC1H 9JR
>
> Tel: +44 (0)207 383 6865
> BMJ Group: http://group.bmj.com
>
>
> _______________________________________________________________________
> The BMJ Group is one of the world's most trusted providers of medical
information for doctors, researchers, health care workers and patients
www.bmjgroup.bmj.com.  This email and any attachments are confidential.  If
you have received this email in error, please delete it and kindly notify
us.  If the email contains personal views then the BMJ Group accepts no
responsibility for these statements.  The recipient should check this email
and attachments for viruses because the BMJ Group accepts no liability for
any damage caused by viruses.  Emails sent or received by the BMJ Group may
be monitored for size, traffic, distribution and content.  BMJ Publishing
Group Limited trading as BMJ Group.  A private limited company, registered
in England and Wales under registration number 03102371.  Registered
office: BMA House, Tavistock Square, London WC1H 9JR, UK.
> _______________________________________________________________________
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
"unsubscribe"
>

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________



_______________________________________________________________________
The BMJ Group is one of the world's most trusted providers of medical information for doctors, researchers, health care workers and patients www.bmjgroup.bmj.com.  This email and any attachments are confidential.  If you have received this email in error, please delete it and kindly notify us.  If the email contains personal views then the BMJ Group accepts no responsibility for these statements.  The recipient should check this email and attachments for viruses because the BMJ Group accepts no liability for any damage caused by viruses.  Emails sent or received by the BMJ Group may be monitored for size, traffic, distribution and content.  BMJ Publishing Group Limited trading as BMJ Group.  A private limited company, registered in England and Wales under registration number 03102371.  Registered office: BMA House, Tavistock Square, London WC1H 9JR, UK.
_______________________________________________________________________


More information about the sakai-dev mailing list