3 Replies Latest reply on Jun 30, 2004 10:47 AM by Sridhar Manickam

    ConcurrentModificationException with CMP

    Sridhar Manickam Newbie

      Hi
      Iam using 3.2.4. Have a simple EntityBean CMP 2 spec. Trying to exercise the findAll method on the LocalHome interface in the bean. I get a ConcurrentModificationException thrown. Bean deploys fine and all.

      ejb-jar.xml


      <query-method>
      <method-name>findAll</method-name>
      <method-params/>
      </query-method>
      <ejb-ql>[CDATA[
      SELECT OBJECT(g)
      FROM GROUP_MODEL g
      ]]</ejb-ql>


      try {
      GroupLocalHome home = SubnetEntityHomeLookupUtils.getGroupLocalHome();

      Collection col = home.findAll();
      Iterator it = col.iterator();
      while(it.hasNext()){
      GroupLocal grp = (GroupLocal) it.next(); // Exception thrown here
      }catch(Exception e) {}

      Thanks,
      -Sridhar