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 Zack Chandler <za...@drainpatrol.com> on 2005/10/20 20:09:30 UTC

SAXParseException... Error parsing XPath '/sqlMapConfig/sqlMap' -- any ideas?

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)



RE: SAXParseException... Error parsing XPath '/sqlMapConfig/sqlMap' -- any ideas?

Posted by Zack Chandler <za...@drainpatrol.com>.
Daniel,
	I have changed them - thanks for the reminder and for all your help.
Zack

-----Original Message-----
From: Daniel Henrique Ferreira e Silva [mailto:dhsilva@gmail.com] 
Sent: Thursday, October 20, 2005 6:06 PM
To: user-java@ibatis.apache.org
Subject: Re: SAXParseException... Error parsing XPath '/sqlMapConfig/sqlMap'
-- any ideas?

Hey Zack,

Good you had your issue solved. Again, just want to warn you to change
your DOCTYPE elements for ibatis.apache.org.

Clinton has already warned iBATIS users to do that as it was costing
him more money due to the bandwidth consumption. You know, some
editors/IDEs reach the URL looking for the DTD.

Do that and enjoy!

Cheers,
Daniel Silva.

On 10/20/05, Zack Chandler <za...@drainpatrol.com> wrote:
> Geoff,
>         That did the trick!  Thanks a ton!
>
> Zack
>
> -----Original Message-----
> From: Geoff Chiang [mailto:geoffchiang@yahoo.com]
> Sent: Thursday, October 20, 2005 4:19 PM
> To: user-java@ibatis.apache.org
> Subject: RE: SAXParseException... Error parsing XPath
'/sqlMapConfig/sqlMap'
> -- any ideas?
>
> Try putting the sqlMap DOCTYPE into this file:
>
> <!DOCTYPE sqlMap
>         PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
>         "http://www.ibatis.com/dtd/sql-map-2.dtd">
>
> (Or "ibatis.apache.org", of course.  I just copied the one I'm using.)
>
> Geoff
>
>
> --- Zack Chandler <za...@drainpatrol.com> wrote:
>
> > Geoff,
> >       Here is the User.xml file.  I really appreciate the help.
> >
> > Thanks,
> > Zack
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <sqlMap namespace="User">
> >
> >       <resultMap id="result" class="com.tabarca.domain.User">
> >               <result property="id" column="id" />
> >               <result property="username" column="username" />
> >               <result property="password" column="password" />
> >               <result property="screenName" column="screenname" />
> >               <result property="emailAddress" column="emailaddress" />
> >
> >       </resultMap>
> >
> >       <insert id="addUser" resultClass="java.Lang.Long">
> >               <selectKey property="id" type="post"
> > resultClass="java.lang.Long">
> >                       select last_insert_id() as value
> >               </selectKey>
> >               insert into users (username, password, screenname,
> > emailaddress) values (#username#, #password#, #screenName#,
> > #emailAddress#)
> >
> >       </insert>
> >
> >       <delete id="deleteUser">
> >               delete from users where id = #value#
> >       </delete>
> >
> >       <update id="updateUser">
> >               update users set username = #username#, password =
> > #password#, screenname = #screenName#, emailaddress = #emailAddress#
> > where id = #id#
> >       </update>
> >
> >       <select id="findUserByID" resultMap="result">
> >               select * from users where id = #value#
> >       </select>
> >
> >       <select id="findAllUsers" resultMap="result">
> >               select * from users
> >       </select>
> >
> >       <select id="findUserByUsername" resultMap="result">
> >               select * from users where username = #value#
> >       </select>
> >
> >       <select id="findUserByScreenName" resultMap="result">
> >               select * from users where screenname = #value#
> >       </select>
> >
> >       <select id="findUserByEmailAddress" resultMap="result">
> >               select * from users where emailaddress = #value#
> >       </select>
> >
> >       <select id="findUserByEmailAddressAndPassword" resultMap="result"
> > parameterClass="java.util.HashMap">
> >               select * from users where emailaddress = #emailAddress#
and
> > password = #password#
> >       </select>
> >
> > </sqlMap>
> >
> >
> > -----Original Message-----
> > From: Geoff Chiang [mailto:geoffchiang@yahoo.com]
> > Sent: Thursday, October 20, 2005 3:55 PM
> > To: user-java@ibatis.apache.org
> > Subject: RE: SAXParseException... Error parsing XPath
> > '/sqlMapConfig/sqlMap'
> > -- any ideas?
> >
> > The stack trace suggests that the problem is in your
> > com/tabarca/dao/ibatis/maps/User.xml file, not the sql-map-config.xml
> > file.  Can you post that one instead?
> >
> > Geoff
> >
> >
> > --- Zack Chandler <za...@drainpatrol.com> wrote:
> >
> > > Daniel,
> > >     Thanks for the idea on the DOCTYPE change.  Unfortunately it
> > didn't
> > > help.  This one really has me stumped.  I have started the web app
> > > through
> > > the tomcat startup script (in other words without eclipse) and
> > still
> > > have
> > > the same error.  So it would seem that eclipse is not the culprit.
> > > The
> > > iBatis xml parser definitely finds the sql-map-config.xml file and
> > > then dies
> > > parsing it.  I am using iBatis 2.1.5 build 582.
> > >     Any other ideas anyone?
> > >
> > > Thanks,
> > > Zack
> > >
> > > -----Original Message-----
> > > From: Daniel Henrique Ferreira e Silva [mailto:dhsilva@gmail.com]
> > > Sent: Thursday, October 20, 2005 1:07 PM
> > > To: user-java@ibatis.apache.org
> > > Subject: Re: SAXParseException... Error parsing XPath
> > > '/sqlMapConfig/sqlMap'
> > > -- any ideas?
> > >
> > > Hi Zack,
> > >
> > > It seems ok for me when checked against the dtd.
> > > One thing that could be causing this, and i'm guessing here, is
> > that
> > > you're using Eclipse and maybe compiling/running your app inside it
> > > using an invalid DOCTYPE. Replace in the DOCTYPE where you have
> > > www.ibatis.com for ibatis.apache.org and try it again.
> > >
> > > Let us know how it goes.
> > >
> > > Cheers,
> > > Daniel Silva.
> > >
> > > On 10/20/05, Zack Chandler <za...@drainpatrol.com> wrote:
> > > > 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.
> >
> === message truncated ===
>
>
>
>
>
>
>
> ____________________________________________________
> Do you Yahoo!?
> Yahoo! Photos: Now with unlimited storage
> http://au.photos.yahoo.com
>
>


Re: SAXParseException... Error parsing XPath '/sqlMapConfig/sqlMap' -- any ideas?

Posted by Daniel Henrique Ferreira e Silva <dh...@gmail.com>.
Hey Zack,

Good you had your issue solved. Again, just want to warn you to change
your DOCTYPE elements for ibatis.apache.org.

Clinton has already warned iBATIS users to do that as it was costing
him more money due to the bandwidth consumption. You know, some
editors/IDEs reach the URL looking for the DTD.

Do that and enjoy!

Cheers,
Daniel Silva.

On 10/20/05, Zack Chandler <za...@drainpatrol.com> wrote:
> Geoff,
>         That did the trick!  Thanks a ton!
>
> Zack
>
> -----Original Message-----
> From: Geoff Chiang [mailto:geoffchiang@yahoo.com]
> Sent: Thursday, October 20, 2005 4:19 PM
> To: user-java@ibatis.apache.org
> Subject: RE: SAXParseException... Error parsing XPath '/sqlMapConfig/sqlMap'
> -- any ideas?
>
> Try putting the sqlMap DOCTYPE into this file:
>
> <!DOCTYPE sqlMap
>         PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
>         "http://www.ibatis.com/dtd/sql-map-2.dtd">
>
> (Or "ibatis.apache.org", of course.  I just copied the one I'm using.)
>
> Geoff
>
>
> --- Zack Chandler <za...@drainpatrol.com> wrote:
>
> > Geoff,
> >       Here is the User.xml file.  I really appreciate the help.
> >
> > Thanks,
> > Zack
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <sqlMap namespace="User">
> >
> >       <resultMap id="result" class="com.tabarca.domain.User">
> >               <result property="id" column="id" />
> >               <result property="username" column="username" />
> >               <result property="password" column="password" />
> >               <result property="screenName" column="screenname" />
> >               <result property="emailAddress" column="emailaddress" />
> >
> >       </resultMap>
> >
> >       <insert id="addUser" resultClass="java.Lang.Long">
> >               <selectKey property="id" type="post"
> > resultClass="java.lang.Long">
> >                       select last_insert_id() as value
> >               </selectKey>
> >               insert into users (username, password, screenname,
> > emailaddress) values (#username#, #password#, #screenName#,
> > #emailAddress#)
> >
> >       </insert>
> >
> >       <delete id="deleteUser">
> >               delete from users where id = #value#
> >       </delete>
> >
> >       <update id="updateUser">
> >               update users set username = #username#, password =
> > #password#, screenname = #screenName#, emailaddress = #emailAddress#
> > where id = #id#
> >       </update>
> >
> >       <select id="findUserByID" resultMap="result">
> >               select * from users where id = #value#
> >       </select>
> >
> >       <select id="findAllUsers" resultMap="result">
> >               select * from users
> >       </select>
> >
> >       <select id="findUserByUsername" resultMap="result">
> >               select * from users where username = #value#
> >       </select>
> >
> >       <select id="findUserByScreenName" resultMap="result">
> >               select * from users where screenname = #value#
> >       </select>
> >
> >       <select id="findUserByEmailAddress" resultMap="result">
> >               select * from users where emailaddress = #value#
> >       </select>
> >
> >       <select id="findUserByEmailAddressAndPassword" resultMap="result"
> > parameterClass="java.util.HashMap">
> >               select * from users where emailaddress = #emailAddress# and
> > password = #password#
> >       </select>
> >
> > </sqlMap>
> >
> >
> > -----Original Message-----
> > From: Geoff Chiang [mailto:geoffchiang@yahoo.com]
> > Sent: Thursday, October 20, 2005 3:55 PM
> > To: user-java@ibatis.apache.org
> > Subject: RE: SAXParseException... Error parsing XPath
> > '/sqlMapConfig/sqlMap'
> > -- any ideas?
> >
> > The stack trace suggests that the problem is in your
> > com/tabarca/dao/ibatis/maps/User.xml file, not the sql-map-config.xml
> > file.  Can you post that one instead?
> >
> > Geoff
> >
> >
> > --- Zack Chandler <za...@drainpatrol.com> wrote:
> >
> > > Daniel,
> > >     Thanks for the idea on the DOCTYPE change.  Unfortunately it
> > didn't
> > > help.  This one really has me stumped.  I have started the web app
> > > through
> > > the tomcat startup script (in other words without eclipse) and
> > still
> > > have
> > > the same error.  So it would seem that eclipse is not the culprit.
> > > The
> > > iBatis xml parser definitely finds the sql-map-config.xml file and
> > > then dies
> > > parsing it.  I am using iBatis 2.1.5 build 582.
> > >     Any other ideas anyone?
> > >
> > > Thanks,
> > > Zack
> > >
> > > -----Original Message-----
> > > From: Daniel Henrique Ferreira e Silva [mailto:dhsilva@gmail.com]
> > > Sent: Thursday, October 20, 2005 1:07 PM
> > > To: user-java@ibatis.apache.org
> > > Subject: Re: SAXParseException... Error parsing XPath
> > > '/sqlMapConfig/sqlMap'
> > > -- any ideas?
> > >
> > > Hi Zack,
> > >
> > > It seems ok for me when checked against the dtd.
> > > One thing that could be causing this, and i'm guessing here, is
> > that
> > > you're using Eclipse and maybe compiling/running your app inside it
> > > using an invalid DOCTYPE. Replace in the DOCTYPE where you have
> > > www.ibatis.com for ibatis.apache.org and try it again.
> > >
> > > Let us know how it goes.
> > >
> > > Cheers,
> > > Daniel Silva.
> > >
> > > On 10/20/05, Zack Chandler <za...@drainpatrol.com> wrote:
> > > > 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.
> >
> === message truncated ===
>
>
>
>
>
>
>
> ____________________________________________________
> Do you Yahoo!?
> Yahoo! Photos: Now with unlimited storage
> http://au.photos.yahoo.com
>
>

RE: SAXParseException... Error parsing XPath '/sqlMapConfig/sqlMap' -- any ideas?

Posted by Zack Chandler <za...@drainpatrol.com>.
Geoff,
	That did the trick!  Thanks a ton!

Zack

-----Original Message-----
From: Geoff Chiang [mailto:geoffchiang@yahoo.com] 
Sent: Thursday, October 20, 2005 4:19 PM
To: user-java@ibatis.apache.org
Subject: RE: SAXParseException... Error parsing XPath '/sqlMapConfig/sqlMap'
-- any ideas?

Try putting the sqlMap DOCTYPE into this file:

<!DOCTYPE sqlMap
	PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
	"http://www.ibatis.com/dtd/sql-map-2.dtd">

(Or "ibatis.apache.org", of course.  I just copied the one I'm using.)

Geoff


--- Zack Chandler <za...@drainpatrol.com> wrote:

> Geoff,
> 	Here is the User.xml file.  I really appreciate the help.  
> 
> Thanks,
> Zack
> 	
> <?xml version="1.0" encoding="UTF-8"?>
> <sqlMap namespace="User">
> 
> 	<resultMap id="result" class="com.tabarca.domain.User">
> 		<result property="id" column="id" />
> 		<result property="username" column="username" />
> 		<result property="password" column="password" />
> 		<result property="screenName" column="screenname" />
> 		<result property="emailAddress" column="emailaddress" />
> 
> 	</resultMap>
> 
> 	<insert id="addUser" resultClass="java.Lang.Long">
> 		<selectKey property="id" type="post"
> resultClass="java.lang.Long">
> 			select last_insert_id() as value
> 		</selectKey>			
> 		insert into users (username, password, screenname,
> emailaddress) values (#username#, #password#, #screenName#,
> #emailAddress#)
> 
> 	</insert>
> 	
> 	<delete id="deleteUser">
> 		delete from users where id = #value#	
> 	</delete>
> 	
> 	<update id="updateUser">
> 		update users set username = #username#, password =
> #password#, screenname = #screenName#, emailaddress = #emailAddress#
> where id = #id#
> 	</update>		
> 
> 	<select id="findUserByID" resultMap="result">
> 		select * from users where id = #value#
> 	</select>
> 	
> 	<select id="findAllUsers" resultMap="result">
> 		select * from users
> 	</select>
> 	
> 	<select id="findUserByUsername" resultMap="result">
> 		select * from users where username = #value#
> 	</select>
> 	
> 	<select id="findUserByScreenName" resultMap="result">
> 		select * from users where screenname = #value#
> 	</select>
> 	
> 	<select id="findUserByEmailAddress" resultMap="result">
> 		select * from users where emailaddress = #value#
> 	</select>	
> 	
> 	<select id="findUserByEmailAddressAndPassword" resultMap="result"
> parameterClass="java.util.HashMap">
> 		select * from users where emailaddress = #emailAddress# and
> password = #password#
> 	</select>		
> 	
> </sqlMap>
> 
> 
> -----Original Message-----
> From: Geoff Chiang [mailto:geoffchiang@yahoo.com] 
> Sent: Thursday, October 20, 2005 3:55 PM
> To: user-java@ibatis.apache.org
> Subject: RE: SAXParseException... Error parsing XPath
> '/sqlMapConfig/sqlMap'
> -- any ideas?
> 
> The stack trace suggests that the problem is in your
> com/tabarca/dao/ibatis/maps/User.xml file, not the sql-map-config.xml
> file.  Can you post that one instead?
> 
> Geoff
> 
> 
> --- Zack Chandler <za...@drainpatrol.com> wrote:
> 
> > Daniel,
> > 	Thanks for the idea on the DOCTYPE change.  Unfortunately it
> didn't
> > help.  This one really has me stumped.  I have started the web app
> > through
> > the tomcat startup script (in other words without eclipse) and
> still
> > have
> > the same error.  So it would seem that eclipse is not the culprit. 
> > The
> > iBatis xml parser definitely finds the sql-map-config.xml file and
> > then dies
> > parsing it.  I am using iBatis 2.1.5 build 582.  
> > 	Any other ideas anyone?
> > 
> > Thanks,
> > Zack
> > 
> > -----Original Message-----
> > From: Daniel Henrique Ferreira e Silva [mailto:dhsilva@gmail.com] 
> > Sent: Thursday, October 20, 2005 1:07 PM
> > To: user-java@ibatis.apache.org
> > Subject: Re: SAXParseException... Error parsing XPath
> > '/sqlMapConfig/sqlMap'
> > -- any ideas?
> > 
> > Hi Zack,
> > 
> > It seems ok for me when checked against the dtd.
> > One thing that could be causing this, and i'm guessing here, is
> that
> > you're using Eclipse and maybe compiling/running your app inside it
> > using an invalid DOCTYPE. Replace in the DOCTYPE where you have
> > www.ibatis.com for ibatis.apache.org and try it again.
> > 
> > Let us know how it goes.
> > 
> > Cheers,
> > Daniel Silva.
> > 
> > On 10/20/05, Zack Chandler <za...@drainpatrol.com> wrote:
> > > 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.
> 
=== message truncated ===



	

	
		
____________________________________________________ 
Do you Yahoo!? 
Yahoo! Photos: Now with unlimited storage 
http://au.photos.yahoo.com


RE: SAXParseException... Error parsing XPath '/sqlMapConfig/sqlMap' -- any ideas?

Posted by Geoff Chiang <ge...@yahoo.com>.
Try putting the sqlMap DOCTYPE into this file:

<!DOCTYPE sqlMap
	PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
	"http://www.ibatis.com/dtd/sql-map-2.dtd">

(Or "ibatis.apache.org", of course.  I just copied the one I'm using.)

Geoff


--- Zack Chandler <za...@drainpatrol.com> wrote:

> Geoff,
> 	Here is the User.xml file.  I really appreciate the help.  
> 
> Thanks,
> Zack
> 	
> <?xml version="1.0" encoding="UTF-8"?>
> <sqlMap namespace="User">
> 
> 	<resultMap id="result" class="com.tabarca.domain.User">
> 		<result property="id" column="id" />
> 		<result property="username" column="username" />
> 		<result property="password" column="password" />
> 		<result property="screenName" column="screenname" />
> 		<result property="emailAddress" column="emailaddress" />
> 
> 	</resultMap>
> 
> 	<insert id="addUser" resultClass="java.Lang.Long">
> 		<selectKey property="id" type="post"
> resultClass="java.lang.Long">
> 			select last_insert_id() as value
> 		</selectKey>			
> 		insert into users (username, password, screenname,
> emailaddress) values (#username#, #password#, #screenName#,
> #emailAddress#)
> 
> 	</insert>
> 	
> 	<delete id="deleteUser">
> 		delete from users where id = #value#	
> 	</delete>
> 	
> 	<update id="updateUser">
> 		update users set username = #username#, password =
> #password#, screenname = #screenName#, emailaddress = #emailAddress#
> where id = #id#
> 	</update>		
> 
> 	<select id="findUserByID" resultMap="result">
> 		select * from users where id = #value#
> 	</select>
> 	
> 	<select id="findAllUsers" resultMap="result">
> 		select * from users
> 	</select>
> 	
> 	<select id="findUserByUsername" resultMap="result">
> 		select * from users where username = #value#
> 	</select>
> 	
> 	<select id="findUserByScreenName" resultMap="result">
> 		select * from users where screenname = #value#
> 	</select>
> 	
> 	<select id="findUserByEmailAddress" resultMap="result">
> 		select * from users where emailaddress = #value#
> 	</select>	
> 	
> 	<select id="findUserByEmailAddressAndPassword" resultMap="result"
> parameterClass="java.util.HashMap">
> 		select * from users where emailaddress = #emailAddress# and
> password = #password#
> 	</select>		
> 	
> </sqlMap>
> 
> 
> -----Original Message-----
> From: Geoff Chiang [mailto:geoffchiang@yahoo.com] 
> Sent: Thursday, October 20, 2005 3:55 PM
> To: user-java@ibatis.apache.org
> Subject: RE: SAXParseException... Error parsing XPath
> '/sqlMapConfig/sqlMap'
> -- any ideas?
> 
> The stack trace suggests that the problem is in your
> com/tabarca/dao/ibatis/maps/User.xml file, not the sql-map-config.xml
> file.  Can you post that one instead?
> 
> Geoff
> 
> 
> --- Zack Chandler <za...@drainpatrol.com> wrote:
> 
> > Daniel,
> > 	Thanks for the idea on the DOCTYPE change.  Unfortunately it
> didn't
> > help.  This one really has me stumped.  I have started the web app
> > through
> > the tomcat startup script (in other words without eclipse) and
> still
> > have
> > the same error.  So it would seem that eclipse is not the culprit. 
> > The
> > iBatis xml parser definitely finds the sql-map-config.xml file and
> > then dies
> > parsing it.  I am using iBatis 2.1.5 build 582.  
> > 	Any other ideas anyone?
> > 
> > Thanks,
> > Zack
> > 
> > -----Original Message-----
> > From: Daniel Henrique Ferreira e Silva [mailto:dhsilva@gmail.com] 
> > Sent: Thursday, October 20, 2005 1:07 PM
> > To: user-java@ibatis.apache.org
> > Subject: Re: SAXParseException... Error parsing XPath
> > '/sqlMapConfig/sqlMap'
> > -- any ideas?
> > 
> > Hi Zack,
> > 
> > It seems ok for me when checked against the dtd.
> > One thing that could be causing this, and i'm guessing here, is
> that
> > you're using Eclipse and maybe compiling/running your app inside it
> > using an invalid DOCTYPE. Replace in the DOCTYPE where you have
> > www.ibatis.com for ibatis.apache.org and try it again.
> > 
> > Let us know how it goes.
> > 
> > Cheers,
> > Daniel Silva.
> > 
> > On 10/20/05, Zack Chandler <za...@drainpatrol.com> wrote:
> > > 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.
> 
=== message truncated ===



	

	
		
____________________________________________________ 
Do you Yahoo!? 
Yahoo! Photos: Now with unlimited storage 
http://au.photos.yahoo.com

RE: SAXParseException... Error parsing XPath '/sqlMapConfig/sqlMap' -- any ideas?

Posted by Zack Chandler <za...@drainpatrol.com>.
Geoff,
	Here is the User.xml file.  I really appreciate the help.  

Thanks,
Zack
	
<?xml version="1.0" encoding="UTF-8"?>
<sqlMap namespace="User">

	<resultMap id="result" class="com.tabarca.domain.User">
		<result property="id" column="id" />
		<result property="username" column="username" />
		<result property="password" column="password" />
		<result property="screenName" column="screenname" />
		<result property="emailAddress" column="emailaddress" />

	</resultMap>

	<insert id="addUser" resultClass="java.Lang.Long">
		<selectKey property="id" type="post"
resultClass="java.lang.Long">
			select last_insert_id() as value
		</selectKey>			
		insert into users (username, password, screenname,
emailaddress) values (#username#, #password#, #screenName#, #emailAddress#)

	</insert>
	
	<delete id="deleteUser">
		delete from users where id = #value#	
	</delete>
	
	<update id="updateUser">
		update users set username = #username#, password =
#password#, screenname = #screenName#, emailaddress = #emailAddress#
where id = #id#
	</update>		

	<select id="findUserByID" resultMap="result">
		select * from users where id = #value#
	</select>
	
	<select id="findAllUsers" resultMap="result">
		select * from users
	</select>
	
	<select id="findUserByUsername" resultMap="result">
		select * from users where username = #value#
	</select>
	
	<select id="findUserByScreenName" resultMap="result">
		select * from users where screenname = #value#
	</select>
	
	<select id="findUserByEmailAddress" resultMap="result">
		select * from users where emailaddress = #value#
	</select>	
	
	<select id="findUserByEmailAddressAndPassword" resultMap="result"
parameterClass="java.util.HashMap">
		select * from users where emailaddress = #emailAddress# and
password = #password#
	</select>		
	
</sqlMap>


-----Original Message-----
From: Geoff Chiang [mailto:geoffchiang@yahoo.com] 
Sent: Thursday, October 20, 2005 3:55 PM
To: user-java@ibatis.apache.org
Subject: RE: SAXParseException... Error parsing XPath '/sqlMapConfig/sqlMap'
-- any ideas?

The stack trace suggests that the problem is in your
com/tabarca/dao/ibatis/maps/User.xml file, not the sql-map-config.xml
file.  Can you post that one instead?

Geoff


--- Zack Chandler <za...@drainpatrol.com> wrote:

> Daniel,
> 	Thanks for the idea on the DOCTYPE change.  Unfortunately it didn't
> help.  This one really has me stumped.  I have started the web app
> through
> the tomcat startup script (in other words without eclipse) and still
> have
> the same error.  So it would seem that eclipse is not the culprit. 
> The
> iBatis xml parser definitely finds the sql-map-config.xml file and
> then dies
> parsing it.  I am using iBatis 2.1.5 build 582.  
> 	Any other ideas anyone?
> 
> Thanks,
> Zack
> 
> -----Original Message-----
> From: Daniel Henrique Ferreira e Silva [mailto:dhsilva@gmail.com] 
> Sent: Thursday, October 20, 2005 1:07 PM
> To: user-java@ibatis.apache.org
> Subject: Re: SAXParseException... Error parsing XPath
> '/sqlMapConfig/sqlMap'
> -- any ideas?
> 
> Hi Zack,
> 
> It seems ok for me when checked against the dtd.
> One thing that could be causing this, and i'm guessing here, is that
> you're using Eclipse and maybe compiling/running your app inside it
> using an invalid DOCTYPE. Replace in the DOCTYPE where you have
> www.ibatis.com for ibatis.apache.org and try it again.
> 
> Let us know how it goes.
> 
> Cheers,
> Daniel Silva.
> 
> On 10/20/05, Zack Chandler <za...@drainpatrol.com> wrote:
> > 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
> >
> 
=== message truncated ===



		
____________________________________________________ 
Do you Yahoo!? 
Find a local business fast with Yahoo! Local Search 
http://au.local.yahoo.com


RE: SAXParseException... Error parsing XPath '/sqlMapConfig/sqlMap' -- any ideas?

Posted by Geoff Chiang <ge...@yahoo.com>.
The stack trace suggests that the problem is in your
com/tabarca/dao/ibatis/maps/User.xml file, not the sql-map-config.xml
file.  Can you post that one instead?

Geoff


--- Zack Chandler <za...@drainpatrol.com> wrote:

> Daniel,
> 	Thanks for the idea on the DOCTYPE change.  Unfortunately it didn't
> help.  This one really has me stumped.  I have started the web app
> through
> the tomcat startup script (in other words without eclipse) and still
> have
> the same error.  So it would seem that eclipse is not the culprit. 
> The
> iBatis xml parser definitely finds the sql-map-config.xml file and
> then dies
> parsing it.  I am using iBatis 2.1.5 build 582.  
> 	Any other ideas anyone?
> 
> Thanks,
> Zack
> 
> -----Original Message-----
> From: Daniel Henrique Ferreira e Silva [mailto:dhsilva@gmail.com] 
> Sent: Thursday, October 20, 2005 1:07 PM
> To: user-java@ibatis.apache.org
> Subject: Re: SAXParseException... Error parsing XPath
> '/sqlMapConfig/sqlMap'
> -- any ideas?
> 
> Hi Zack,
> 
> It seems ok for me when checked against the dtd.
> One thing that could be causing this, and i'm guessing here, is that
> you're using Eclipse and maybe compiling/running your app inside it
> using an invalid DOCTYPE. Replace in the DOCTYPE where you have
> www.ibatis.com for ibatis.apache.org and try it again.
> 
> Let us know how it goes.
> 
> Cheers,
> Daniel Silva.
> 
> On 10/20/05, Zack Chandler <za...@drainpatrol.com> wrote:
> > 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
> >
> 
=== message truncated ===



		
____________________________________________________ 
Do you Yahoo!? 
Find a local business fast with Yahoo! Local Search 
http://au.local.yahoo.com

RE: SAXParseException... Error parsing XPath '/sqlMapConfig/sqlMap' -- any ideas?

Posted by Zack Chandler <za...@drainpatrol.com>.
Daniel,
	Thanks for the idea on the DOCTYPE change.  Unfortunately it didn't
help.  This one really has me stumped.  I have started the web app through
the tomcat startup script (in other words without eclipse) and still have
the same error.  So it would seem that eclipse is not the culprit.  The
iBatis xml parser definitely finds the sql-map-config.xml file and then dies
parsing it.  I am using iBatis 2.1.5 build 582.  
	Any other ideas anyone?

Thanks,
Zack

-----Original Message-----
From: Daniel Henrique Ferreira e Silva [mailto:dhsilva@gmail.com] 
Sent: Thursday, October 20, 2005 1:07 PM
To: user-java@ibatis.apache.org
Subject: Re: SAXParseException... Error parsing XPath '/sqlMapConfig/sqlMap'
-- any ideas?

Hi Zack,

It seems ok for me when checked against the dtd.
One thing that could be causing this, and i'm guessing here, is that
you're using Eclipse and maybe compiling/running your app inside it
using an invalid DOCTYPE. Replace in the DOCTYPE where you have
www.ibatis.com for ibatis.apache.org and try it again.

Let us know how it goes.

Cheers,
Daniel Silva.

On 10/20/05, Zack Chandler <za...@drainpatrol.com> wrote:
> 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)
>
>
>


Re: SAXParseException... Error parsing XPath '/sqlMapConfig/sqlMap' -- any ideas?

Posted by Daniel Henrique Ferreira e Silva <dh...@gmail.com>.
Hi Zack,

It seems ok for me when checked against the dtd.
One thing that could be causing this, and i'm guessing here, is that
you're using Eclipse and maybe compiling/running your app inside it
using an invalid DOCTYPE. Replace in the DOCTYPE where you have
www.ibatis.com for ibatis.apache.org and try it again.

Let us know how it goes.

Cheers,
Daniel Silva.

On 10/20/05, Zack Chandler <za...@drainpatrol.com> wrote:
> 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)
>
>
>