Forum

This content is now out of date.

Visit Our Community

Semi-colon in column name produces StringIndexOutOfBoundsException

Hi there

I am trying to add a field containing a semi-colon in its name to a report, but YellowFin throws a java.lang.StringOutOfBoundsException. Steps to reproduce (for a postgres DB data source):

1. Create a new YellowFin view, select Freehand SQL and use the following SQL:
select 1.1::REAL as "Capacity kl,kl/d _1"
,1.1::REAL as "Capacity kl;kl/d _2"

Forum image


2. Add the field with the comma. Everything is fine.

Forum image


3. Add the field with the semi-colon. The following is the result:

Forum image


The full exception stack is:
[code]
Error: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
At:
java.lang.String.substring(String.java:1954)
com.hof.mi.web.action.MIViewFieldsAction.execute(MIViewFieldsAction.java:547)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:745)
[/code]

Thanks for trying Yellowfin

Please complete the form below to request your copy of Yellowfin today.