org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultGrailslongConverter': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.web.servlet.LocaleResolver org.grails.databinding.converters.web.LocaleAwareNumberConverter.localeResolver; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateDatastore': Cannot resolve reference to bean 'sessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.spi.CacheImplementor]

GitHub | zyro23 | 1 week ago
  1. 0
    Spring expects that the EntityManagerFactory has to be called "entityManagerFactory". It uses convention over configuration to make it easier to use.
  2. 0
    Check Servers Launch Configuration in Eclipse. See the details below.
  3. 0
    Add slf4j dependency to your pom.xml
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    Typo in the name of the bean in the beans.xml
    via spring.io
  6. 0
    You need to deploy aspectJ (aspectjweaver.jar) together with your application. Add it to your pom.xml

    7 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. net.sf.ehcache.CacheException

      Another unnamed CacheManager already exists in the same VM. Please provide unique names for each CacheManager in the config or do one of following: 1. Use one of the CacheManager.create() static factory methods to reuse same CacheManager with same name or create one if necessary 2. Shutdown the earlier cacheManager before creating new one with same name. The source of the existing CacheManager is: DefaultConfigurationSource [ ehcache.xml or ehcache-failsafe.xml ]

      at net.sf.ehcache.CacheManager.assertNoCacheManagerExistsWithSameName()
    2. Ehcache
      CacheManager.<init>
      1. net.sf.ehcache.CacheManager.assertNoCacheManagerExistsWithSameName(CacheManager.java:628)
      2. net.sf.ehcache.CacheManager.init(CacheManager.java:392)
      3. net.sf.ehcache.CacheManager.<init>(CacheManager.java:270)
      3 frames
    3. A Hibernate O/RM Module
      EhCacheRegionFactory.start
      1. org.hibernate.cache.ehcache.EhCacheRegionFactory.start(EhCacheRegionFactory.java:86)
      1 frame
    4. Hibernate
      Configuration.buildSessionFactory
      1. org.hibernate.internal.CacheImpl.<init>(CacheImpl.java:70)
      2. org.hibernate.engine.spi.CacheInitiator.initiateService(CacheInitiator.java:40)
      3. org.hibernate.engine.spi.CacheInitiator.initiateService(CacheInitiator.java:35)
      4. org.hibernate.service.internal.SessionFactoryServiceRegistryImpl.initiateService(SessionFactoryServiceRegistryImpl.java:91)
      5. org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:251)
      6. org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:225)
      7. org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
      8. org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:273)
      9. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859)
      9 frames
    5. Grails GORM
      HibernateMappingContextSessionFactoryBean.afterPropertiesSet
      1. org.grails.orm.hibernate.cfg.HibernateMappingContextConfiguration.buildSessionFactory(HibernateMappingContextConfiguration.java:196)
      2. org.grails.orm.hibernate.HibernateMappingContextSessionFactoryBean.doBuildSessionFactory(HibernateMappingContextSessionFactoryBean.java:476)
      3. org.grails.orm.hibernate.HibernateMappingContextSessionFactoryBean.buildSessionFactory(HibernateMappingContextSessionFactoryBean.java:470)
      4. org.grails.orm.hibernate.HibernateMappingContextSessionFactoryBean.afterPropertiesSet(HibernateMappingContextSessionFactoryBean.java:93)
      4 frames
    6. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1641)
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      5. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      6. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      7. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      8. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      9. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
      10. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
      11. org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)
      12. org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:140)
      13. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1147)
      14. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050)
      15. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getSingletonFactoryBeanForTypeCheck(AbstractAutowireCapableBeanFactory.java:869)
      16. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:796)
      17. org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:544)
      18. org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:449)
      19. org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:425)
      20. org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:220)
      21. org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1184)
      22. org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1123)
      23. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1021)
      24. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
      25. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
      26. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
      27. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1218)
      28. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
      29. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      30. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      31. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      32. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      33. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      34. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:778)
      34 frames
    7. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
      2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
      2 frames
    8. Grails
      TestRuntime.getValue
      1. grails.test.runtime.GrailsApplicationTestPlugin.createMainContext(GrailsApplicationTestPlugin.groovy:127)
      2. grails.test.runtime.GrailsApplicationTestPlugin.initGrailsApplication(GrailsApplicationTestPlugin.groovy:90)
      3. grails.test.runtime.GrailsApplicationTestPlugin.onTestEvent(GrailsApplicationTestPlugin.groovy:343)
      4. grails.test.runtime.TestRuntime.deliverEvent(TestRuntime.groovy:295)
      5. grails.test.runtime.TestRuntime.executeEventLoop(TestRuntime.groovy:280)
      6. grails.test.runtime.TestRuntime.processEvents(TestRuntime.groovy:265)
      7. grails.test.runtime.TestRuntime.doPublishEvent(TestRuntime.groovy:238)
      8. grails.test.runtime.TestRuntime.publishEvent(TestRuntime.groovy:211)
      9. grails.test.runtime.TestRuntime.getValue(TestRuntime.groovy:122)
      9 frames
    9. grails.buildtestdata.mixin
      BuildTestDataTestPlugin.onTestEvent
      1. grails.buildtestdata.mixin.BuildTestDataTestPlugin.beforeClass(BuildTestDataTestPlugin.groovy:35)
      2. grails.buildtestdata.mixin.BuildTestDataTestPlugin.onTestEvent(BuildTestDataTestPlugin.groovy:19)
      2 frames
    10. Grails
      TestRuntimeJunitAdapter$3$4.evaluate
      1. grails.test.runtime.TestRuntime.deliverEvent(TestRuntime.groovy:295)
      2. grails.test.runtime.TestRuntime.processEvents(TestRuntime.groovy:264)
      3. grails.test.runtime.TestRuntime.doPublishEvent(TestRuntime.groovy:248)
      4. grails.test.runtime.TestRuntime.publishEvent(TestRuntime.groovy:211)
      5. grails.test.runtime.TestRuntimeJunitAdapter.beforeClass(TestRuntimeJunitAdapter.groovy:117)
      6. grails.test.runtime.TestRuntimeJunitAdapter$3$4.evaluate(TestRuntimeJunitAdapter.groovy:71)
      6 frames
    11. Spock Framework - Core Module
      MethodInvocation.proceed
      1. org.spockframework.runtime.extension.builtin.ClassRuleInterceptor.intercept(ClassRuleInterceptor.java:38)
      2. org.spockframework.runtime.extension.MethodInvocation.proceed(MethodInvocation.java:87)
      2 frames
    12. org.gradle.api
      SuiteTestClassProcessor.processTestClass
      1. org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:114)
      2. org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:57)
      3. org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:66)
      4. org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
      4 frames
    13. org.gradle.internal
      ProxyDispatchAdapter$DispatchingInvocationHandler.invoke
      1. org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
      2. org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
      3. org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
      4. org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
      4 frames
    14. org.gradle.api
      TestWorker.processTestClass
      1. org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:109)
      1 frame
    15. org.gradle.internal
      MessageHub$Handler.run
      1. org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
      2. org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
      3. org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:377)
      3 frames
    16. Gradle Core
      StoppableExecutorImpl$1.run
      1. org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
      2. org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
      2 frames
    17. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      3. java.lang.Thread.run(Thread.java:745)
      3 frames