ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zack Chandler" <zackchand...@drainpatrol.com>
Subject SAXParseException... Error parsing XPath '/sqlMapConfig/sqlMap' -- any ideas?
Date Thu, 20 Oct 2005 18:09:30 GMT
Hi,
	First let me say that iBatis is a great framework and I thank all
those who contribute to its development.  I have successfully used iBatis in
the past but with a current project I am encountering a strange error.  It
seems that the parser dies on parsing the sql-map-config.xml file.  I am
using jdk 1.5, eclipse 3.1 and iBatis build 2.1.5.  Here is my config file
and a stack trace of the error.  Any help would be greatly appreciated.
Thanks.  

sql-map-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
    "http://www.ibatis.com/dtd/sql-map-config-2.dtd">

<sqlMapConfig>
	<sqlMap resource="com/tabarca/dao/ibatis/maps/User.xml"/>
</sqlMapConfig>


org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'sqlMapClient' defined in class path resource
[com/tabarca/domain/ibatis/testApplicationContext.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: Document root
element "sqlMap", must match DOCTYPE root "null".
Caused by: org.xml.sax.SAXParseException: Document root element "sqlMap",
must match DOCTYPE root "null".
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: org.xml.sax.SAXParseException: Document root element "sqlMap", must
match DOCTYPE root "null".
Caused by: org.xml.sax.SAXParseException: Document root element "sqlMap",
must match DOCTYPE root "null".
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error parsing
XPath '/sqlMapConfig/sqlMap'.  Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
org.xml.sax.SAXParseException: Document root element "sqlMap", must match
DOCTYPE root "null".
Caused by: org.xml.sax.SAXParseException: Document root element "sqlMap",
must match DOCTYPE root "null".
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: org.xml.sax.SAXParseException: Document root element "sqlMap", must
match DOCTYPE root "null".
Caused by: org.xml.sax.SAXParseException: Document root element "sqlMap",
must match DOCTYPE root "null".
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: Document root
element "sqlMap", must match DOCTYPE root "null".
Caused by: org.xml.sax.SAXParseException: Document root element "sqlMap",
must match DOCTYPE root "null".
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: org.xml.sax.SAXParseException: Document root element "sqlMap", must
match DOCTYPE root "null".
Caused by: org.xml.sax.SAXParseException: Document root element "sqlMap",
must match DOCTYPE root "null".
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error parsing
XPath '/sqlMapConfig/sqlMap'.  Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
org.xml.sax.SAXParseException: Document root element "sqlMap", must match
DOCTYPE root "null".
Caused by: org.xml.sax.SAXParseException: Document root element "sqlMap",
must match DOCTYPE root "null".
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: org.xml.sax.SAXParseException: Document root element "sqlMap", must
match DOCTYPE root "null".
Caused by: org.xml.sax.SAXParseException: Document root element "sqlMap",
must match DOCTYPE root "null".
Caused by: 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: Document root element "sqlMap", must match
DOCTYPE root "null".
Caused by: org.xml.sax.SAXParseException: Document root element "sqlMap",
must match DOCTYPE root "null".
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: org.xml.sax.SAXParseException: Document root element "sqlMap", must
match DOCTYPE root "null".
Caused by: org.xml.sax.SAXParseException: Document root element "sqlMap",
must match DOCTYPE root "null".
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error parsing
XPath '/sqlMapConfig/sqlMap'.  Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
org.xml.sax.SAXParseException: Document root element "sqlMap", must match
DOCTYPE root "null".
Caused by: org.xml.sax.SAXParseException: Document root element "sqlMap",
must match DOCTYPE root "null".
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: org.xml.sax.SAXParseException: Document root element "sqlMap", must
match DOCTYPE root "null".
Caused by: org.xml.sax.SAXParseException: Document root element "sqlMap",
must match DOCTYPE root "null".
	at
com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigPa
rser.java:81)
	at
com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientB
uilder.java:62)
	at
org.springframework.orm.ibatis.SqlMapClientFactoryBean.afterPropertiesSet(Sq
lMapClientFactoryBean.java:258)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1058)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:363)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:226)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:147)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:269)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:318)
	at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(Cl
assPathXmlApplicationContext.java:81)
	at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(Cl
assPathXmlApplicationContext.java:66)
	at
org.springframework.test.AbstractSpringContextTests.loadContextLocations(Abs
tractSpringContextTests.java:121)
	at
org.springframework.test.AbstractDependencyInjectionSpringContextTests.loadC
ontextLocations(AbstractDependencyInjectionSpringContextTests.java:161)
	at
org.springframework.test.AbstractSpringContextTests.getContext(AbstractSprin
gContextTests.java:101)
	at
org.springframework.test.AbstractDependencyInjectionSpringContextTests.setUp
(AbstractDependencyInjectionSpringContextTests.java:129)
	at junit.framework.TestCase.runBare(TestCase.java:125)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:478)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:344)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:196)



Mime
View raw message