| « Adding multiple Eclipse projects to Tomcat's classpath | I am a Snowhead now! » |
cvc-id.1: There is no ID/IDREF binding for IDREF 'transactionManager'
Been trying to get rid of this error message in my Spring container for a while and I have finally built up enough periphery knowledge to figure out the solution myself, so I thought I’d share it with you - I’m nice like that!
The offending message in Eclipse is:
cvc-id.1: There is no ID/IDREF binding for IDREF ‘transactionManager’
After a search I found:
http://documentation.softwareag.com/crossvision/ins441/messages/imsg.htm
Which provided the very helpful advice:
The document contains an IDREF value which does not exist as an ID value.
Modify your document.
In my example it was moaning about the transactionManager but in your case it could be anything.
Inside my containers xml configuration I had a bean which uses a reference to a local bean called transactionManager. Local here is the important bit. Local means that it is defined within the scope of this document - not in a linked or imported document, but in this one.
In my case it was defined like this:
XML:
<bean id="mybeanid" class="uk.co.bigsoft.proj"> | |
<property name="transactionManager"> | |
<ref local="transactionManager"/> | |
</property> | |
</bean> |
In order to fix the problem, I changed the transactionManager bean reference to not be local:
XML:
<bean id="mybeanid" class="uk.co.bigsoft.proj"> | |
<property | |
name="transactionManager" | |
ref="transactionManager"/> | |
</bean> |
And the problem went away!