org.springframework.dao.InvalidDataAccessApiUsageException

Object: com.test.domain.Motorist@83b1b is not a known entity type.; nested exception is java.lang.IllegalArgumentException: Object: com.test.domain.Motorist@83b1b is not a known entity type.

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Stack trace

  • org.springframework.dao.InvalidDataAccessApiUsageException: Object: com.test.domain.Motorist@83b1b is not a known entity type.; nested exception is java.lang.IllegalArgumentException: Object: com.test.domain.Motorist@83b1b is not a known entity type. at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:271) at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:120) at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:212) at org.springframework.orm.jpa.JpaAccessor.translateIfNecessary(JpaAccessor.java:152) at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:189) at org.springframework.orm.jpa.JpaTemplate.persist(JpaTemplate.java:266) at com.test.dao.impl.JpaRantDao.saveMotorist(JpaRantDao.java:25) at com.test.CreateBean.create(CreateBean.java:20) at com.test.Main.main(Main.java:14) Caused by: java.lang.IllegalArgumentException: Object: com.test.domain.Motorist@83b1b is not a known entity type. at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:3820) at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:219) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:358) at $Proxy9.persist(Unknown Source) at org.springframework.orm.jpa.JpaTemplate$5.doInJpa(JpaTemplate.java:268) at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:184) ... 4 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,