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 2016/11/29 15:14:22 UTC

[Bug 60430] New: XSSFName.getSheetName() does not work with noncontiguous named ranges

https://bz.apache.org/bugzilla/show_bug.cgi?id=60430

            Bug ID: 60430
           Summary: XSSFName.getSheetName() does not work with
                    noncontiguous named ranges
           Product: POI
           Version: 3.15-FINAL
          Hardware: Macintosh
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: sean.smitz@gmail.com
  Target Milestone: ---

Created attachment 34488
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34488&action=edit
The 'Safety_getpic1' named range will trigger the IllegalArgumentException

This is apparently related to bug 44949 which reported it in HSSFName. Mine
appears in XSSFName. stack trace and trigger file follows:

1-29 09:55:09,561 [utionServiceListener] [execution] ERROR  -
[OpName=executeService] [OpId=75eb4e56-720f-46c3-908d-b2acb2ad2f6f]
[OpUser=http://openanzo.org/system/internal/sysadmin] [UserDesc=Anzo CLI]
o.o.e.SemanticServiceExecutionService- Error executing operaton
http://www.lilly.com/service/namedrange#processRequests
org.openanzo.exceptions.AnzoException: ErrorCode[5892] Error executing
service/operation:
http://www.lilly.com/service/namedrange/http://www.lilly.com/service/namedrange#processRequests
service-specific-error:References passed to the AreaReference must be
contiguous, use generateContiguous(ref) if you have non-contiguous references
Root Cause: java.lang.IllegalArgumentException References passed to the
AreaReference must be contiguous, use generateContiguous(ref) if you have
non-contiguous references
        at
org.openanzo.execution.v2.SemanticServiceExecutionService.executeServiceInternal(SemanticServiceExecutionService.java:727)
        at
org.openanzo.execution.v2.SemanticServiceExecutionService.executeService(SemanticServiceExecutionService.java:538)
        at
org.openanzo.execution.SemanticServiceExecutionService.executeServiceInternal(SemanticServiceExecutionService.java:590)
        at
org.openanzo.execution.SemanticServiceExecutionService.executeService(SemanticServiceExecutionService.java:510)
        at
org.openanzo.execution.SemanticServiceExecutionService.executeService(SemanticServiceExecutionService.java:333)
        at
org.openanzo.combus.listeners.CombusExecutionServiceListener.handleMessage(CombusExecutionServiceListener.java:123)
        at
org.openanzo.combus.endpoint.BaseServiceListener.processMessage(BaseServiceListener.java:660)
        at
org.openanzo.combus.endpoint.BaseServiceListener$ProcessThread.run(BaseServiceListener.java:368)
Caused by: java.lang.IllegalArgumentException: References passed to the
AreaReference must be contiguous, use generateContiguous(ref) if you have
non-contiguous references
        at org.apache.poi.ss.util.AreaReference.<init>(AreaReference.java:45)
        at
org.apache.poi.xssf.usermodel.XSSFName.getSheetName(XSSFName.java:293)
        at
com.lilly.sdp.named_ranges.poi.NamedRangeWorksheet.processNamedRanges(NamedRangeWorksheet.java:92)
        at
com.lilly.sdp.named_ranges.poi.NamedRangeWorksheet.<init>(NamedRangeWorksheet.java:31)
        at
com.lilly.sdp.named_ranges.poi.NamedRangeWorkbook.<init>(NamedRangeWorkbook.java:47)
        at
com.lilly.sdp.named_ranges.NamedRangeServiceImpl.processFile(NamedRangeServiceImpl.java:224)
        at
com.lilly.sdp.named_ranges.NamedRangeServiceImpl.processRequest(NamedRangeServiceImpl.java:204)
        at
com.lilly.sdp.named_ranges.NamedRangeServiceImpl.processRequests(NamedRangeServiceImpl.java:172)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at
org.openanzo.execution.v2.SemanticServiceExecutionService.executeServiceInternal(SemanticServiceExecutionService.java:694)
        ... 7 common frames omitted

-- 
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 60430] XSSFName.getSheetName() does not work with noncontiguous named ranges

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

Sean Smitz <se...@gmail.com> changed:

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

-- 
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 60430] XSSFName.getSheetName() does not work with noncontiguous named ranges

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

--- Comment #3 from Sean Smitz <se...@gmail.com> ---
final FormulaEvaluator evaluator =
wb.getCreationHelper().createFormulaEvaluator();
for (int i = 0; i < wb.getNumberOfNames(); i++) {
    Name name = wb.getNameAt(i);
    try {
        if (!ignoreNamedRanges.contains(name.getNameName()) &&
!name.getRefersToFormula().equals("#REF!") &&
name.getSheetName().equals(getTitle())) {
                    namedRanges.add(new NamedRange(name, sheet, evaluator));
        }
    } catch (IllegalArgumentException e) {
                // TODO: Add logging.
    }
}


name.getSheetName() in the if-statement throws the exception.

-- 
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 60430] XSSFName.getSheetName() does not work with noncontiguous named ranges

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

Javen O'Neal <on...@apache.org> changed:

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

--- Comment #1 from Javen O'Neal <on...@apache.org> ---
Can you share a code sample that generates this error so that we can reproduce
this?

-- 
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 60430] XSSFName.getSheetName() does not work with noncontiguous named ranges

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

Sean Smitz <se...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
                 CC|                            |sean.smitz@gmail.com

-- 
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 60430] XSSFName.getSheetName() does not work with noncontiguous named ranges

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

--- Comment #2 from Sean Smitz <se...@gmail.com> ---
        final FormulaEvaluator evaluator =
wb.getCreationHelper().createFormulaEvaluator();
        for (int i = 0; i < wb.getNumberOfNames(); i++) {
            Name name = wb.getNameAt(i);
            try {
                if (!ignoreNamedRanges.contains(name.getNameName()) &&
!name.getRefersToFormula().equals("#REF!") &&
name.getSheetName().equals(getTitle())) {
                    namedRanges.add(new NamedRange(name, sheet, evaluator));
                }
            } catch (IllegalArgumentException e) {
                // TODO: Add logging.
            }
        }

-- 
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