Corrupt xlsx generating by poi 4.1.1 with no exception but Core xml and rels is empty

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Corrupt xlsx generating by poi 4.1.1 with no exception but Core xml and rels is empty

adidesi
We are upgrading apache poi from 3.7 to 4.1.1. We tried 4.0.0 it was giving
same issue.
We are generating a simple vanilla excel file. Which the 3.7 generates fine
on local and server. We upgraded to newer version and the file is generating
with some minor changes in styles viz borders, fonts etc is generating fine
in local. While the same file is not generating on the server. I tried
unzipping the xlsx and found the worksheet is generated fine with styles and
app xml.
Though core.xml, content_types.xml and rels files are empty. And by empty I
mean 0bytes empty. The files are created but nothing in them. This is not
the case in local and file is generating fine.

I upgraded the dependencies eg xmlbeans to proper version 3.0.1 for 4.0.0
and 3.1.0 for 4.1.1 but the issue persists in server only.

The xlsx file is generating , but shows corrupt , guessing due to lack of
required core and content_types xmls and rels file. Though no error or
exception is logged

We are using ibm websphere 8.5 in the server and corresponding java run
time. I couldn't enable logging in the server as we are using log4j and the
log4j config was in xml format and couldn't find how to do to it in xml
config.

Some direction or help will be much appreciated

Thanks



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Corrupt xlsx generating by poi 4.1.1 with no exception but Core xml and rels is empty

Dominik Stadler
Sounds hard to reproduce with only this information as it seems to be
caused by some infrastructure thing, e.g. IBM JDK or running inside
WebSphere, can you narrow down the problem a bit more, e.g. by running it
locally with the JDK that is bundled with WebSphere? Which exact
JDK-version is this?

Also a full code-snippet which reproduces the problem would be good.

Thanks... Dominik.

On Tue, May 19, 2020 at 10:30 PM adidesi <[hidden email]> wrote:

> We are upgrading apache poi from 3.7 to 4.1.1. We tried 4.0.0 it was giving
> same issue.
> We are generating a simple vanilla excel file. Which the 3.7 generates fine
> on local and server. We upgraded to newer version and the file is
> generating
> with some minor changes in styles viz borders, fonts etc is generating fine
> in local. While the same file is not generating on the server. I tried
> unzipping the xlsx and found the worksheet is generated fine with styles
> and
> app xml.
> Though core.xml, content_types.xml and rels files are empty. And by empty I
> mean 0bytes empty. The files are created but nothing in them. This is not
> the case in local and file is generating fine.
>
> I upgraded the dependencies eg xmlbeans to proper version 3.0.1 for 4.0.0
> and 3.1.0 for 4.1.1 but the issue persists in server only.
>
> The xlsx file is generating , but shows corrupt , guessing due to lack of
> required core and content_types xmls and rels file. Though no error or
> exception is logged
>
> We are using ibm websphere 8.5 in the server and corresponding java run
> time. I couldn't enable logging in the server as we are using log4j and the
> log4j config was in xml format and couldn't find how to do to it in xml
> config.
>
> Some direction or help will be much appreciated
>
> Thanks
>
>
>
> --
> Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Corrupt xlsx generating by poi 4.1.1 with no exception but Core xml and rels is empty

adidesi
Hi Dominic,

Sorry for the late reply.. I tried tweaking the code updating dependency
jars to correct version but still doesn't. A simple example code
https://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateCell.java
Also is not working at 4.0.0 which works as expected 3.7
I couldn't reproduce as you suggested by locally running withnjava bundle as
the OS of my local and server are different

Do we need any specific dependency which is to be added to server library on
server which is not required or is available locally as default?

The docprops/core.xml is generating with 0bytes. And consequently the rels
file and content_types.xml thus is being empty ie 0 bytes. But the cause
effect is just a mere guess as the content_types.xml and rels point to
core.xml




--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Corrupt xlsx generating by poi 4.1.1 with no exception but Core xml and rels is empty

Dominik Stadler
Hi,

this seems to be some invalid or conflicting third-party libraries
dependency in your environment.

You can check differences in dependencies via maven-central, e.g.
https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml/3.17 and
https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml/4.0.0

One notable difference is that POI 4.x introduced a dependency on
commons-compress, maybe you have a very outdated version of this library in
your application?

Otherwise you will need to narrow down the test-case that works on your
local machine and fails on your server until you know which difference
causes it. There might be a number of factors, it is hard to say without
being able to take a direct look which one is exactly causing this here.

Dominik.

On Mon, Jun 1, 2020 at 12:41 AM adidesi <[hidden email]> wrote:

> Hi Dominic,
>
> Sorry for the late reply.. I tried tweaking the code updating dependency
> jars to correct version but still doesn't. A simple example code
>
> https://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/CreateCell.java
> Also is not working at 4.0.0 which works as expected 3.7
> I couldn't reproduce as you suggested by locally running withnjava bundle
> as
> the OS of my local and server are different
>
> Do we need any specific dependency which is to be added to server library
> on
> server which is not required or is available locally as default?
>
> The docprops/core.xml is generating with 0bytes. And consequently the rels
> file and content_types.xml thus is being empty ie 0 bytes. But the cause
> effect is just a mere guess as the content_types.xml and rels point to
> core.xml
>
>
>
>
> --
> Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>