Announcement Announcement Module
Collapse
No announcement yet.
cvc-elt.1: Cannot find the declaration of element 'beans' Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • cvc-elt.1: Cannot find the declaration of element 'beans'

    Hello all,
    I just pulled down Spring 2.0.1 and created a quick application context file. Unfortunately, whenever I attempt to run my test application, I receive the following error:

    Line 6 in XML document from class path resource [ApplicationContext.xml] is invalid;
    ...
    org.xml.sax.SAXParseException: cvc-elt.1: CAnnot find the declaration of element 'beans'

    This is what the relevant portion of my xml file looks like:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance"
              xsi:schemaLocation="
              http://www.springframework.org/schema/beans
              http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
    spring.schema in the spring.jar file contains the correct references for forwarding the http request to the local resource in the jar file. For whatever reason though, that appears to not be happening. Advice welcome as I'm not quite sure what the cause is at this point - bear in mind that this is on an isolated lan without outside connectivity (although that shouldn't matter).

    thanks very much!
    Last edited by cmose; Jan 26th, 2007, 09:08 AM.

  • #2
    Code:
    xmlns="http://www.springframework.org/schmea/beans
    schmea != schema

    Comment


    • #3
      if only it were that simple ;-)

      that's just a typo as I had to type the portion of the config file and the error message in (it's on a different system so I couldn't copy and paste). Good catch though and thanks for the effort.

      Comment


      • #4
        Originally posted by cmose View Post
        if only it were that simple ;-)

        that's just a typo as I had to type the portion of the config file and the error message in (it's on a different system so I couldn't copy and paste). Good catch though and thanks for the effort.
        Ah ok :P

        And shouldn't this:
        Code:
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance"
        be with a lowercase 'instance':
        Code:
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        When I check the url in a browser it seems to be case sensitive

        Comment


        • #5
          well sonofagun, I guess I'll wear the dunce cap for today - that was a typo in the actual xml file and it appears to have solved that problem. Thanks much, good eyes (better then mine at least ;-) ) - I could have sworn I checked and triple checked that too.

          Comment


          • #6
            Originally posted by cmose View Post
            well sonofagun, I guess I'll wear the dunce cap for today - that was a typo in the actual xml file and it appears to have solved that problem. Thanks much, good eyes (better then mine at least ;-) ) - I could have sworn I checked and triple checked that too.
            No problem

            At least you'll probably never going to make this mistake again :P

            Comment

            Working...
            X