RE: java.lang.ClassCastException: com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader cannot be cast to com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader

2010-12-23 Thread spring
> >> 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
> > 
> > I solved that problem by moving jai_imageio.jar into 
> JAVA/lib/ext. Moving it
> > to TOMCAT/lib did NOT solve the problem.
> 
> I think you're referring to an older thread you posted, but I 
> can't find
> it in my mail client.

Yes, had a similar problem with Tomcat 7. Here it was not ClassCastEx but a
NoSuchElementEx indicating that the TIFF-Plugin cannot be found.
In both cases the problem was solved when moving the jar into ext.

> If you're using a Java 6 JDK, isn't the JAI stuff included?  I thought
> it was only a separate download for older versions of Java (please
> correct me if I'm wrong).

Hm, I think I need the jar for TIFF-Support. Plain JRE has JPEG, PNG, GIF
and BMP only - imo...


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



Re: java.lang.ClassCastException: com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader cannot be cast to com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader

2010-12-23 Thread Pid
On 23/12/2010 09:39, spr...@gmx.eu wrote:
>> 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
> 
> I solved that problem by moving jai_imageio.jar into JAVA/lib/ext. Moving it
> to TOMCAT/lib did NOT solve the problem.

I think you're referring to an older thread you posted, but I can't find
it in my mail client.

If you're using a Java 6 JDK, isn't the JAI stuff included?  I thought
it was only a separate download for older versions of Java (please
correct me if I'm wrong).

Or is there something different about the download?


p


0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


RE: java.lang.ClassCastException: com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader cannot be cast to com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader

2010-12-23 Thread spring
> 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

I solved that problem by moving jai_imageio.jar into JAVA/lib/ext. Moving it
to TOMCAT/lib did NOT solve the problem.


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



RE: java.lang.ClassCastException: com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader cannot be cast to com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader

2010-12-21 Thread spring
> 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.

As I said, nobody reloads the app (at least I cannot see this in the logs).
It just happens after a while.

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

When I active the listener I get a NPE...

Iterator it = ImageIO.getImageReadersByFormatName("TIF");
r = (TIFFImageReader)it.next(); //<== NPE

Thank you!


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



Re: java.lang.ClassCastException: com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader cannot be cast to com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader

2010-12-21 Thread Pid *
On 21 Dec 2010, at 15:20, "spr...@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-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>

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



java.lang.ClassCastException: com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader cannot be cast to com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader

2010-12-21 Thread spring
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?

Thank you


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