6 Replies Latest reply on Jun 25, 2004 4:53 AM by Alexey Loubyansky

    Remote / Local Mismatch

    snavjot Newbie

      hi,

      I have 2 entities CustomerLogin and CustomerProfile wth 1:N relation. Both local and remote interfaces are generated for them.

      ServiceLocator locator = ServiceLocator.getInstance();
      CustomerProfileHome cpHome = (CustomerProfileHome) locator.getHome(CustomerProfileHome.JNDI_NAME, CustomerProfileHome.class);

      try{
      CustomerProfile cp = cpHome.create(cpvo);
      getCustomerProfiles().add(cp); // exception line
      }

      This is my CustomerLogin bean, when i create new CustomerProfile and try to add. it throws the following error.
      I have created a REMOTE CustomerProfile. Then why is it expecting a LOCAL CustomerProfile??? Any clues.

      BTW, the getCustomerProfiles() return empty collection in this case.


      Caused by: java.lang.IllegalArgumentException: Object must be an instance of com.fz.customer.interfaces.CustomerProfileLocal, but is an isntance of [com.fz.customer.interfaces.CustomerProfile]
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.RelationSet.add(RelationSet.java:117)

      TIA
      Navjot Singh
      Jboss 3.2.3