title: "cannot be cast to" error raising
body: <p>I'm working in struts-config 1.2 application. In my struts-config, I have declaration entry for a form and I used this form for some actions. I compiled this objects first with java 1.4 version. That time it was working fine. Now I modified as java version 1.6. I compiled all the objects. Now it is throwing error as my form class cannot be cast to my extend java class. I dont know this is may be due to version change. </p>
  
  <p>Please give me a solution for this, I am struggling with this for 2 days.</p>
  
  <p>My struct-config code is: </p>
  
  <pre><code>&lt;form-bean name="xCustomerPortalForm" type="com.portal.form.XCustomerPortalForm" /&gt;
  ...
  &lt;action path="/editXPortalCustomerNew"
          type="com.xmportal.struts.X2AProcessBridgeAction"
          parameter=""
          name="xCustomerPortalForm"
          scope="request"
          validate="false"&gt;
    &lt;forward name="success_en" path="/jsp/XMPortalCustomerRegistration.jsp" /&gt;
    &lt;forward name="failure_en" path="/jsp/XMPortalCustomerRegistration.jsp" /&gt;
  &lt;/action&gt; 
  </code></pre>
  
  <p>This is my error message:</p>
  
  <pre><code>java.lang.ClassCastException: com.portal.form.XCustomerPortalForm cannot be cast to com.xmportal.struts.X2AFormBase
      at com.xmportal.struts.X2AProcessBridgeAction.exposeInScope(X2AProcessBridgeAction.java:205)
      at com.xmportal.struts.X2AProcessBridgeAction.checkDataSingle(X2AProcessBridgeAction.java:331)
      at com.xmportal.struts.X2AProcessBridgeAction.checkData(X2AProcessBridgeAction.java:361)
      at com.xmportal.struts.X2AProcessBridgeAction.checkOutcome(X2AProcessBridgeAction.java:618)
      at com.xmportal.struts.X2AProcessBridgeAction.executeLogic(X2AProcessBridgeAction.java:864)
      at org.apache.struts.scaffold.BaseHelperAction.executeLogic(Unknown Source)
      at com.xmportal.struts.X2AProcessBridgeAction.execute(X2AProcessBridgeAction.java:886)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      ...
  </code></pre>
  
  <p>I am getting error in this object only in X2AProcessBridgeAction</p>
  
  <pre><code> try {
              X2AFormBase passedForm = (X2AFormBase) form;
              String loginKeyVal= passedForm.getLoginKey();           
                  passedForm.set(bean);
              } catch (Exception e) {             
                  e.printStackTrace();            
  
              }
  </code></pre>