Bug 724443 (BRMS-388) - Decision Table: String Index Out Of Range
Summary: Decision Table: String Index Out Of Range
Keywords:
Status: VERIFIED
Alias: BRMS-388
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion)
Version: 5.1.0.ER2
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: BRMS 5.3.0.GA
Assignee: Mark Proctor
QA Contact:
URL: http://jira.jboss.org/jira/browse/BRM...
Whiteboard:
: 741726 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-15 10:25 UTC by Lukáš Petrovický
Modified: 2023-05-15 19:53 UTC (History)
3 users (show)

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.
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 780061 0 high CLOSED Decision Table: String Index Out Of Range 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker BRMS-388 0 Major Closed Decision Table: String Index Out Of Range 2013-05-10 01:52:25 UTC

Internal Links: 780061

Description Lukáš Petrovický 2010-10-15 10:25:20 UTC
Affects: Release Notes
Affects Testing: Regression
Workaround: Workaround Exists
securitylevel_name: Public

See SOA-2426.

Comment 1 Lukáš Petrovický 2010-10-15 10:25:48 UTC
Link: Added: This issue is related to SOA-2426


Comment 2 Jervis Liu 2010-10-24 07:06:19 UTC
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 07:10:25 UTC
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 06:59:45 UTC
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 14:23:32 UTC
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 17:40:22 UTC
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-27 03:55:48 UTC
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 06:34:02 UTC
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 06:34:31 UTC
Workaround: Added: [Workaround Exists]
Affects: Added: [Release Notes]


Comment 10 Dana Mison 2010-11-15 07:18:18 UTC
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 Dana Mison 2010-11-15 07:25:55 UTC
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 07:58:57 UTC
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-07 02:07:25 UTC
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 Dana Mison 2010-12-07 05:08:25 UTC
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 Dana Mison 2010-12-14 05:53:12 UTC
Documented as a known issue in BRMS 5.1.0 - BRMS-417

Comment 16 Dana Mison 2010-12-14 05:53:12 UTC
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 15:47:13 UTC
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 19:12:07 UTC
For this, we only need to document what version we tested with. 

Comment 19 Jervis Liu 2011-08-25 07:11:25 UTC
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 07:17:16 UTC
Taking this to QA.

Comment 21 Lukáš Petrovický 2011-08-30 10:46:16 UTC
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 10:49:06 UTC
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 14:39:26 UTC
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 04:22:17 UTC
    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 23:09:37 UTC
    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 23:10:43 UTC
    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 04:24:16 UTC
*** Bug 741726 has been marked as a duplicate of this bug. ***

Comment 30 Lukáš Petrovický 2011-12-21 14:34:42 UTC
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-02 01:06:20 UTC
    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.