• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Peter Rooke
  • Himai Minh
Bartenders:
  • Piet Souris
  • Mikalai Zaikin

spring mvc annotation error

 
Greenhorn
Posts: 14
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am developing an application in spring mvc and hibernate. The error arose when I used validations using annotations. It's in the dispatcher-servlet. I can't figure out the error please help me.

error: Multiple annotations found at this line: - cvc-complex-type.2.3: Element 'beans' cannot have character [children], because the type's content type is element-only.

here's my xml:

 
Ranch Hand
Posts: 277
Oracle Spring Flex
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the slash '/' on line 24 given by mistake.
 
soumya dash
Greenhorn
Posts: 14
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ashwin Sridhar wrote:Is the slash '/' on line 24 given by mistake.


ohh yes.. i didn't see dat...i thnk now this wil work..thnks for pointing
 
soumya dash
Greenhorn
Posts: 14
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
now i got this following error:


Context initialization failed: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/mvc]
Offending resource: ServletContext resource [/WEB-INF/dispatcher-servlet.xml]
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Just to be clear is the xml you have posted your /WEB-INF/dispatcher-servlet.xml? That is the one causing the problem so make sure the spring mvc namespace is declared there.
2. After you have tried #1, What version of Spring do you have on your classpath? You are specifying 3.0 in your XSD.
3. Are you building your project with Maven? Make sure you are not pulling in multiple versions of Spring. Try running a mvn dependency:tree from the command line and make sure all the Spring versions look correct and you are not pulling in old versions as transitive dependencies.
 
Would you like to try a free sample? Today we are featuring tiny ads:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic