Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

BeanDefinitionStoreException when running Spring web app

 
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,

I am experiencing a BeanDefinitionStoreException when I try to invoke a web app that I built using Spring.

My environment:

-JDK 1.5
-Tomcat 5.5.9
-MyEclipse IDE plug-in
-Spring 1.2 Core Libraries (which comes bundled with MyEclipse)
-Spring 1.2 Web Libraries (which comes bundled in with MyEclipse; includes the spring-mvc.jar)

Here's some of my code details:

My applicationContext.xml file (located under the src dir):



My webShop-Servlet.xml file (located under WEB-INF ):



My web.xml file:



I use the exploded package option (hot deploy) when deploying the app. The MyEclipse plug-in gracefully places all the right jar files under /WEB-INF/lib.

Now, when I launch Firefox or Safari and point the browser to: http://localhost:8080/webshop/products.products

I receive this error message:



This error report is really annoying!

Any suggestions, help, and tips are greatly appreciated!

Many, many thanks!
[ October 15, 2006: Message edited by: Unnsse Khan ]
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The name of your Spring app is webShopApp :
<servlet-name>webShopApp</servlet-name>

So the web context file should be named webShopApp-servlet.xml.
But you've named it webShop-Servlet.xml.
Rename the file and restart.
 
Unnsse Khan
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Satou,

Thank you for the response...

I tried your suggestion and it still doesn't work...

Received a new error message:



I renamed webshop-Servlet.xml to webshopApp-servlet.xml and as you can see it threw this new error message of:



Inside the webShopApp-servlet.xml file:



Does anyone know what's wrong?
[ October 19, 2006: Message edited by: Unnsse Khan ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should try to read the content of error messages, that would save you some time. It clearly says that something is wrong at line 1 of your xml file. It is expecting a DOCTYPE. Like this :

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
....

</beans>
 
Unnsse Khan
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Satou,

Thanks for the help.

I actually figured that out by going through the Spring-MVC tutorial, just now...

The book I was using to create this webshop app didn't specify this so therefore I didn't know that I needed it, at the time.

Many, many thanks!
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Unnsse Khan wrote:Satou,

Thank you for the response...

I tried your suggestion and it still doesn't work...

Received a new error message:



I renamed webshop-Servlet.xml to webshopApp-servlet.xml and as you can see it threw this new error message of:



Inside the webShopApp-servlet.xml file:



Does anyone know what's wrong?
[ October 19, 2006: Message edited by: Unnsse Khan ]



Hi,

Due to jar files you are facing this problem
please add below line
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:flow="http://www.springframework.org/schema/webflow-config"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config-1.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">

if you are still facing the same problem add schema one by one..

Regards,
Raj
 
Don't listen to Steve. Just read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!