ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zack Chandler" <zackchand...@drainpatrol.com>
Subject RE: SAXParseException... Error parsing XPath '/sqlMapConfig/sqlMap' -- any ideas?
Date Fri, 21 Oct 2005 01:13:10 GMT
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 <zackchandler@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 <zackchandler@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 <zackchandler@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 <zackchandler@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
>
>


Mime
View raw message