tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject RE: ClassCastException org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl
Date Thu, 09 Aug 2012 08:22:21 GMT

Dale Ogilvie <> wrote:

>-----Original Message-----
>From: Mark Thomas [] 
>Sent: Wednesday, 8 August 2012 7:44 p.m.
>To: Tomcat Users List
>Subject: RE: ClassCastException org.apache.jasper.runtime.ELContextImpl
>cannot be cast to org.apache.jasper.el.ELContextImpl
>>>Dale Ogilvie <> wrote:
>>>So you are saying that Tomcat should not be responsible for
>>>app1 from unintentionally loading a class from
>>No I am not saying that. The reason you see the exception is because
>Tomcat (well, with the help of the JVM) prevents a class loaded from
>one application being visible to another application.
>Thanks for your help Mark. I think your understanding doesn't match
>what is being reported.

Thanks, but I'm quite happy with my understanding of the situation.

<snip content="repeat of info already provided" />

>That says to me that app1 already has an instance of
>org.apache.jasper.runtime.ELContextImpl which it is trying to cast to
>the tomcat version.  So your statement that "Tomcat prevents a class
>loaded in app2 from being visible in app1" seems to be false.

Does that cast succeed? No. Why? Because the class isn't visible to app1. 

> Or am I reading this error message incorrectly?

You seem to be mixing up the object (can be passed from app2 to any app) with the class (only
visible to app2).

<snip />

As a aside, if someone with an e-mail address (or a long term contributor to this
list such as Chuck, Andre or Pid) answers your question then it is wise to assume that they
know what they are talking about. If you want to avoid annoying them (which reduces your chances
of being helped in the future) it is a good idea not to blatantly question the accuracy of
their answer or their knowledge of Tomcat. On the odd occasion they do get it wrong there
are tactful ways to point that out. For example, "I get that the class from app2 is not visible
to app1. Given that, the bit I don't get is that app1 appears to be working with an instance
of the class that is only visible to app2. What am I missing?" would have achieved the same
ends as your e-mail without any of the associated annoyance.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message