As far as I can see, there is no problem with your action, but with the de.jamba.controller.web.FlowManager class. This class tries to cast the ActionForm to a class to which it can't be casted. Maybe you should look in the source of the FlowManager class
> -----Ursprüngliche Nachricht----- > Von: Thorsten Maus [SMTP:[EMAIL PROTECTED]] > Gesendet am: Donnerstag, 16. Mai 2002 12:52 > An: Struts Users Mailing List > Betreff: Re: class cast exception > > > > hi ... > > please find attached the form-bean. > > and find below the log-dump > > the line starting with _form: should display > > form.getClass().getName() > > thanks > > Do Mai 16 12:42:37 CEST 2002:<I> <WebLogicServer> WebLogic Server started > Do Mai 16 12:42:48 CEST 2002:<I> <NT Performance Pack> Allocating: '2' > NT reader > threads > Do Mai 16 12:42:49 CEST 2002:<I> <WebAppServletContext-det> FlowManager: > init > Do Mai 16 12:42:51 CEST 2002:<E> <WebAppServletContext-det> FlowManager: > Error creating ActionForm instance of class > 'de.jamba.b2b.tmotion.action.web.MyActionForm' > java.lang.ClassCastException: de.jamba.b2b.tmotion.action.web.MyActionForm > at de.jamba.controller.web.FlowManager.processActionForm(Unknown > Source) > at > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1412) > at > org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:463) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:865) > at > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm > pl.java:106) > at > weblogic.servlet.internal.ServletContextImpl.invokeServlet(Unknown So > urce) > at > weblogic.servlet.internal.ServletContextImpl.invokeServlet(Unknown So > urce) > at > weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet > ContextManager.java:252) > at weblogic.socket.MuxableSocketHTTP.invokeServlet(Unknown Source) > at weblogic.socket.MuxableSocketHTTP.execute(Unknown Source) > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129) > > > _form: > Do Mai 16 12:42:51 CEST 2002:<E> <WebAppServletContext-det> Servlet > failed with > Exception > Nicolas De Loof wrote: > > >Could you please insert in your action class the line : > > > >System.out.println(form.getClass().getName()); > >(or another logging method) > > > >so we can have more infos about what's happening with your form ? > > > >and please give us the complete java source code of your FormBean as > >attachement > > > >Nico > > > > > > > > > >>Im shure.... > >> > >>entry in struts-config > >>=============== > >><form-bean name="SimpleForm" > >> type="de.jamba.b2b.tmotion.action.web.MyActionForm"/> > >> > >><action path="/action" > >> type="de.jamba.b2b.tmotion.action.web.StrutsAction" > >> name="SimpleForm" > >> scope="request" > >> validate="false"> > >> > >> > >> <forward name="forward" path="/test.jsp" /> > >> > >> > >>form - bean > >>========== > >>public class MyActionForm extends ActionForm { > >> > >> private String param1; > >> public String getParam1(){ > >> return param1; > >> } > >> public void setParam1(String param){ > >> this.param1=param; > >> } > >> > >> > >>} > >> > >>action > >>===== > >> > >>public class StrutsAction extends Action{ > >> > >> public StrutsAction() { > >> } > >> > >> public ActionForward perform(ActionMapping mapping, > >> ActionForm form, > >> HttpServletRequest request, > >> HttpServletResponse response) > >> throws IOException, ServletException > >> { > >> MyActionForm myActionForm = (MyActionForm) form; > >> myActionForm.setParam1("_new value"); > >> return mapping.findForward("forward"); > >> } > >> > >>} > >> > >> > >>When connecting to the action (action.do) I get a class cast > >>exception...... > >>and I dont know why.. > >> > >>any help would be appreciated... > >> > >>Erich Meier wrote: > >> > >> > >> > >>>On Thu, May 16, 2002 at 11:13:17AM +0200, Thorsten Maus wrote: > >>> > >>> > >>> > >>> > >>>>Hi there... > >>>> > >>>>I posted a question on a class cast exception yesterday....and Im not > >>>>getting any further.. > >>>> > >>>>I give you the important code on the next lines...and hopefully your > >>>>able to help me > >>>> > >>>> > >>>> > >>>> > >>>> > >>>[...] > >>> > >>> > >>> > >>> > >>>>form - bean > >>>>========== > >>>>public class MyActionForm extends ActionForm { > >>>> > >>>> > >>>> > >>>> > >>>Are you sure, that this ActionForm class is the > >>>org.apache.struts.action.ActionForm class? Or did you define your own > >>> > >>> > >ActionForm > > > > > >>>class that is not derived from the struts one? > >>> > >>>The rest looks correct. > >>> > >>> > >>> > >>> > >>> > >>>>(** have seen starwars this night ... **) > >>>> > >>>> > >>>> > >>>> > >>>Is it worth it? > >>> > >>>Regards, > >>>Erich > >>> > >>> > >>> > >>> > >>> > >> > >> > >>-- > >>To unsubscribe, e-mail: > >> > >> > ><mailto:[EMAIL PROTECTED]> > > > > > >>For additional commands, e-mail: > >> > >> > ><mailto:[EMAIL PROTECTED]> > > > > > >-- > >To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > >For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > > > << Datei: MyActionForm.java >> << Datei: ATT43991.txt >> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>