Build failed in Jenkins: POI-JDK8 #1355

2016-11-24 Thread Apache Jenkins Server
See 

Changes:

[centic] Remove unnecessary cast and reformat some code a bit

--
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on H13 (ubuntu) in workspace 

Updating http://svn.apache.org/repos/asf/poi/trunk at revision 
'2016-11-25T06:12:24.711 +'
AUtest-data/slideshow/bug60345_suba.ppt
AUtest-data/slideshow/bug60345_Jankovic_final_Retreat_2002.ppt
AUtest-data/slideshow/bug59273.potx
AUtest-data/slideshow/bug60345_paperfigures.ppt
U src/java/org/apache/poi/ss/usermodel/ConditionalFormatting.java
U src/java/org/apache/poi/ss/formula/functions/LogicalFunction.java
U src/java/org/apache/poi/ss/formula/atp/NetworkdaysFunction.java
U src/java/org/apache/poi/ss/formula/function/FunctionMetadata.java
U 
src/java/org/apache/poi/ss/formula/function/FunctionMetadataRegistry.java
U src/java/org/apache/poi/hssf/OldExcelFormatException.java
U src/java/org/apache/poi/hssf/record/FilePassRecord.java
U src/java/org/apache/poi/hssf/usermodel/HSSFConditionalFormatting.java
U src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java
U src/java/org/apache/poi/sl/draw/DrawTableShape.java
U src/java/org/apache/poi/poifs/crypt/Decryptor.java
U src/java/org/apache/poi/poifs/crypt/binaryrc4/BinaryRC4Encryptor.java
U src/java/org/apache/poi/poifs/crypt/binaryrc4/BinaryRC4Decryptor.java
U src/java/org/apache/poi/poifs/crypt/Encryptor.java
U src/java/org/apache/poi/poifs/crypt/xor/XORDecryptor.java
U src/java/org/apache/poi/poifs/crypt/xor/XOREncryptor.java
U src/java/org/apache/poi/poifs/crypt/xor/XOREncryptionVerifier.java
U src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIEncryptor.java
U src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIDecryptor.java
U 
src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIDocumentOutputStream.java
U src/java/org/apache/poi/poifs/crypt/ChunkedCipherInputStream.java
U src/java/org/apache/poi/poifs/crypt/ChunkedCipherOutputStream.java
U src/integrationtest/org/apache/poi/TestAllFiles.java
U src/integrationtest/build.xml
U src/scratchpad/src/org/apache/poi/hslf/blip/PICT.java
U src/scratchpad/src/org/apache/poi/hslf/blip/Metafile.java
U 
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFFreeformShape.java
U src/scratchpad/src/org/apache/poi/hwpf/dev/HWPFLister.java
U src/scratchpad/src/org/apache/poi/hwpf/model/ComplexFileTable.java
U src/scratchpad/src/org/apache/poi/hwpf/model/io/HWPFOutputStream.java
U src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java
U src/scratchpad/src/org/apache/poi/hwpf/model/FormattedDiskPage.java
U src/scratchpad/src/org/apache/poi/hwpf/model/PlexOfCps.java
U src/scratchpad/src/org/apache/poi/hwpf/model/TextPiece.java
U src/scratchpad/src/org/apache/poi/hdgf/pointers/PointerV5.java
A src/examples/src/org/apache/poi/crypt
A src/examples/src/org/apache/poi/crypt/examples
A src/examples/src/org/apache/poi/crypt/examples/EncryptionUtils.java
A 
src/examples/src/org/apache/poi/xssf/usermodel/examples/LoadPasswordProtectedXlsx.java
U 
src/examples/src/org/apache/poi/xssf/usermodel/examples/AligningCells.java
U 
src/examples/src/org/apache/poi/xssf/usermodel/examples/WorkingWithRichText.java
A 
src/examples/src/org/apache/poi/xssf/eventusermodel/examples/LoadPasswordProtectedXlsxStreaming.java
A 
src/examples/src/org/apache/poi/xssf/streaming/examples/SavePasswordProtectedXlsx.java
U src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java
U src/examples/src/org/apache/poi/ss/examples/ToCSV.java
U src/examples/src/org/apache/poi/ss/examples/AligningCells.java
A src/examples/src/org/apache/poi/examples
A src/examples/src/org/apache/poi/examples/util
A src/examples/src/org/apache/poi/examples/util/TempFileUtils.java
U src/ooxml/testcases/org/apache/poi/xslf/TestXSLFBugs.java
U src/ooxml/testcases/org/apache/poi/sl/TestTable.java
D 
src/ooxml/testcases/org/apache/poi/poifs/crypt/AesZipFileZipEntrySource.java
U src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSecureTempZip.java
U 
src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbookWithCustomZipEntrySource.java
U 
src/ooxml/testcases/org/apache/poi/xssf/streaming/TempFileRecordingSXSSFWorkbookWithCustomZipEntrySource.java
U 
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java
U src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
U 
src/ooxml/testcases/org/apache/poi/xssf/u

[Bug 60416] Reduce Hyperlink memory consumption in SXSSF

2016-11-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60416

Dmitry  changed:

   What|Removed |Added

 CC||dm...@mail.ru

--- Comment #3 from Dmitry  ---
The patch is just a minor drop into the sea… more fundamental solution is
needed. As complete solution also involves other objects like comments and
regions, perhaps the ultimate goal is difficult to achieve. However I think
that hyperlinks are potentially used mostly. Javen, what kind of workarounds do
you think are feasible at the moment?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[Bug 60417] autoSizeColumn(int i) swallows interrupted exception and resets interrupted flag

2016-11-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60417

derblaueklabauterm...@gmail.com changed:

   What|Removed |Added

 CC||derblaueklabautermann@gmail
   ||.com
 OS||All

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[Bug 60417] New: autoSizeColumn(int i) swallows interrupted exception and resets interrupted flag

2016-11-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60417

Bug ID: 60417
   Summary: autoSizeColumn(int i) swallows interrupted exception
and resets interrupted flag
   Product: POI
   Version: 3.16-dev
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: XSSF
  Assignee: dev@poi.apache.org
  Reporter: derblaueklabauterm...@gmail.com
  Target Milestone: ---

Invoking 

org.apache.poi.ss.usermodel.Sheet.autoSizeColumn(int column)

in an interrupted thread (interrupted flag = "true") swallows the interrupted
exception and resets the interrupted flag to "false". 
Therefore further checks whether the thread was interrupted or not will fail.
This might cause some trouble.

This bug can be observed using both "HSSF" and "XSSF" workbooks (tested with
the current beta-version (3.16-beta1-20161120)).

Code example to reproduce the bug:


import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;

public class MainClass {

public static void main(String[] args) {

Thread workerThread = new WorkerThread();
workerThread.start();

System.out.println("Main thread will go to sleep for 2
seconds...");
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
System.out.println("Main thread interrupted while
sleeping...");
}
System.out.println("Main thread woke up...");
workerThread.interrupt();
System.out.println("Interrupting worker thread...");
}

public static class WorkerThread extends Thread {

private final Workbook workbook;

public WorkerThread() {
// this.workbook = new XSSFWorkbook();
this.workbook = new HSSFWorkbook();
}

@Override
public void run() {
Sheet sheet = this.workbook.createSheet();

for (int i = 0; i < 10; ++i) {
   
sheet.createRow(i).createCell(0).setCellValue("Row " + i);
System.out.println("\tWorkerThread - Before
autosize: interrupted = " + this.isInterrupted());
sheet.autoSizeColumn(0);
System.out.println("\tWorkerThread - After
autosize: interrupted = " + this.isInterrupted());
++i;
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
this.interrupt();
System.out.println("\tWorkerThread -
Interrupted while sleeping...");
}
}
}
}
}


Output:

Main thread will go to sleep for 2 seconds...
WorkerThread - Before autosize: interrupted = false
WorkerThread - After autosize: interrupted = false
WorkerThread - Before autosize: interrupted = false
WorkerThread - After autosize: interrupted = false
Main thread woke up...
Interrupting worker thread...
WorkerThread - Interrupted while sleeping...
WorkerThread - Before autosize: interrupted = true
WorkerThread - After autosize: interrupted = false
WorkerThread - Before autosize: interrupted = false
WorkerThread - After autosize: interrupted = false
WorkerThread - Before autosize: interrupted = false
WorkerThread - After autosize: interrupted = false

As one can clearly see, the interrupted flag is reset when autoSizeColumn(int
i) is invoked.

The problem seems to occur somewhere deep in java.awt.font.TextLayout. Thus
it's probably out of your scope to fix "the real bug".
However, I think it's still worth to have a look at it (and to be aware of this
bug).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



Re: svn commit: r1771220 - in /poi/site: publish/download.html src/documentation/content/xdocs/download.xml

2016-11-24 Thread Nick Burch

On Thu, 24 Nov 2016, Javen O'Neal wrote:

Is this sentence not enough?

These builds should not be used in production: they
are only intended for use by developers
to help with resolving bugs and evaluating new features.


That probably should do it. dev@community would be the best place to ask 
for advice though, if we're not quite sure. (Or just see what some other 
projects do!)


Nick

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



[Bug 60416] Reduce Hyperlink memory consumption in SXSSF

2016-11-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60416

--- Comment #2 from Javen O'Neal  ---
Update SXSSF how-to.html to mention that hyperlinks may use a lot of memory in
r1771233.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



Re: Too much memory is used by a hyperlink in a spreadsheet

2016-11-24 Thread Javen O'Neal
Thanks for the submission. I have opened bug 60416 [1] to work on this
and committed your patch.

Discussion can take place either on the bug or on the
dev@poi.apache.org mailing list. I have bcc'd u...@poi.apache.org out
of the email responses.

[1] https://bz.apache.org/bugzilla/show_bug.cgi?id=60416

On Thu, Nov 24, 2016 at 3:24 AM, Dmitry Katsubo  wrote:
> Dear POI community,
>
> I am trying to use SXSSFWorkbook (streaming version of workbook) to generate 
> XLSX spreadsheet with many rows and hyperlinks in the cells. It turned out 
> that effective streaming of such document is not possible, as hyperlinks are 
> accumulated in XSSFSheet#hyperlinks (see [1]). It's clear why this is 
> necessary:  XML element goes after  in , so 
> they need to be somehow preserved until all data rows are written. However it 
> turned out that each hyperlink is 2KB size, while the "useful" data (the 
> string link itself) is about 300 bytes (75% memory overhead). For document 
> with 6 hyperlinks, the memory used is 132MB (see attached 
> poi-hyperlink-dump.png). The most of memory is consumed by Cur$Locations 
> which has 7 arrays, 32 elements each, consuming 1KB in total (see attached 
> poi-hyperlink-dump-detailed.png). The stack trace is the following:
>
> Thread [main] (Suspended (breakpoint at line 493 in 
> org.apache.xmlbeans.impl.store.Cur$Locations))
> 
> org.apache.xmlbeans.impl.store.Cur$Locations.(org.apache.xmlbeans.impl.store.Locale)
>  line: 493
> 
> org.apache.xmlbeans.impl.store.Locale.(org.apache.xmlbeans.SchemaTypeLoader,
>  org.apache.xmlbeans.XmlOptions) line: 169
> 
> org.apache.xmlbeans.impl.store.Locale.getLocale(org.apache.xmlbeans.SchemaTypeLoader,
>  org.apache.xmlbeans.XmlOptions) line: 241
> 
> org.apache.xmlbeans.impl.store.Locale.newInstance(org.apache.xmlbeans.SchemaTypeLoader,
>  org.apache.xmlbeans.SchemaType, org.apache.xmlbeans.XmlOptions) line: 592
> 
> org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl(org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase).newInstance(org.apache.xmlbeans.SchemaType,
>  org.apache.xmlbeans.XmlOptions) line: 198
> 
> org.apache.poi.POIXMLTypeLoader.newInstance(org.apache.xmlbeans.SchemaType, 
> org.apache.xmlbeans.XmlOptions) line: 84
> 
> org.openxmlformats.schemas.spreadsheetml.x2006.main.CTHyperlink$Factory.newInstance()
>  line: not available
> 
> org.apache.poi.xssf.usermodel.XSSFHyperlink.(org.apache.poi.common.usermodel.HyperlinkType)
>  line: 60
> 
> org.apache.poi.xssf.usermodel.XSSFCreationHelper.createHyperlink(org.apache.poi.common.usermodel.HyperlinkType)
>  line: 78
> 
> org.apache.poi.xssf.streaming.SXSSFCreationHelper.createHyperlink(org.apache.poi.common.usermodel.HyperlinkType)
>  line: 83
>
> By looking into tacktrace one can see that there is chance to optimize memory 
> in Locale#getLocale() by taking advantage of 
> options.hasOption(USE_SAME_LOCALE). However this option is not documented – 
> what could be the side effects?
>
> Another opportunity is to refactor XSSFHyperlink so that it does not create 
> CTHyperlink immediately but postpones that until that is really needed 
> (SXSSFWorkbook#write() is called), more specifically, when 
> XSSFHyperlink#getCTHyperlink() is called. However SXSSFCell#setHyperlink() 
> misuses this method [3] in a sense that it should use API of XSSFHyperlink 
> the same way as XSSFCell#setHyperlink() does (see SXSSFCell.java.patch).
>
> Summarizing above I would say that the following could be improved right now:
>
> * Document USE_SAME_LOCALE option. Provide a description of what could go 
> wrong if this options is used, especially when used in conjunction with 
> UNSYNCHRONIZED. Also the option assumes that Locale object could be somehow 
> instantiated but it's constructor is private and one cannot do something like 
> POIXMLTypeLoader.DEFAULT_XML_OPTIONS.put(Locale.USE_SAME_LOCALE, 
> Locale.getLocale(XmlBeans.getContextTypeLoader(), 
> POIXMLTypeLoader.DEFAULT_XML_OPTIONS));
> * Apply minor correction to documentation [4]:
>there are still things that still may consume a large amount of memory 
> based on which features you are using, e.g. merged regions, comments, ...
>there are still things that still may consume a large amount of memory 
> based on which features you are using, e.g. merged regions, hyperlinks, 
> comments, ...
> * Apply the attached SXSSFCell.java.patch.
>
> More advanced improvement of SXSSF would be to dump all problematic objects 
> (regions, hyperlinks, comments, ...) into temporary files and then merge them 
> into destination XSLX spreadsheet – then it would be a real streaming.
>
> POI v3.15. Links are to POI 3.12, but there are no conceptual differences.
>
> [1] 
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.poi/poi-ooxml/3.12/org/apache/poi/xssf/usermodel/XSSFSheet.java#137
> [2] 
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.xmlbeans/xmlbean

[Bug 60416] Reduce Hyperlink memory consumption in SXSSF

2016-11-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60416

--- Comment #1 from Javen O'Neal  ---
Applied Dmitry's patch from email (with modification) in r1771231.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[Bug 60416] New: Reduce Hyperlink memory consumption in SXSSF

2016-11-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60416

Bug ID: 60416
   Summary: Reduce Hyperlink memory consumption in SXSSF
   Product: POI
   Version: unspecified
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: SXSSF
  Assignee: dev@poi.apache.org
  Reporter: one...@apache.org
  Target Milestone: ---

From
https://lists.apache.org/thread.html/b59a525b6a4dbea9de4d138952c0ab2629c528423f19b363d3434452@%3Cuser.poi.apache.org%3E

Subject: Too much memory is used by a hyperlink in a spreadsheet
Author: Dmitry Katsubo

Memory consumption can be reduced by delaying when new CTHyperlink objects are
created until writing the hyperlinks out to  after  in
.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[Bug 60369] Month format 'MMMMM' issue with TEXT-formula and Java 8

2016-11-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60369

--- Comment #3 from Javen O'Neal  ---
POI works on Java 8: https://builds.apache.org/job/POI-JDK8/

We were busy with the 3.16 beta 1 release, so code changes were limited in the
past 2 weeks.
If you have time to put together a unit test that passes on JDK6, JDK7, and
JDK8 with your regex fixes, it would be greatly appreciated. See
https://poi.apache.org/guidelines.html#Submitting+Patches

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



Re: svn commit: r1771220 - in /poi/site: publish/download.html src/documentation/content/xdocs/download.xml

2016-11-24 Thread Javen O'Neal
Is this sentence not enough?

These builds should not be used in production: they
are only intended for use by developers
to help with resolving bugs and evaluating new features.

http://svn.apache.org/viewvc/poi/site/publish/download.html?r1=1771220&r2=1771219&pathrev=1771220&diff_format=l

On Thu, Nov 24, 2016 at 12:24 PM, Nick Burch  wrote:
> On Thu, 24 Nov 2016, one...@apache.org wrote:
>>
>> URL: http://svn.apache.org/viewvc?rev=1771220&view=rev
>> Log:
>> remove snarky disclaimer
>>
>> The POI nightly builds are run on the > href="https://builds.apache.org/view/POI/";>Jenkins continuous
>> integration server.
>> - Note that these are not officially verified builds and they are not
>> endorsed or even supported by the POI team.
>>  
>
>
> We're not supposed to direct "normal" users to nightly builds, see
> http://www.apache.org/dev/release.html#host-rc . So, some sort of disclaimer
> and warning is officially required
>
> Nick
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
> For additional commands, e-mail: dev-h...@poi.apache.org
>

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



Re: svn commit: r1771220 - in /poi/site: publish/download.html src/documentation/content/xdocs/download.xml

2016-11-24 Thread Nick Burch

On Thu, 24 Nov 2016, one...@apache.org wrote:

URL: http://svn.apache.org/viewvc?rev=1771220&view=rev
Log:
remove snarky disclaimer

The POI nightly builds are run on the https://builds.apache.org/view/POI/";>Jenkins continuous integration server.
- Note that these are not officially verified builds and they are not 
endorsed or even supported by the POI team.
 


We're not supposed to direct "normal" users to nightly builds, see 
http://www.apache.org/dev/release.html#host-rc . So, some sort of 
disclaimer and warning is officially required


Nick

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



[Bug 60369] Month format 'MMMMM' issue with TEXT-formula and Java 8

2016-11-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60369

--- Comment #2 from Praveen Siva  ---
Hi ,

Is there any update on this ? Is POI support for Java 8 out ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org