wood burning stoves 2.0*
The moose likes Spring and the fly likes Error:  ERROR  initServletBean, Context initialization failed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Error:  ERROR  initServletBean, Context initialization failed" Watch "Error:  ERROR  initServletBean, Context initialization failed" New topic
Author

Error: ERROR initServletBean, Context initialization failed

priyanka kulathilaka
Ranch Hand

Joined: Apr 13, 2011
Posts: 36


Priyanka Kulathilaka
Software Engineer - Java
Sri Lanka
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 507

Can you paste your spring-servlet.xml and the list of jar files you are deploying?


Regards, Prasad
SCJP 5 (93%)
priyanka kulathilaka
Ranch Hand

Joined: Apr 13, 2011
Posts: 36
Tommy Delson
Ranch Hand

Joined: Apr 13, 2011
Posts: 206
You're pasting a pom.xml file not the xlm file that you need for trouble shooting.

Basically an error "2011-07-14 14:48:54.576:INFO::No Transaction manager found - if your webapp requires one, please configure one." indicated that you're missing an application-context.xml file where you configure your app to connect with the data source and handle the transaction.

You need to have application-context.xml file, if you don't have one you need to create one. Refer to Spring reference of how to create one and configure. Below is an example that some information that you need to configure in the file.


For example,




Hope it help...

OCPJP6-05-11
"Your life is in your hands, to make of it what you choose."
priyanka kulathilaka
Ranch Hand

Joined: Apr 13, 2011
Posts: 36
thanks tommy.,

here is my spring-servlet.xml


& here is my web.xml

Tommy Delson
Ranch Hand

Joined: Apr 13, 2011
Posts: 206
I see there many problems in your spring-servlet.xml file, problems are on bean id="sessionFactory" , you didn't configure it probably. Therefore, it didn't load the information it looking when your run the app. It can easily fixed, refer to Spring document and other sources how to config it probably.

I recommend create a new separate xml file called applicationContext.xml for easy maintenance, wire it in web.xml along spring-servlet.xml. Moreover, refer to Spring document for more info on how to configure.

See my comments below for troubleshooting...



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error: ERROR initServletBean, Context initialization failed
 
Similar Threads
org.springframework.web.context.ContextLoader - Context initialization failed
Provider for javax.xml.parsers.DocumentBuilderFactory cannot be found
Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException
Getting error----NoContextLoaderListener registered
Error in adding Spring security