org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [spring-beans/akura-dataSource-bean.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [spring-beans/akura-dataSource-bean.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: Java heap space

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
via oracle.com by Unknown author

An easy way to solve OutOfMemoryError in java is to increase the maximum heap size by using JVM options -Xmx512M, this will immediately solve your OutOfMemoryError.

,
via Stack Overflow by Eugene Yokota

In Eclipse : go to Run --> Run Configurations --> then select the project under maven build --> then select the tab "JRE" --> then enter -Xmx1024m.

This should increase the memory heap for all the builds/projects. The above memory size is 1 GB.

Solutions on the web

via Stack Overflow by Asmaa Samir
, 1 year ago
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [spring-beans/akura-dataSource-bean.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: Java heap space
via cyclos.org by Unknown author, 1 year ago
/driverCore.xml]: Cannot resolve reference to bean 'engine' while setting bean property 'driverEngine'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'engine' defined in class path resource [nl
via cyclos.org by Unknown author, 2 years ago
Error creating bean with name 'driverServiceImpl' defined in class path resource [nl/strohalm/cyclos/driver/spring/driverCore.xml]: Cannot resolve reference to bean 'engine' while setting bean property 'driverEngine'; nested exception is
via cyclos.org by Unknown author, 2 years ago
Error creating bean with name 'driverServiceLocalLocator' defined in class path resource [nl/strohalm/cyclos/driver/spring/driverCore.xml]: Cannot resolve reference to bean 'driverServiceImpl' while setting bean property 'driverWebService'; nested
via cyclos.org by Unknown author, 1 year ago
Error creating bean with name 'driverServiceLocalLocator' defined in class path resource [nl/strohalm/cyclos/driver/spring/driverCore.xml]: Cannot resolve reference to bean 'driverServiceImpl' while setting bean property 'driverWebService'; nested
via Coderanch by vamsi naki, 1 year ago
Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'myDataSource' while setting bean property 'dataSource'; nested exception is
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2367)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415)
at java.lang.StringBuffer.append(StringBuffer.java:237)
at org.hibernate.sql.DisjunctionFragment.addCondition(DisjunctionFragment.java:37)
at org.hibernate.loader.JoinWalker.whereString(JoinWalker.java:959)
at org.hibernate.loader.entity.EntityJoinWalker.(EntityJoinWalker.java:70)
at org.hibernate.loader.entity.EntityLoader.(EntityLoader.java:109)
at org.hibernate.loader.entity.EntityLoader.(EntityLoader.java:71)
at org.hibernate.loader.entity.BatchingEntityLoader.createBatchingEntityLoader(BatchingEntityLoader.java:128)
at org.hibernate.persister.entity.AbstractEntityPersister.createEntityLoader(AbstractEntityPersister.java:1914)
at org.hibernate.persister.entity.AbstractEntityPersister.createEntityLoader(AbstractEntityPersister.java:1937)
at org.hibernate.persister.entity.AbstractEntityPersister.createLoaders(AbstractEntityPersister.java:3205)
at org.hibernate.persister.entity.AbstractEntityPersister.postInstantiate(AbstractEntityPersister.java:3191)
at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:348)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:860)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:779)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)

Users with the same issue

2 times, 6 days ago
3 times, 1 month ago
Once, 2 months ago
Once, 2 months ago
2 times, 3 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.