Announcement Announcement Module
Collapse
No announcement yet.
Attribute "abstract" must be declared for element Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Attribute "abstract" must be declared for element

    Using Spring IDE Beans Configuration Support 1.0.3 and Spring 1.1.1.
    I have the following bean definition:
    Code:
    <bean id="daoParent" abstract="true">
    	<property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>
    Spring Beans consistently tells me:
    Code:
    Attribute "abstract" must be declared for element type "bean".
    The actual ApplicationContext loads up fine.

    Any idea what Spring Beans is expecting here?

    Best regards,
    Assaf

  • #2
    The notion of abstract beans is a quite recent addition in Spring (version 1.1 I think).
    I would guess the spring-jar within Spring-Ide is older (as is the included DTD). So the validation seems to fail. The code however should work.

    Hoping for an update :wink:
    Andreas

    Comment


    • #3
      The update of Spring IDE (which supports abstract beans too) is nearly finished. What we need is more testing.
      If you like to be bleeding edge you can give it a try. The update site (usable with Eclipse's update manager or as a local updatesite) is available here:

      http://springide-eclip.sourceforge.net/updatesite/

      But be aware it's a unreleased development version. For questions, bug reports, comments regarding this version please use the corresponding developer mailing list:

      http://lists.sourceforge.net/lists/l...clip-developer

      No support will be available for this development version on the official forum.

      Cheers,
      Torsten

      Comment


      • #4
        I tried but XML buddy editor still says abstract is invalid

        I tried but XML buddy editor still says abstract is invalid. Shows up find in the Spring Beans view however.

        Comment


        • #5
          DTD version?

          Is the your XML doctype declaration pointing to an older DTD version that does not support abstract beans? I am guessing that XML buddy is validating against the doctype DTD whereas Spring IDE is validating against the version in its internal copy of spring-core.jar.

          Derek Adams
          http://www.gaijin-studio.org

          (BTW, the 1.1.0 version of Spring IDE rocks! Great work! )

          Comment


          • #6
            Validation errors in Spring beans configuration files

            There are two reasons I can imagine for the persisting validation error:
            a) XMLBuddy keeps some sort of cache for DTDs it uses when offline. You will find it in your default Eclipse workspace directory under ../.metadata/.plugins/.com.objfac.xmleditor/.cache. If one of the Files in this directory contains the old spring-beans.dtd, then XMLBuddy stubbornly validates your document against this DTD.
            b) If the validation error is indicated by Spring-IDE, then it should disappear if you remove the document in question from the list of Spring bean configurations and revalidate the XML.

            Comment


            • #7
              Re: Validation errors in Spring beans configuration files

              If the problem marker was created by XmlBuddy then you can delete it by using XmlBuddy's menu entry "XML / Clear Validate".

              Cheers,
              Torsten

              Comment


              • #8
                Re: Validation errors in Spring beans configuration files

                Originally posted by arsenjew
                a) XMLBuddy keeps some sort of cache for DTDs it uses when offline. You will find it in your default Eclipse workspace directory under ../.metadata/.plugins/.com.objfac.xmleditor/.cache. If one of the Files in this directory contains the old spring-beans.dtd, then XMLBuddy stubbornly validates your document against this DTD.
                The file is encoded as a f + a number. You can find the DTD to filename mapping in meta.xml.
                Simply deleting the fn file doesn't work, and I didn't dare modifying meta.xml by hand, against XMLBuddy's explicit instructions.

                What I ended up doing was navigating to the DTD on the web, and replacing the contents of fn with the contents copied from the web, after which the XMLBuddy generated errors disappeared.

                Isn't there a nicer way to do this on XMLBuddy?
                Best regards,
                Assaf

                Comment


                • #9
                  Re: Validation errors in Spring beans configuration files

                  Originally posted by arsenjew
                  There are two reasons I can imagine for the persisting validation error:
                  a) XMLBuddy keeps some sort of cache for DTDs it uses when offline. You will find it in your default Eclipse workspace directory under ../.metadata/.plugins/.com.objfac.xmleditor/.cache. If one of the Files in this directory contains the old spring-beans.dtd, then XMLBuddy stubbornly validates your document against this DTD.
                  b) If the validation error is indicated by Spring-IDE, then it should disappear if you remove the document in question from the list of Spring bean configurations and revalidate the XML.
                  I had the same problem with the "abstract" beans. After refreshing XMLBuddy's DTD cache, the problem was still there. Procedure b) showed, that it was a problem of the Spring-IDE.
                  I found that the JAR file ...eclipse\plugins\org.springframework.core_1.0.2\ spring-core.jar contained an old spring-beans.dtd (from version 1.0.2). I replaced that with a current version, and the error vanished...

                  Comment


                  • #10
                    I've been using this since september without issue!!

                    I've been using this since september without issue!! When is release?

                    Comment

                    Working...
                    X