• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Cannot find the declaration of element 'beans'

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using Spring3.1.1 and in config file I'm using below namespace declarations.

But if I change the xsd value to 'spring-beans-2.5.xsd ' (in xsi:schemaLocation) it works fine.
But not with spring-beans-3.1.xsd.
Can someone please help? I'm using eclipse.

Thanks
 
Jayavardhan geepi
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry. Found out the issue.
I had spring jars of version 2.5.6 on classpath and not 3.1.1.
After addding 3.1.1 jar to classpath, its resolved.
Thanks
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is why I never put the version number with the xsd in schemaLocation, so that there won't ever be errors. It will just take the highest version of the xsd that is in the classpath.

So I would just put

xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd"

Mark
reply
    Bookmark Topic Watch Topic
  • New Topic