This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 724443 - (BRMS-388) Decision Table: String Index Out Of Range
Decision Table: String Index Out Of Range
Status: VERIFIED
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion) (Show other bugs)
5.1.0.ER2
Unspecified Unspecified
high Severity medium
: ---
: BRMS 5.3.0.GA
Assigned To: Mark Proctor
Lukáš Petrovický
http://jira.jboss.org/jira/browse/BRM...
: Regression
: 741726 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-15 06:25 EDT by Lukáš Petrovický
Modified: 2014-05-26 21:29 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Importing a Microsoft Excel spreadsheet into in a Knowledge Base could cause the StringIndexOutOfBoundsException exception to be thrown if the spreadsheet was created in Excel 95 or earlier. This is because of an issue in the JXL library which is used to handle these files. This can be worked around by opening and saving the spreadsheet in Microsoft Excel 97 or greater or with OpenOffice.org Calc.
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
The XLS file that causes the issue (121.50 KB, application/vnd.ms-excel)
2011-08-30 06:49 EDT, Lukáš Petrovický
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker BRMS-388 Major Closed Decision Table: String Index Out Of Range 2013-05-09 21:52:25 EDT

  None (edit)
Description Lukáš Petrovický 2010-10-15 06:25:20 EDT
Affects: Release Notes
Affects Testing: Regression
Workaround: Workaround Exists
securitylevel_name: Public

See SOA-2426.
Comment 1 Lukáš Petrovický 2010-10-15 06:25:48 EDT
Link: Added: This issue is related to SOA-2426
Comment 2 Jervis Liu 2010-10-24 03:06:19 EDT
There is sth wrong with DiscountDT.xls. Lucas, could you please to help to confirm the version of Excel you used to create this file? I used Excel 2003 to open DiscountDT.xls, did no changes but just saved it using different name. Upload this renamed xls file to Guvnor, everything works. 

I suspect there is sth wrong with this DiscountDT.xls (resave it may correct some internal errors in this file?) which makes Guvnor failed to parse this file. 

Comment 3 Jervis Liu 2010-10-24 03:10:25 EDT
Lucas, could you please also let me know if this error is repeatable. i.e., if you use a certain version Excel to create some xls files, all of them are unreadable by Guvnor, or just the DiscountDT.xls file itself is accidentally corrupted. If its the latter case, we can close this jira safely. 
Comment 4 Lukáš Petrovický 2010-10-25 02:59:45 EDT
I have no idea which version of Excel was this created with - it's in our test suite for quite some time (years, probably) and the person who created it had already left the company.
When opening the file with the latest OpenOffice and re-saving it as XLS, the problems goes away.
However, this is clearly a regression - this exact file had worked with Drools 5.0 - and I think it should still be investigated.
Comment 5 Jervis Liu 2010-10-26 10:23:32 EDT
Looks like this is a bug in jxl 2.6.10. Drools 5.0 is using jxl 2.4.2. A similar problem has been reported in jxl mailing list against 2.6.10. 
Comment 6 Lukáš Petrovický 2010-10-26 13:40:22 EDT
Is there a fix for it that we could apply? If not, this needs to be put in release notes.
Comment 7 Jervis Liu 2010-10-26 23:55:48 EDT
There is no fix for this at the moment. A work around exists: Opening the file with the latest OpenOffice or Excel and re-saving it as XLS, the problems goes away. This needs to be documentated in release note. 
Comment 8 Lukáš Petrovický 2010-10-27 02:34:02 EDT
Darrin, this now belongs in the documentation department. Do you have enough information to go on or do you need some more?
Comment 9 Lukáš Petrovický 2010-10-27 02:34:31 EDT
Workaround: Added: [Workaround Exists]
Affects: Added: [Release Notes]
Comment 10 Darrin Mison 2010-11-15 02:18:18 EST
Hi Lukas,

Few points to clarify:

1 - .xls files created in older versions of MS Office or OpenOffice may not work, they need to be resaved in a more recent version ?

2 - This is probably a bug in the JXL library ?  Do you have a URL for more info about the JXL bug ?

3 - what are the specific versions of MS Office and Open Office that resaving the files in fixed the issue ? 
Comment 11 Darrin Mison 2010-11-15 02:25:55 EST
Also the "java.lang.StringIndexOutOfBoundsException: String index out of range" error that is encountered:

Exactly when does it occur ? Is the error displayed to the user in anyway ? Or just logged to the console ? 

How will the user realise that they are experiencing this issue ?
Comment 12 Lukáš Petrovický 2010-11-15 02:58:57 EST
Darrin,

1) I don't know the *exact* cause of this problem, just that re-saving the file fixes it. Jervis was investigating this, so this question is perhaps for him.
2) Jervis?
3) We never tested with MS Office (we don't have the licenses). However, we tested with OpenOffice 2 and 3 and saving the document in any of them fixed the issue.

To your other questions:
The problem will manifest itself in the console when the decision table is being used. (= At the moment of inserting it in the Knowledge base.) The exception is not caught and thus the particular code execution is stopped.
Also, when JBDS is used, the problem manifests itself as seen on a screenshot in SOA-2426.
Comment 13 Jervis Liu 2010-12-06 21:07:25 EST
Hi Darrin, 

1 - .xls files created in older versions of MS Office or OpenOffice may not work, they need to be resaved in a more recent version ?

We dont know the exact version of Excel that this problematic xls file was created with (but its definitely an old version), but resaving this file with a latest version of Excel or Open office solves the problem. 

2 - This is probably a bug in the JXL library ? Do you have a URL for more info about the JXL bug ?

This is a bug in JXL. See this link: http://tech.groups.yahoo.com/group/JExcelApi/message/12480. Looks like the bug has been fixed, we just need to wait for next JXL release. 

Comment 14 Darrin Mison 2010-12-07 00:08:25 EST
ah ha, based on the bug it would seem to be files of BIFF8, (Excel 97 - Excel 2007) that work ok.  

Thanks for the link :-)
Comment 15 Darrin Mison 2010-12-14 00:53:12 EST
Documented as a known issue in BRMS 5.1.0 - BRMS-417
Comment 16 Darrin Mison 2010-12-14 00:53:12 EST
Release Notes Docs Status: Added: Documented as Known Issue
Writer: Added: Darrin
Release Notes Text: Added: Importing an Microsoft Excel spreadsheet into in a Knowledge Base will cause an exception to be thrown ( StringIndexOutOfBoundsException ) if the spreadsheet was created in Excel 95 or earlier.  This is because of an issue in the JXL library which is used to handle these files.  This can be worked around by opening and saving the spreadsheet in Microsoft Excel 97 or greater or with OpenOffice.org Calc.  

This will be fixed in a future release.  

Comment 17 Len DiMaggio 2011-05-25 11:47:13 EDT
We need to define the specific supported versions of Excel - that we will test with - will we rely on the "latest" version or the latest + one version back.

Comment 18 Anne-Louise Tangring 2011-05-31 15:12:07 EDT
For this, we only need to document what version we tested with. 
Comment 19 Jervis Liu 2011-08-25 03:11:25 EDT
Based on various inputs from the comments above, we have tested with following versions, all of them worked:

1. Microsoft Excel 97,  Excel 2003 (I would imagine any version that is Microsoft Excel 97 or higher should work, though we have not tested all these versions). 

2.  OpenOffice 2 and 3 

Shall I pass this issue to QA or to Document team?
Comment 20 Lukáš Petrovický 2011-08-25 03:17:16 EDT
Taking this to QA.
Comment 21 Lukáš Petrovický 2011-08-30 06:46:16 EDT
This bug is still not fixed for the originally attached file. I will re-attach it to this Bugzilla in a while.
Comment 22 Lukáš Petrovický 2011-08-30 06:49:06 EDT
Created attachment 520588 [details]
The XLS file that causes the issue

I can't be sure which version of Excel this file comes from. (Its author did leave a long time ago.) But it should be from somewhere around Excel 2000.
Comment 23 Jervis Liu 2011-08-31 10:39:26 EDT
The problematic file must come from an Excel version older than Excel 97. As the problem can not be reproduced on Excel97 or higher.
Comment 24 lcarlon 2011-09-15 00:22:17 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Importing an Microsoft Excel spreadsheet into in a Knowledge Base will cause an exception to be thrown (StringIndexOutOfBoundsException ) if the spreadsheet was created in Excel 95 or earlier. This is because of an issue in the JXL library which is used to handle these files. This can be worked around by opening and saving the spreadsheet in Microsoft Excel 97 or greater or with OpenOffice.org Calc. This will be resolved in a future release.
Comment 27 lcarlon 2011-09-28 19:09:37 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-Importing an Microsoft Excel spreadsheet into in a Knowledge Base will cause an exception to be thrown (StringIndexOutOfBoundsException ) if the spreadsheet was created in Excel 95 or earlier. This is because of an issue in the JXL library which is used to handle these files. This can be worked around by opening and saving the spreadsheet in Microsoft Excel 97 or greater or with OpenOffice.org Calc. This will be resolved in a future release.+Importing an Microsoft Excel spreadsheet into in a Knowledge Base will cause an exception to be thrown (StringIndexOutOfBoundsException ) if the spreadsheet was created in Excel 95 or earlier. This is because of an issue in the JXL library which is used to handle these files. This can be worked around by opening and saving the spreadsheet in Microsoft Excel 97 or greater or with OpenOffice.org Calc.
Comment 28 lcarlon 2011-09-28 19:10:43 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-Importing an Microsoft Excel spreadsheet into in a Knowledge Base will cause an exception to be thrown (StringIndexOutOfBoundsException ) if the spreadsheet was created in Excel 95 or earlier. This is because of an issue in the JXL library which is used to handle these files. This can be worked around by opening and saving the spreadsheet in Microsoft Excel 97 or greater or with OpenOffice.org Calc.+Importing a Microsoft Excel spreadsheet into in a Knowledge Base will cause the StringIndexOutOfBoundsException exception to be thrown if the spreadsheet was created in Excel 95 or earlier. This is because of an issue in the JXL library which is used to handle these files. This can be worked around by opening and saving the spreadsheet in Microsoft Excel 97 or greater or with OpenOffice.org Calc.
Comment 29 Lukáš Petrovický 2011-09-29 00:24:16 EDT
*** Bug 741726 has been marked as a duplicate of this bug. ***
Comment 30 Lukáš Petrovický 2011-12-21 09:34:42 EST
Marking as VERIFIED as this bug only really appears in one XLS file, created with some ancient version of MS Office.
Comment 32 lcarlon 2012-04-01 21:06:20 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-Importing a Microsoft Excel spreadsheet into in a Knowledge Base will cause the StringIndexOutOfBoundsException exception to be thrown if the spreadsheet was created in Excel 95 or earlier. This is because of an issue in the JXL library which is used to handle these files. This can be worked around by opening and saving the spreadsheet in Microsoft Excel 97 or greater or with OpenOffice.org Calc.+Importing a Microsoft Excel spreadsheet into in a Knowledge Base could cause the StringIndexOutOfBoundsException exception to be thrown if the spreadsheet was created in Excel 95 or earlier. This is because of an issue in the JXL library which is used to handle these files. This can be worked around by opening and saving the spreadsheet in Microsoft Excel 97 or greater or with OpenOffice.org Calc.

Note You need to log in before you can comment on or make changes to this bug.