org.hibernate.InstantiationException: No default constructor for entity: com.company.model.arts.CustomerAffiliationId

Terracotta | bradrust | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    hib InstantiationException in PojoInitializer during stress testing

    Terracotta | 6 years ago | bradrust
    org.hibernate.InstantiationException: No default constructor for entity: com.company.model.arts.CustomerAffiliationId

    Root Cause Analysis

    1. org.hibernate.InstantiationException

      No default constructor for entity: com.company.model.arts.CustomerAffiliationId

      at org.hibernate.tuple.PojoInstantiator.instantiate()
    2. Hibernate
      ManyToOneType.assemble
      1. org.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:107)
      2. org.hibernate.tuple.component.AbstractComponentTuplizer.instantiate(AbstractComponentTuplizer.java:102)
      3. org.hibernate.type.ComponentType.instantiate(ComponentType.java:510)
      4. org.hibernate.type.ComponentType.instantiate(ComponentType.java:516)
      5. org.hibernate.type.ComponentType.assemble(ComponentType.java:565)
      6. org.hibernate.type.ManyToOneType.assembleId(ManyToOneType.java:257)
      7. org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:241)
      7 frames
    3. Hibernate
      PersistentSet.isEmpty
      1. org.hibernate.collection.PersistentSet.initializeFromCache(PersistentSet.java:147)
      2. org.hibernate.cache.entry.CollectionCacheEntry.assemble(CollectionCacheEntry.java:58)
      3. org.hibernate.event.def.DefaultInitializeCollectionEventListener.initializeCollectionFromCache(DefaultInitializeCollectionEventListener.java:159)
      4. org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:71)
      5. org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1853)
      6. org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:369)
      7. org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:111)
      8. org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:134)
      9. org.hibernate.collection.PersistentSet.isEmpty(PersistentSet.java:169)
      9 frames
    4. com.company.service
      CustomerManagerImpl.convertToCustDTO
      1. com.company.service.impl.CustomerManagerImpl.convertToCustDTO(CustomerManagerImpl.java:819)
      1 frame