Hi,
Hi,
Thanks for your posting and using Aspose.Cells for Java.
We have checked your issue with the latest version and it works fine. Please download and use the latest version: Aspose.Cells for Java 7.5.2.
We have attached the output pdf file for your reference.
I just tried this with Cells 7.5.2, JDK 1.7.0_21 and JDK 1.6.0_35 on Windows 7 with the same results. The offending line of code is…
Hi,
Thanks for your posting and using Aspose.Cells for Java.
Please also add the following jar files in your class path and build the project. You can find them in the JDK 1.6 folder of the version which you downloaded.
- bcprov-jdk16-146.jar
- dom4j-1.6.1.jar
Please also add the JAI library which is needed for tiff images. You can download JAI library from internet. These are the JAI library JAR files.
- jai_core.jar
- jai_imageio-1.1-alpha.jar
This seems to work for a command line application, but fails in the same manner when called from within a servlet.
Hi,
Thanks for your posting and using Aspose.Cells for Java.
Please add the JAI library in your class path. This error occurs if the JAI library is missing. Once, you will add it in your class path, it will work fine.
- jai_core.jar
- jai_imageio-1.1-alpha.jar
They are in the classpath. The WEB-INF/lib directory contains the following JAR files.
Hi,
Thanks for your posting and using Aspose.Cells for Java.
It is strange, you are still getting this exception after adding all the JAR files. We have logged this issue in our database for investigation. We will look into it and update you. Once, there is some update for you, we will let you know asap.
This issue has been logged as CELLSJAVA-40599.
Hi,
Well, for this issue, we have tested it with your given servlet code but could not find the issue. If we did not add jai-imageio.jar and jai-core.jar into the application’s lib(application/WEB-INF/lib), we will get the exception “com.aspose.cells.CellsException: Unknown image format:invalid image stream or image format is not supported.” When we add those two jars into the lib, the workbook can be opened fine. To check whether the jai libraries take effect, please use ImageIO.getReaderFormatNames() in the servlet to check the supported image formats. If the libraries take effect, tiff should be in the returned array. So we think maybe it is an issue of the configuration of your web application.
Thank you.
Thank you Amjad, that pointed me in the right direction. It turns out due to some strange classloading issue, the jai-core library was not detecting the jai-imageio library as a plugin. A manual call to ImageIO.scanForPlugins() resolved the issue.
Hi,
Thanks for your posting and using Aspose.Cells.
It is good to know that your issue is resolved now. If you encounter any other issue, please feel free to post, we will be glad to help you further.