[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

BootstrapException in Springs

Posted on 2013-12-17
5
Medium Priority
?
913 Views
Last Modified: 2014-01-04
Hi,
 
I am getting the following exception, I am not able to figure out the reason. I have been trying for hours. Can anybody please give me some guidance about what could be the possible reasons..


Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'common-context-production' defined in URL [wsjar:file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/profiles/AppSrv02/installedApps/NGEN-JAVA793Node02Cell/Enrollment_ear.ear/lib/Common-18.0.7-SNAPSHOT.jar!/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'qualifyingEventCodesDao': Invocation of init method failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
0
Comment
Question by:srikotesh
  • 3
  • 2
5 Comments
 
LVL 2

Author Comment

by:srikotesh
ID: 39724398
please see the below lines also

org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [common-context-production], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'common-context-production' defined in URL [wsjar:file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/profiles/AppSrv02/installedApps/NGEN-JAVA793Node02Cell/Enrollment_ear.ear/lib/Common-18.0.7-SNAPSHOT.jar!/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'qualifyingEventCodesDao': Invocation of init method failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 900 total points
ID: 39724645
Error creating bean with name 'qualifyingEventCodesDao': Invocation of init method failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query 

Open in new window


looks like the cuplrit. Check the bean and its persistence (general advice as i don't do Spring)
0
 
LVL 2

Author Comment

by:srikotesh
ID: 39728488
hi there is a problem in my websphere because i deployed my ear file in other machine its working fine so again i reinstalled my websphere in my machine and i redeployed its working fine thanks for ur suggestion
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39728671
Glad you got it working :)
0
 
LVL 2

Author Comment

by:srikotesh
ID: 39756987
yeah its working for me but that is not the correct solution.because every time we can't do re installation of websphere.same problem happens to another colleague also so we got the solution like

in web.xml file we need to change this line 'common-context-production'

as 'common-context-standalone'. if modify this line its working fine

may i know the reason for this exception how it is working if we make application as standalone?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month19 days, 3 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question