3 Replies Latest reply on Feb 9, 2006 12:02 AM by gus888

    Urgent help!!!

    gus888

      Hi

      I recently got a very boring problem. I use JSF and EJB3. A super entity bean A, and sub entity bean B extends A. When I submit data from JSF page to the B (throug a manage session bean), it works. However, when I submit data from JSF page to the A, I always get the "Error during model data update." errors on each field. I struggled several days, but I still did not get anwser(I am new on EJB). I sincerely appreciate any helps. Thank you in advance.

      GUS

      ============================================
      @Entity
      @Table(name="a")
      @Inheritance(strategy = InheritanceType.JOINED)
      public class A implements Serializable {
      }

      @Entity
      @Table(name="b")
      @Inheritance(strategy = InheritanceType.JOINED)
      public class B extends A {
      }

        • 1. Re: Urgent help!!!

          not enough info ... provide an exception trace or something ...

          • 2. Re: Urgent help!!!
            chrismalan

            Just maybe this may help.

            In your case B is A (has access to all methods and fields of A), but A is not B. A has only access to its own methods and fields. Trying to use methods and access fields of B through A will not work, although the opposite will.

            • 3. Re: Urgent help!!!
              gus888

              Thank you so much, all.

              I just found the bug. I did not define A (new A() in my managed session bean. Since I use jsf, myfaces, myfaces tiles and ejb3, I thought it was very difficult to debug. Now, I just realized I forgot to define the entity bean.

              Thanks again for your response and help!

              Sheng