An error when I use poi3.15 in a resin4 web applicatoin

2017-01-25 Thread kejun.chang
Hello. I made a web application which is correct in tomcat. When I put it into resin4, everything is good except POI3.15. It became not to read xlsx, but xls reading is still correct. Error info is the next line. java.lang.NoClassDefFoundError: Could not initialize class com.sun.org.apache.xml.i

An error when I use poi3.15 in a resin4 web applicatoin

2017-01-25 Thread Christian Castelli
Have you included this dependency for your project? org.apache.poi poi-ooxml ${apache.poi.version} - To unsubscribe, e-mail: user-unsubscr...@poi.apache.org For additional commands, e-mail: user-h...@poi.apache.org

ClassCastException while opening XLSX files

2017-01-25 Thread Christian Castelli
Hi all, when I deploy my web application on a different machine other than mine I receive this Exception when I try to open XLSX files with Workbook wb = WorkbookFactory.create(new File(IVENTORY_TEMPLATE)); java.lang.ClassCastException: org.apache.xerces.parsers.XIncludeAwareParserConfiguration c

Re: ClassCastException while opening XLSX files

2017-01-25 Thread Jörn Franke
Might be that one dependency loads a different version of the parser? > On 25 Jan 2017, at 10:04, Christian Castelli > wrote: > > Hi all, > when I deploy my web application on a different machine other than mine I > receive this Exception when I try to open XLSX files with > > Workbook wb =

Re: ClassCastException while opening XLSX files

2017-01-25 Thread Christian Castelli
Maybe, it could be a conflict with some other library, I can see from Maven dependency tree that when it packages EAR it removes many artifacts for avoiding duplicates or conflicts, so I cannot understand what's the problem... On 2017-01-25 10:09 (+0100), Jörn Franke wrote: > Might be that on

Re: ClassCastException while opening XLSX files

2017-01-25 Thread Christian Castelli
It's important to notice that this exception is occasionally thrown, so it's Maven related but I cannot understand what causes differences between builds... On 2017-01-25 10:09 (+0100), Jörn Franke wrote: > Might be that one dependency loads a different version of the parser? > > > On 25 Jan

Re: An error when I use poi3.15 in a resin4 web applicatoin

2017-01-25 Thread Javen O'Neal
https://poi.apache.org/faq.html#faq-N10025 Make sure you don't have mixed versions of POI on your class path. Also, why the com.sun namespace prefix to org.apache.poi? Is this something that resin4 is doing? Are you using an unofficial fork of POI? On Jan 25, 2017 12:56 AM, "Christian Castelli"

Re: ClassCastException while opening XLSX files

2017-01-25 Thread Javen O'Neal
Looks like both POI 3.15 and 3.6 tried to load, but Maven correctly rejected 3.6 due to a duplicate version conflict. However, if the library that tried to import 3.6 is expecting a class from 3.6 that was removed or renamed in 3.15, you would likely get some kind of Class error. Seems to be from i

Re: An error when I use poi3.15 in a resin4 web applicatoin

2017-01-25 Thread Dominik Stadler
Hi, It could also be related to a different JVM implementation, which exact type and version of the JavaVM are you using? It is some IBM JDK or some other vendor? Thanks... Dominik. On Wed, Jan 25, 2017 at 4:10 PM, Javen O'Neal wrote: > https://poi.apache.org/faq.html#faq-N10025 > > Make sure

Re: ClassCastException while opening XLSX files

2017-01-25 Thread Christian Castelli
Thanks Javen, I'll try it. 2017-01-25 16:26 GMT+01:00 Javen O'Neal : > Looks like both POI 3.15 and 3.6 tried to load, but Maven correctly > rejected 3.6 due to a duplicate version conflict. However, if the library > that tried to import 3.6 is expecting a class from 3.6 that was removed or > ren

Problem with default font size when reading from docx file

2017-01-25 Thread apache_user
Hello All, I am trying to read the font size of some runs, but sometimes, I get -1 as the font size. I know that it shows the default font size. But I need the actual font size. I found a couple of solutions to extract the default font size and what I do right now is like the following: XWPFRun f