File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot find the declaration of element 'beans'

 
Jayavardhan geepi
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic