tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Foxton <p...@network-sol.com>
Subject ClassCastException on a bean
Date Thu, 26 Jul 2001 08:12:20 GMT
Hi,

I've just had an odd problem I thought I'd see if anyone else had come
accross:
Running tomcat 3.2.2, apache 1.3.19 on RH linux 7.1, I got a
ClassCastException for a bean (called DbUtilities) I use in a JSP page.

The code from the compiled servlet of the jsp is as follows: 

DbUtilities db = null;
boolean _jspx_specialdb = false;
 synchronized(application) {
   db = (DbUtilities)      <---------------- this line caused the
ClassCastException
   pageContext.getAttribute("db",pageContext.APPLICATION_SCOPE);
 
Its odd because both the bean and JSP had been working fine for a week or so
& I hadn't modified either.

I restarted tomcat and apache and everything was fine again - just a little
concernred, I don't want this happenning when the site goes live!

Has anyone else seen anything like this?

cheers,

Paul

Mime
View raw message