You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Henry Lu <zh...@umich.edu> on 2006/07/28 20:05:16 UTC
IBATIS error...
Is there any one who has some idea about this issue?
I run a Junit testing and got the following errors:
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'sqlMapClient' defined in file
[C:\devel\webapps\mtrain\WEB-INF\test\app_beans_test.xml]:
Initialization of bean failed; nested exception is
com.ibatis.common.exception.NestedRuntimeException: Error occurred.
Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing
XPath '/sqlMapConfig/sqlMap'. Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML. Cause:
org.xml.sax.SAXParseException: Attribute "namespace" must be declared
for element type "sqlMap".
Caused by: org.xml.sax.SAXParseException: Attribute "namespace" must be
declared for element type "sqlMap".
But my web application runs with all map files and doesn't have any
errors.
But only the JUnit testing failed.
-Henry
>
>
Re: IBATIS error...
Posted by Jeff Butler <je...@gmail.com>.
My only questions are these:
1. Are you using the latest version of iBATIS (2.1.7)?
2. Is the DOCTYPE in all of your sqlMap files set to this:
<!DOCTYPE sqlMap
PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
The iBATIS build has lots of JUnit tests running with no problem, but we're
not using Spring.
Jeff Butler
On 7/28/06, Henry Lu <zh...@umich.edu> wrote:
>
> Is there any one who has some idea about this issue?
>
> I run a Junit testing and got the following errors:
>
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'sqlMapClient' defined in file
> [C:\devel\webapps\mtrain\WEB-INF\test\app_beans_test.xml]:
> Initialization of bean failed; nested exception is
> com.ibatis.common.exception.NestedRuntimeException: Error occurred.
> Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.
> Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing
>
> XPath '/sqlMapConfig/sqlMap'. Cause:
> com.ibatis.common.xml.NodeletException: Error parsing XML. Cause:
> org.xml.sax.SAXParseException: Attribute "namespace" must be declared
> for element type "sqlMap".
> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" must be
> declared for element type "sqlMap".
>
> But my web application runs with all map files and doesn't have any
> errors.
>
> But only the JUnit testing failed.
>
>
>
> -Henry
>
>
> >
> >
>