org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': 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': Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

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 Stack Overflow by dereck

Add localDataSource="true" to the realm when using local database.

,
via Stack Overflow by john

Make sure you use the same name for your database everywhere in context.xml.

Solutions on the web

via nabble.com by Unknown author, 1 year ago
property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
via GitHub by graemerocher
, 2 years ago
Error creating bean with name 'filterInvocationInterceptor': Cannot resolve reference to bean 'objectDefinitionSource' while setting bean property 'objectDefinitionSource'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'objectDefinitionSource' is defined
via Stack Overflow by Asaf
, 2 years ago
Error creating bean with name 'upaySite': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Name upaySite is not bound in this Context
via Stack Overflow by bitbucket
, 2 years ago
Error creating bean with name 'compassGps': Cannot resolve reference to bean 'compass' while setting bean property 'compass'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'compass
via gmane.org by Unknown author, 2 years ago
Error creating >> bean with name 'entityManagerFactory': Invocation of init method failed; >> nested exception is javax.persistence.PersistenceException: >> [PersistenceUnit: >> manager] class or package not found
via nabble.com by Unknown author, 1 year ago
Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:135)
at grails.web.container.EmbeddableServer$start$0.call(Unknown Source)
at grails.web.container.EmbeddableServer$start$0.call(Unknown Source)
at undefined._GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:158)
at undefined._GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy)
at undefined._GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:287)
at undefined._GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
at undefined._GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149)
at undefined._GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy)
at undefined._GrailsRun_groovy.runInline(_GrailsRun_groovy:115)
at undefined._GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy)
at undefined._GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59)
at undefined._GrailsRun_groovy$_run_closure8_closure14.doCall(_GrailsRun_groovy:257)
at undefined._GrailsRun_groovy$_run_closure8_closure14.doCall(_GrailsRun_groovy)
at undefined._GrailsPackage_groovy$_run_closure8.doCall(_GrailsPackage_groovy:293)
at undefined._GrailsPackage_groovy$_run_closure8.call(_GrailsPackage_groovy)
at undefined._GrailsRun_groovy$_run_closure8.doCall(_GrailsRun_groovy:242)
at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:344)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:334)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.processTargets(Gant.groovy:495)
at gant.Gant.processTargets(Gant.groovy:480)

Users with the same issue

2 times, 2 months ago
6 times, 6 months ago
Once, 10 months ago
Once, 11 months ago
2 times, 1 year ago

Write tip

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