Looked
like your email would solve my problem, but I made all permutations of these
entries, including taking them all out and alternating them. Same
ClassCastException results in every case. But will persevere...no other
option right now.
servlet.forum.code=com.aci.appserver.AppServer
servlet.forum.initArgs=RESOURCEBUNDLE=com.forum.dynmodel.DynModel
servlet.AppServer.code=com.aci.appserver.AppServer
servlet.AppServer.initArgs=RESOURCEBUNDLE=com.forum.dynmodel.DynModel.properties
servlet.forum.initArgs=RESOURCEBUNDLE=com.forum.dynmodel.DynModel
servlet.AppServer.code=com.aci.appserver.AppServer
servlet.AppServer.initArgs=RESOURCEBUNDLE=com.forum.dynmodel.DynModel.properties
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Fernando Salazar
Sent: Tuesday, March 21, 2000 8:17 PM
To: Java Apache Users
Subject: Re: ClassCastException - why?
I saw this recently. In my case, it seemed to be related to having 2 (or more) identical servlet alias entries, eg:servlet.MyServlet.code=com.acme.servlet.MyServlet servlet.OtherServlet=com.acme.servlet.Other servlet.MyServlet.code=com.acme.servlet.MyServlet
I took out the redundant alias, and the ClassCastException went away. Didn't have time to trace through
and find out why this mis-configuration causes this error, though. Anyway, you might try checking for
redundant alias entries.
- Fernando
At 05:34 PM 3/21/00 -0600, you wrote:
Everytime I try to run my servlet, I keep getting a:
uncaught exception java.lang.ClassCastException....
What does this exception mean?
This is the stack trace:
Uncaught exception: java.lang.ClassCastException com.forum.dynmodel.servlet.CalcIncomeNestegg
at org.apache.jserv.JServServletManager.load_init(JServServletManager.java:526)
at org.apache.jserv.JServServletManager.loadServlet(JServServletManager.java:488)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:266)
at org.apache.jserv.JServConnection.run(JServConnection.java:188)
at java.lang.Thread.run(Thread.java)
There is obviously no reference to this exception in the code. But can't see where it belongs or why it happens.
I only mail this to the list to be sure that it is a bug in my code vs. something apache1.3.9/jserv1.0 is doing.
What exactly is the org.apache.jserv.JServServletManager.load_init(JServServletManager.java:526) doing?
Thanks,
Sanju.