Friday, May 25, 2007

Ibatis problem

Document root element "sqlMap", must match DOCTYPE root "null"

This was the unhelpful exception I was gettign when I tried to run my ibatis/ spring prototype.

My ibatis sqlMap file looked ok

<sqlmap resource="db/prov.xml">
Publish Post

Had a search, you must add

<!DOCTYPE sqlMap PUBLIC "-// SQL Map 2.0//EN"

to your sql map files

Note you must also have

<!DOCTYPE sqlMapConfig PUBLIC "-// SQL Map Config 2.0//EN"

to your sql-map-config.xml file.

1 comment:

Anonymous said...

soooo relieved to have found this post! What an annoying issue...thanks for the fix!