Results 1 to 10 of 10

Thread: Attribute "abstract" must be declared for element

  1. #1
    Join Date
    Sep 2004
    Location
    Toulouse, France
    Posts
    50

    Default 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. #2
    Join Date
    Aug 2004
    Posts
    2,715

    Default

    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

  3. #3
    Join Date
    Aug 2004
    Location
    Frankfurt/Main, Germany
    Posts
    253

    Default

    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

  4. #4
    Join Date
    Sep 2004
    Posts
    346

    Default 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.

  5. #5
    Join Date
    Oct 2004
    Location
    Atlanta, GA
    Posts
    38

    Default 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! )

  6. #6
    Join Date
    Aug 2004
    Posts
    8

    Default 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.

  7. #7
    Join Date
    Aug 2004
    Location
    Frankfurt/Main, Germany
    Posts
    253

    Default 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

  8. #8
    Join Date
    Sep 2004
    Location
    Toulouse, France
    Posts
    50

    Default Re: Validation errors in Spring beans configuration files

    Quote 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

  9. #9

    Default Re: Validation errors in Spring beans configuration files

    Quote 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...

  10. #10
    Join Date
    Sep 2004
    Posts
    346

    Default I've been using this since september without issue!!

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

Similar Threads

  1. AopCoinfigException is normal?
    By Donald in forum AOP
    Replies: 2
    Last Post: Sep 28th, 2005, 09:12 AM
  2. PerformanceMonitorInterceptor
    By tnist in forum AOP
    Replies: 3
    Last Post: Aug 24th, 2005, 01:39 PM
  3. Replies: 1
    Last Post: Jul 28th, 2005, 05:08 PM
  4. stale Oracle processes
    By compostellas in forum Data
    Replies: 7
    Last Post: Jun 27th, 2005, 12:14 PM
  5. Replies: 2
    Last Post: Sep 5th, 2004, 10:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •