Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ClassCast Exception in a CrossContext Web Application

843841Sep 26 2006 — edited Sep 26 2006
This is my set-up...
I have two applications sharing a context in a Tomcat container. The first application (A) handles authentication requests and generates a token and writes it to a Hashtable stored in the servlet context....

The second (B) app picks-up (supposed to) the token generated by A; B calls context A via context.getContext("/A"); acquires the token object from A and as a result, grants or rejects access to the application...

The object written in the context variable is a Serialized object... Both contexts A and B have the object under the same packages.

Within context A I am able to retrieve the object contents, after I write it... It gives a java.lang.classcastexception in context B... When I repeat this exercise with String or Vector types the program works, but I seem to get the exception whenever I am trying to acquire my object...

Any ideas are appreciated...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 24 2006
Added on Sep 26 2006
1 comment
210 views