Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0009328 | Openbravo ERP | A. Platform | public | 2009-06-04 09:42 | 2009-06-09 00:00 | |||||||
Reporter | networkb | |||||||||||
Assigned To | iperdomo | |||||||||||
Priority | immediate | Severity | major | Reproducibility | always | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | 2.50MP1 | |||||||||||
Target Version | Fixed in Version | 2.50MP2 | ||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | ||||||||||||
OBNetwork customer | OBPS | |||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0009328: String out of index: -1 error appears, when a jasper report contains a \n in one field | |||||||||||
Description | If a jasper contains an static field, for example the address, with a \n, the execution fails. For example, a field like: C/Mayor 5, Pamplona The problem is in AppsOpenbravo/src-core/src/org/openbravo/uiTransalation/TranslationHandler.java, in the method, createInputStream. In the loop, a \n is considered as the final of the line, and </text> target is not found. | |||||||||||
Steps To Reproduce | Create a jasper report. Include an static field like: Street, City (Note: it is really important to include a \n) Compile it. And execute it in the application EROOR LOG: org.openbravo.erpCommon.utility.reporting.ReportingException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at org.openbravo.erpCommon.utility.reporting.ReportManager.processReport(ReportManager.java:144) at org.openbravo.erpCommon.utility.reporting.ReportManager.saveTempReport(ReportManager.java:168) at org.openbravo.erpCommon.utility.reporting.printing.PrintController.post(PrintController.java:240) at org.openbravo.erpCommon.utility.reporting.printing.PrintInvoices.doPost(PrintInvoices.java:57) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:225) at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:79) at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46) at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:85) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1938) at org.openbravo.uiTranslation.TranslationHandler.createInputStream(TranslationHandler.java:176) at org.openbravo.uiTranslation.TranslationHandler.prepareFile(TranslationHandler.java:118) at org.openbravo.erpCommon.utility.Utility.getTranslatedJasperReport(Utility.java:2133) at org.openbravo.erpCommon.utility.reporting.ReportManager.processReport(ReportManager.java:126) ... 30 more | |||||||||||
Proposed Solution | ||||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=1384&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=1385&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=1386&type=bug | |||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2009-06-04 09:42 | networkb | New Issue | ||||||||||
2009-06-04 09:42 | networkb | Assigned To | => rafaroda | |||||||||
2009-06-04 09:42 | networkb | OBNetwork customer | => Yes | |||||||||
2009-06-04 11:20 | rafaroda | Relationship added | related to 0006706 | |||||||||
2009-06-04 11:34 | rafaroda | Note Added: 0016943 | ||||||||||
2009-06-04 11:34 | rafaroda | Assigned To | rafaroda => iperdomo | |||||||||
2009-06-04 11:34 | rafaroda | Status | new => scheduled | |||||||||
2009-06-04 11:34 | rafaroda | Proposed Solution updated | ||||||||||
2009-06-04 11:34 | rafaroda | File Added: PrintingInvoice.png | ||||||||||
2009-06-04 11:34 | rafaroda | File Added: RptC_Invoice-240.jrxml.pdf | ||||||||||
2009-06-04 11:34 | rafaroda | File Added: change-made-RptCInvoice.diff | ||||||||||
2009-06-05 09:21 | hgbot | Checkin | ||||||||||
2009-06-05 09:21 | hgbot | Note Added: 0016994 | ||||||||||
2009-06-05 09:21 | hgbot | Status | scheduled => resolved | |||||||||
2009-06-05 09:21 | hgbot | Resolution | open => fixed | |||||||||
2009-06-05 09:21 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/5251395c3c1399c35c90ad6d5b6f28e712e89611 [^] | |||||||||
2009-06-08 13:40 | psarobe | Status | resolved => closed | |||||||||
2009-06-08 13:40 | psarobe | Fixed in Version | => 2.50MP2 | |||||||||
2009-06-09 00:00 | anonymous | sf_bug_id | 0 => 2803195 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|