Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8929397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:39:52+00:00 2026-06-15T08:39:52+00:00

I am getting below error when running my application on apache tomcat. HTTP Status

  • 0

I am getting below error when running my application on apache tomcat.

HTTP Status 500 - Servlet.init() for servlet spring threw exception

root cause

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: 
Line 11 in XML document from ServletContext resource [/WEB-INF/spring-servlet.xml] is invalid;
 nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.

My spring-context.xml is this

            <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans http://java.sun.com/xml/ns/javaee" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xmlns:cotext="http://www.springframework.org/schema/context"
     xmlns:mvc="http://www.springframework.org/schema/mvc"
     xmlns:beans="http://www.springframework.org/schema/beans" 
     xsi:schemaLocation="http://www.springframework.org/schema/beans
                         http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                         http://www.springframework.org/schema/context
                         http://www.springframework.org/schema/context/spring-context-3.0.xsd
                         http://www.springframework.org/schema/mvc">

     <mvc:annotation-driven/>
     <cotext:component-scan base-package="springmvc"/>   

I’ve tried https://jira.springsource.org/browse/SPR-3372 with no luck.

please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:39:54+00:00Added an answer on June 15, 2026 at 8:39 am

    Few things looks off to me:

    1) You have to remove ” http://java.sun.com/xml/ns/javaee” in xmlns attribute. I think this is the main problem here. “xmlns” attribute can’t take multiple URIs according to spec:
    http://www.w3schools.com/xml/xml_namespaces.asp

    2) Some XML libraries don’t like the spaces in the beginning of XML file in front of (in particular Eclipse will complain)

    3) xsi:schemaLocation value is missing location URI for mvc. It should probably look like this:

     xsi:schemaLocation="http://www.springframework.org/schema/beans
                   http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                   http://www.springframework.org/schema/context
                   http://www.springframework.org/schema/context/spring-context-3.0.xsd
                   http://www.springframework.org/schema/mvc
                   http://www.springframework.org/schema/context/spring-mvc-3.0.xsd">
    

    You can as well remove extra “beans” declaration as previous answer suggests, unless you really want to use “beans” namespace prefix for some reason.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

while running: rake snorby:setup getting below error: rake aborted! You have already activated rake
When running IIS, I'm getting the below error on all ASPX pages. ASP.NET is
I am getting the below error when executing my application on a Windows XP
I am getting following error while running my application which is asp.net. Server Error
While running unit tests, I'm getting the MDA shown below. In the error message,
I am getting an unusual error while running my application, just wondering if anyone
I'm getting the below linkage error in a NetBeans Platform application where I call
While running my application i am getting the below given warning and application went
I'm getting the error below when calling a simple SP from the Rational Application
I'm getting the below error in a Magento PHP file running a CREATE TABLE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.