I've looed through the forum and not really seen a definitive answer to this one. It's a bit of a puzzle. I have the following in my applicationContext.xml file, to declare an abstract bean which I can inherit from:
<bean id="baseDAO" abstract="true">
<property name="sessionFactory">
<ref local="sessionFactory"/>
</property>
</bean>
At the top of the file, there's the usual:
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
Now, when I check the file for validity with JEdit, there's no problem. However, when I try to run a unit test with JUnit, I get the error which has been reported here before, and the test fails:
org.xml.sax.SAXParseException: Attribute "abstract" must be declared for element type "bean".
Why would this be occurring? Is there some way an obsolete DTD could be being used by JUnit, in which case where is it likely to be?


Reply With Quote