java.lang.IllegalStateException

Failed to execute CommandLineRunner

Samebug tips0

We couldn't find tips for this exception.

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

Solutions on the web39

Stack trace

  • java.lang.IllegalStateException: Failed to execute CommandLineRunner at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:779)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE] at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:760)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE] at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:747)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE] at meinpro.MeinproApplication.main(MeinproApplication.java:30)[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_121] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_121] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_121] at java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_121] at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)[spring-boot-devtools-1.5.1.RELEASE.jar:1.5.1.RELEASE] Caused by: org.springframework.orm.jpa.JpaSystemException: ids for this class must be manually assigned before calling save(): meinpro.entiti.Compte; nested exception is org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): meinpro.entiti.Compte at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:333)[spring-orm-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:244)[spring-orm-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:491)[spring-orm-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:59)[spring-tx-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)[spring-tx-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:147)[spring-tx-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:133)[spring-data-jpa-1.11.0.RELEASE.jar:na] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)[spring-aop-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:57)[spring-data-commons-1.13.0.RELEASE.jar:na] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)[spring-aop-4.3.6.RELEASE.jar:4.3.6.RELEASE] at com.sun.proxy.$Proxy86.save(Unknown Source)[na:na] at meinpro.MeinproApplication.run(MeinproApplication.java:38)[classes/:na] at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:776)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE] ... 11 more Caused by: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): meinpro.entiti.Compte at org.hibernate.id.Assigned.generate(Assigned.java:34)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.jpa.event.internal.core.JpaPersistEventListener.saveWithGeneratedId(JpaPersistEventListener.java:67)[hibernate-entitymanager-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:189)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:132)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:58)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:775)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:748)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:753)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1146)[hibernate-entitymanager-5.0.11.Final.jar:5.0.11.Final] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_121] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_121] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_121] at java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_121] at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:298)[spring-orm-4.3.6.RELEASE.jar:4.3.6.RELEASE] at com.sun.proxy.$Proxy82.persist(Unknown Source)[na:na] at org.springframework.data.jpa.repository.support.SimpleJpaRepository.save(SimpleJpaRepository.java:508)[spring-data-jpa-1.11.0.RELEASE.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_121] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_121] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_121] at java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_121] at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:504)[spring-data-commons-1.13.0.RELEASE.jar:na] at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:489)[spring-data-commons-1.13.0.RELEASE.jar:na] at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:461)[spring-data-commons-1.13.0.RELEASE.jar:na] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61)[spring-data-commons-1.13.0.RELEASE.jar:na] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)[spring-tx-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)[spring-tx-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)[spring-tx-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)[spring-tx-4.3.6.RELEASE.jar:4.3.6.RELEASE] ... 22 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,
smyrgeorgesmyrgeorge
Once,
Unknown visitor
Unknown visitorOnce,
8 more bugmates