Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0009328 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | always | 2009-06-04 09:42 | 2009-06-09 00:00 | |||
Reporter | networkb | View Status | public | |||||
Assigned To | iperdomo | |||||||
Priority | immediate | Resolution | fixed | Fixed in Version | 2.50MP2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 5251395c3c13 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | PostgreSQL | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | 2.50MP1 | SCM revision | ||||||
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 | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() ![]() ![]() | |||||||
![]() |
||||||||
|
![]() |
|
(0016943) rafaroda (viewer) 2009-06-04 11:34 |
This issue has been able to reproduce in pi (see attached PrintInvoice.png) but not in 2.40 (see attached RptC_Invoice-240.jrxml.pdf). The change made to both erpReports/RptC_Invoice.jrxml files has been the one attached in change-made-RptCInvoice.diff. |
(0016994) hgbot (developer) 2009-06-05 09:21 |
Repository: erp/devel/pi Changeset: 5251395c3c1399c35c90ad6d5b6f28e712e89611 Author: Iván Perdomo <ivan.perdomo <at> openbravo.com> Date: Fri Jun 05 09:20:10 2009 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/5251395c3c1399c35c90ad6d5b6f28e712e89611 [^] Fixes issue 9328: Prevent indexOutOfBounds when parsing a <text> tag --- M src-core/src/org/openbravo/uiTranslation/TranslationHandler.java --- |
![]() |
|||
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 |
Copyright © 2000 - 2009 MantisBT Group |