tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pid *" <...@pidster.com>
Subject Re: java.lang.ClassCastException: com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader cannot be cast to com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader
Date Tue, 21 Dec 2010 15:49:32 GMT
On 21 Dec 2010, at 15:20, "spring@gmx.eu" <spring@gmx.eu> wrote:

> Hi,
>
> running under W2K3, tomcat 6.0.26 and java 1.6_22 I get after a while:
>
> java.lang.ClassCastException:
> com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader cannot be cast to
> com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader
>
> at:
>
> Iterator it = ImageIO.getImageReadersByFormatName("TIF");
> r = (TIFFImageReader)it.next(); //<==BANG
>
> When I restart tomcat, everything is fine again for some hours and the it
> happens again until tomcat is restartet.
>
> It seems that somewhat reloads the webapp which uses TIFFImageReader but
> that plugin is still somewhere in another classloader which causes this CCE
> then.
>
> The problem is: No one explicitly reloads the app. Nothing to be seen in the
> logs. The app is the only app on this tomcat.
>
> NO JreMemoryLeakPreventionListener is configured in server.xml.
>
> What can be the problem here?

ImageIO pins the classloader it first uses. So if that's a
WebappClassloader & you subsequently reload the app you'll have a
memory leak & the potential for class cast exceptions.

The leak prevention stuff handles this, but you've turned it off.

>
> Thank you
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message