Skip to main content

Quiet internal stack trace printing to console

6 replies [Last post]
demichej
Offline
Joined: 2009-06-25

Hello,

We have an example image that is failing when we call RenderedOp.getRendering():

Error: Cannot decode the image for the type :
Occurs in: com.sun.media.jai.opimage.CodecRIFUtil
java.io.IOException: Premature end of input file
at com.sun.media.jai.codecimpl.CodecUtils.toIOException(CodecUtils.java:76)
at com.sun.media.jai.codecimpl.JPEGImageDecoder.decodeAsRenderedImage(JPEGImageDecoder.java:48)

The error isn't the problem, since we are catching a Throwable on our end, and handling everything gracefully as we see fit. However, the problem is that the internal JAI code is spitting out these stack traces to the Console. WHICH WE DON'T WANT.

Is there a way to quiet this error printing, so that we can handle the Throwable in our own fashion?

Thanks.

FYI, here's a link to the image that is failing (although not sure if putting it on photobucket will make it different)

http://s559.photobucket.com/albums/ss32/demichej/?action=view&current=T0...

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
demichej
Offline
Joined: 2009-06-25

Thanks, Michael. Do you know if there are plans to move those statements to a Logger message instead of printing to System?

cafeanimal
Offline
Joined: 2008-04-29

As far as I can tell, Sun's JAI development work quietly stopped a while ago :-(

Michael

Nidel, Mike

This is what you might call "The Elephant in the Room"...

> -----Original Message-----
> From: jai-interest@javadesktop.org [mailto:jai-
> interest@javadesktop.org]
> Sent: Wednesday, July 08, 2009 2:15 AM
> To: interest@jai.dev.java.net
> Subject: [JAI] Re: Quiet internal stack trace printing to console
>
> As far as I can tell, Sun's JAI development work has quietly stopped a
> while ago :-(
>
> Michael
> [Message sent by forum member 'cafeanimal' (cafeanimal)]
>
> http://forums.java.net/jive/thread.jspa?messageID=354590
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
> For additional commands, e-mail: interest-help@jai.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
For additional commands, e-mail: interest-help@jai.dev.java.net

Bob Deen

Shhhh!!! You might wake it!!!

;-/

-Bob

Nidel, Mike wrote:
> This is what you might call "The Elephant in the Room"...
>
>> -----Original Message-----
>> From: jai-interest@javadesktop.org [mailto:jai-
>> interest@javadesktop.org]
>> Sent: Wednesday, July 08, 2009 2:15 AM
>> To: interest@jai.dev.java.net
>> Subject: [JAI] Re: Quiet internal stack trace printing to console
>>
>> As far as I can tell, Sun's JAI development work has quietly stopped a
>> while ago :-(
>>
>> Michael
>> [Message sent by forum member 'cafeanimal' (cafeanimal)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=354590
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
>> For additional commands, e-mail: interest-help@jai.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
> For additional commands, e-mail: interest-help@jai.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
For additional commands, e-mail: interest-help@jai.dev.java.net

cafeanimal
Offline
Joined: 2008-04-29

> Shhhh!!! You might wake it!!!
>
> ;-/
>
> -Bob
>

That's right - it's not dead, it's resting...

cafeanimal
Offline
Joined: 2008-04-29

Unfortunately there are quite a lot of active System.err.println statements in the JAI code.

If convenient, you could do System.setErr(null) to hide them.

Michael