title: Hibernate throwing ConcurrentModificationException with an embedded ElementCollection
body: <p>I'm running Hibernate 4.2.6.Final / JPA2 and trying to have an @ElementCollection List of @Embeddable objects which themselves contain an @ElementCollection List of String.</p>
  
  <p>However, hibernate is throwing a ConcurrentModificationException when trying to instantiate the EntityManager, which I do not understand at all.</p>
  
  <p>If I comment out my <code>List&lt;Address&gt;</code> in <code>User</code>, everything runs properly.  Similarly, if I comment out the <code>List&lt;String&gt; street</code> in <code>Address</code>, everything launches properly as well.  I am presuming it has something to do with an ElementCollection having its own embedded ElementCollection.  </p>
  
  <pre><code>public class User {
  
      @TableGenerator( name="UUIDGenerator", pkColumnValue="user_id", table="uuid_generator", allocationSize=1)
      @Id
      @GeneratedValue(strategy = GenerationType.TABLE, generator="UUIDGenerator")
      @Column(name = "id")
      private Long id;
  
      /**
       * Login username
       */
      @NotNull
      private String username;
  
      /**
       * Password in encrypted format
       */
      private String password;
      /**
       * Address
       */
      @Valid
      @ElementCollection(fetch=FetchType.LAZY)
      @CollectionTable(name="user_address", joinColumns=@JoinColumn(name = "user_id", referencedColumnName = "id"))
      @OrderColumn
      private List&lt;Address&gt; address;
  
     // getters and setters omitted for brevity
  }
  
  
  @Embeddable
  public class Address {
  
      /**
       * Multiple street lines allowable
       */
      @NotBlank
      @ElementCollection(targetClass=String.class, fetch=FetchType.LAZY)
      @CollectionTable( joinColumns=@JoinColumn(name = "address_id", referencedColumnName = "id"))
      @OrderColumn
      private List&lt;String&gt; street;
  
      /**
       * City
       */
      private String city;
  
      /**
       * State/Province
       */
      private String state;
  
      /**
       * Country
       */
      private String country;
  
      // getters and setters omitted for brevity
  }
  
  
  Caused by: java.util.ConcurrentModificationException
      at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:859)
      at java.util.ArrayList$Itr.remove(ArrayList.java:845)
      at org.hibernate.cfg.Configuration.originalSecondPassCompile(Configuration.java:1633)
      at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1390)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1777)
      at org.hibernate.ejb.EntityManagerFactoryImpl.&lt;init&gt;(EntityManagerFactoryImpl.java:96)
      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)
      at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:76)
      at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:288)
      at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1541)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479)
      ... 40 more
  </code></pre>
  
  <p>Am I not allowed having an embedded class have its own <code>@ElementCollection</code>? Is this not allowed?  How do I do this otherwise?</p>