Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-14480

[GSS](7.1.z) HHH-12226: EntityNotFoundException for lazy OneToOne association using a derived key

XMLWordPrintable

    • EAP 7.1.3

      An entity is defined with an optional unidirectional OneToOne lazy association making the primary key a derived key. If the associated row (corresponding to the derived primary key value) does not exist, calling the association accessor method results in an exception:

      ... Unable to find <entity_type_here> with <key_name_here> <value_here>: javax.persistence.EntityNotFoundException: Unable to find <entity_type_here> with <key_name_here> <value_here>
          at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$JpaEntityNotFoundDelegate.handleEntityNotFound(EntityManagerFactoryBuilderImpl.java:145)
          at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227)
          ...
          at org.hibernate.bytecode.enhance.spi.interceptor.LazyAttributeLoadingInterceptor.intercept(LazyAttributeLoadingInterceptor.java:61)
          at org.hibernate.bytecode.enhance.spi.interceptor.LazyAttributeLoadingInterceptor.readObject(LazyAttributeLoadingInterceptor.java:296)
          ...
      

            gbadner@redhat.com Gail Badner (Inactive)
            rhn-support-sfikes Stephen Fikes (Inactive)
            Jiří Bílek Jiří Bílek (Inactive)
            Jiří Bílek Jiří Bílek (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: