Skip to content

Why does “ input)” fail on some images on Weblogic 12c?

Alright, I have a problem that is driving me crazy!

I have a web application deployed on Weblogic 12.1.1 -i.e.:Weblogic 12c

At some point, I want to read an image File using:

BufferedImage templateImage = URL(url));

The previous line fails on some images with the following so-stupid message:

For input string: ""

Some advised that I change the HTTP handler for Weblogic using the the following parameter:


and it solved the problem yet I can’t implement this solution as it will be very risky.

What made me more crazy is that when I modify the picture using “Paint”, adding/removing some dummy colors and/or shapes, it passed!!

(Although not all changes will make it pass).

This is my first question here and I’d really appreciate your help.

P.S.: Problem appears only on “Weblogic 12c”, not 11g or anything else.

Edit: below is the Stack Trace: For input string: ""
        at weblogic.utils.http.HttpChunkInputStream.initChunk(HttpChunkInputStre
        at weblogic.utils.http.HttpChunkInputStream.skip(HttpChunkInputStream.ja
        at weblogic.utils.http.HttpChunkInputStream.skipAllChunk(HttpChunkInputS
        at weblogic.utils.http.HttpChunkInputStream.close(HttpChunkInputStream.j


As I’m almost sure now it’s a WebLogic Bug, I rewrote the code to be like:

URL url = new URL("url")
File file = new File("New File Path");
InputStream inputStream = url.openStream();
OutputStream outputStream = new FileOutputStream(file);
        try {
            IOUtils.copy(inputStream, outputStream);
        } finally {
BufferedImage actualImage =;

The key difference in the new code is that it passes the read() method a [File] instance instead of a [URL] instance.