You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2012/02/20 19:38:29 UTC

DO NOT REPLY [Bug 52716] New: Hyperlink parser is overly strict causing document open to fail for doc which works in other tools

https://issues.apache.org/bugzilla/show_bug.cgi?id=52716

             Bug #: 52716
           Summary: Hyperlink parser is overly strict causing document
                    open to fail for doc which works in other tools
           Product: POI
           Version: 3.7
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: tfmorris@gmail.com
    Classification: Unclassified


Created attachment 28357
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28357
Failing document

The attached document fails to open in POI 3.7.  From a cursory look in the
debugger where the IllegalStateException is being thrown, it looks to me like
this can be safely ignored since it's an unused reference.  (As an aside, it
would be much more polite to your callers to use a checked exception so they'd
know it was coming and be able to handle it.)

The stack trace is:

java.lang.IllegalStateException: A sheet hyperlink must either have a location,
or a relationship. Found:
<xml-fragment ref="A1" tooltip="Sort on ID" display="ID"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"/>
    at
org.apache.poi.xssf.usermodel.XSSFHyperlink.<init>(XSSFHyperlink.java:72)
    at
org.apache.poi.xssf.usermodel.XSSFSheet.initHyperlinks(XSSFSheet.java:205)
    at org.apache.poi.xssf.usermodel.XSSFSheet.read(XSSFSheet.java:159)
    at
org.apache.poi.xssf.usermodel.XSSFSheet.onDocumentRead(XSSFSheet.java:134)
    at
org.apache.poi.xssf.usermodel.XSSFWorkbook.onDocumentRead(XSSFWorkbook.java:235)
    at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:190)
    at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:189)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 52716] Hyperlink parser is overly strict causing document open to fail for doc which works in other tools

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52716

--- Comment #3 from Tom Morris <tf...@gmail.com> 2012-02-21 19:45:09 UTC ---
The user who provided the file reports that it was created in the following
manner: 

"The file was created by dumping an mSQL database (by Hughes) to an HTML page
using a simple table. The HTML table was dragged and dropped to Excel 2010."

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 52716] Hyperlink parser is overly strict causing document open to fail for doc which works in other tools

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52716

Yegor Kozlov <ye...@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Yegor Kozlov <ye...@dinom.ru> 2012-02-22 14:15:25 UTC ---
Should be fixed in r1292295, junit added.

>  (As an aside, it
> would be much more polite to your callers to use a checked exception so they'd
> know it was coming and be able to handle it.)
> 

The only checked exception that can be thrown when constructing XSSFWorkbook is
IOException but it is not the case. So we stay with IllegalStateException.

Yegor

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 52716] Hyperlink parser is overly strict causing document open to fail for doc which works in other tools

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52716

--- Comment #2 from Tom Morris <tf...@gmail.com> 2012-02-21 04:39:55 UTC ---
The behavior is the same with 3.8b5.  It doesn't look like the code has changed
at all in this area.  Which bug fix did you think was in beta 5 that would
improve this?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 52716] Hyperlink parser is overly strict causing document open to fail for doc which works in other tools

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52716

Tom Morris <tf...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 52716] Hyperlink parser is overly strict causing document open to fail for doc which works in other tools

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52716

Nick Burch <ni...@alfresco.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Nick Burch <ni...@alfresco.com> 2012-02-20 18:41:53 UTC ---
Have you tried with POI 3.8 beta 5?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 52716] Hyperlink parser is overly strict causing document open to fail for doc which works in other tools

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52716

Vasili <vg...@rogers.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
           Hardware|All                         |PC
            Version|3.7-FINAL                   |3.11-FINAL
         Resolution|FIXED                       |---
                 OS|All                         |Windows 7
           Severity|normal                      |blocker

--- Comment #7 from Vasili <vg...@rogers.com> ---
I'm reopening the bug (having the same with 3.11):

java.lang.Class - java.lang.IllegalStateException: A sheet hyperlink must
either have a location, or a relationship. Found:
<xml-fragment ref="B3" display="Something"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"/>
    at
org.apache.poi.xssf.usermodel.XSSFHyperlink.<init>(XSSFHyperlink.java:72)
    at
org.apache.poi.xssf.usermodel.XSSFSheet.initHyperlinks(XSSFSheet.java:205)
    at org.apache.poi.xssf.usermodel.XSSFSheet.read(XSSFSheet.java:159)
    at
org.apache.poi.xssf.usermodel.XSSFSheet.onDocumentRead(XSSFSheet.java:134)
    at
org.apache.poi.xssf.usermodel.XSSFWorkbook.onDocumentRead(XSSFWorkbook.java:235)
    at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:190)
    at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:182)
    at
org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:63)
    at org.is.jxlpoi.JXLPOIWorkbook.getWorkbook(JXLPOIWorkbook.java:80)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 52716] Hyperlink parser is overly strict causing document open to fail for doc which works in other tools

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52716

--- Comment #6 from Yegor Kozlov <ye...@dinom.ru> 2012-03-08 05:12:38 UTC ---
> 
> Is there a projected date when 3.8 will be released?  I looked at the web site
> and checked the dev list mail archive and wasn't able to figure out what the
> schedule is.
> 

I was planning to roll 3.8-beta6 in March and then release 3.8-final sometime
in mid or late April, but there is a good chance we will skip beta6 and release
3.8-final within a month. 

Stay on poi-dev, the release date will be discussed.


Yegor

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 52716] Hyperlink parser is overly strict causing document open to fail for doc which works in other tools

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52716

--- Comment #5 from Tom Morris <tf...@gmail.com> 2012-03-07 23:35:03 UTC ---
Thanks for the quick fix.  I verified the fix in SVN and it works great.

Is there a projected date when 3.8 will be released?  I looked at the web site
and checked the dev list mail archive and wasn't able to figure out what the
schedule is.

Thanks again!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 52716] Hyperlink parser is overly strict causing document open to fail for doc which works in other tools

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52716

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |NEEDINFO
                 OS|                            |All

--- Comment #8 from Dominik Stadler <do...@gmx.at> ---
Please provide a sample document (unless it can be reproduced with the one
attached here as well).

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org