Skip to content

Writing resized image issue on tomcat #37

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Start Tomcat and Read source file at %tomcat%/bin/test_image.jpg
2. Read source image and Create resized image by 
Thumbnails.of("test_image.jpg").size(width, height).toFile("test_target.jpg");
3. Console print out following error message and target image created 0 byte.

What is the expected output? What do you see instead?
2012-05-22 10:21:36,328 ERROR [http-8080-3] taglibs.ImageTag  
(ImageTag.java:223)     - java.io.IOException: Could not open output file.
java.io.IOException: Could not open output file.
    at net.coobird.thumbnailator.tasks.io.FileImageSink.write(Unknown Source)
    at net.coobird.thumbnailator.tasks.SourceSinkThumbnailTask.write(Unknown Source)
    at net.coobird.thumbnailator.Thumbnailator.createThumbnail(Unknown Source)
    at net.coobird.thumbnailator.Thumbnails$Builder.toFile(Unknown Source)


What version of the product are you using? On what operating system? Which
version of Java (Sun/Oracle? OpenJDK?) ?
Thumbnailator 0.4.2
Windows XP
JDK 1.6 (Oracle)


Please provide any additional information below.

I tested this code with junit test module. But result of test was success. See 
following code 

BufferedImage image = Thumbnails.of(srcFile).size(width, 
height).asBufferedImage();
ImageIO.write(image, FilenameUtils.getExtension(targetPath), targetFile);

This code run on tomcat was success.  


I suggest that the message you rewrited in FileImageSink.write() will be change 
by original message. 

Original issue reported on code.google.com by sirius...@gmail.com on 22 May 2012 at 2:18

Attachments:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions