ImageLoadException in web application

Hello,

I’m having a problem loading some images from within a web application.

version = aspose-imaging-1.8-jdk15.jar (date 27/08/2013)

code :

try {
String inFile = “D:\fraser_island2.jpg”;
Image image = Image.load(inFile);

} catch (Exception e) {
System.out.println(“load image KO !!!”);
e.printStackTrace();
}


In a standalone application (main method), this code works fine. But in a webapp, in a basic HelloWorldServlet, it launches an ImageLoadException.

It’s run in Tomcat 6.0.32. The only jar in the webapp’s lib is aspose-imaging-1.8-jdk15.jar

And this doesn’t happen for every jpeg, only for some

Here’s the java code and the jpg file as attachments.

Is there anything special about that file ?

How can I make this work in a webapp ?

Thanks for your support.

Antoine

-------

com.aspose.imaging.exceptions.ImageLoadException: Image loading failed.
at com.aspose.imaging.Image.a(Unknown Source)
at com.aspose.imaging.Image.load(Unknown Source)
at xx.HelloWorldServlet.doGet(HelloWorldServlet.java:34)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
(…)
Caused by: com.aspose.imaging.exceptions.ImageLoadException: Cannot open an image. The image file format may be not supported at the moment.
… 17 more


Hi Antoine,

Thank you for reporting this problem to us.

I can reproduce the said exception (ImageLoadException) even with a simple console application while using the latest version of Aspose.Imaging for Java v1.8.0 and JRE7. For investigation and correction purposes, I have logged this issue in our bug tracking system under ticket Id IMAGING-33738. We will soon analyze your sample file, and then we will be able to provide you any further guidance in this regard. Please spare us little time to properly investigate the problem cause.

We are sorry for your inconvenience.

Hi Babar,

For your information, my own jvm is IBM 1.6.0
And my code will have to run on webshere 7 on AIX.

Looking forward to your answer.

Antoine

Hi Antoine,

Thank you for providing more information about your environment.

We will try to simulate an equivalent envienoment to test the fix for your said issue once the new build is available for public use.

The issues you have found earlier (filed as IMAGING-33738) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.