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 2020/04/14 08:16:32 UTC

[Bug 64348] New: createWaterMark IndexOutOfBoundException

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

            Bug ID: 64348
           Summary: createWaterMark IndexOutOfBoundException
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XWPF
          Assignee: dev@poi.apache.org
          Reporter: xiaoting233zhang@126.com
  Target Milestone: ---

Caused by: java.lang.IndexOutOfBoundsException
    ┣   at
org.openxmlformats.schemas.wordprocessingml.x2006.main.impl.CTBodyImpl.getPArray(Unknown
Source:26)
    ┣   at
org.apache.poi.xwpf.model.XWPFHeaderFooterPolicy.getWatermarkParagraph(XWPFHeaderFooterPolicy.java:432)
    ┣   at
org.apache.poi.xwpf.model.XWPFHeaderFooterPolicy.createWatermark(XWPFHeaderFooterPolicy.java:418)

This happens when the document has nothing.

-- 
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 64348] createWaterMark IndexOutOfBoundException

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

Sayi <ad...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Sayi <ad...@gmail.com> ---
(In reply to xiaoting233zhang from comment #0)
> Caused by: java.lang.IndexOutOfBoundsException
>     ┣ 	at
> org.openxmlformats.schemas.wordprocessingml.x2006.main.impl.CTBodyImpl.
> getPArray(Unknown Source:26)
>     ┣ 	at
> org.apache.poi.xwpf.model.XWPFHeaderFooterPolicy.
> getWatermarkParagraph(XWPFHeaderFooterPolicy.java:432)
>     ┣ 	at
> org.apache.poi.xwpf.model.XWPFHeaderFooterPolicy.
> createWatermark(XWPFHeaderFooterPolicy.java:418)
> 
> This happens when the document has nothing.

Hi, this problem caused by missing paragraph.

Currently you can first create a paragraph to avoid this problem.

-- 
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 64348] createWaterMark IndexOutOfBoundException

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

HanChong <ic...@163.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ichonham@163.com

--- Comment #3 from HanChong <ic...@163.com> ---
Created attachment 37473
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37473&action=edit
This is my implementation of watermarking, including watermarked service and
watermarked ServiceImpl

-- 
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 64348] createWaterMark IndexOutOfBoundException

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

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

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

--- Comment #2 from Dominik Stadler <do...@gmx.at> ---
Can you provide a small sample document and sample code which reproduces this
so we can add a test-case for it.

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