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 Thu, 20 Oct 2005 22:19:15 GMT
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.
> 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