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 Ashish Kulkarni <ku...@yahoo.com> on 2005/11/18 15:13:28 UTC

Error when sqlMap has no SQL statements defined

Hello
 Why do i get following error
  Caused by:                                         
  org.xml.sax.SAXParseException: Element "sqlMap"
 requires additional elements.                    
   at java/lang/Throwable.<init>(Throwable.java:195) 
   at java/lang/Exception.<init>(Exception.java:41)  
   at
 org/xml/sax/SAXException.<init>(SAXException.java:55)
  at

org/xml/sax/SAXParseException.<init>(SAXParseException.java:56)
   at

org/apache/crimson/parser/Parser2.error(Parser2.java:3343)
   at
org/apache/crimson/parser/ValidatingParser$ChildrenValidator.done(ValidatingParser.java:361)
   at

org/apache/crimson/parser/Parser2.maybeElement(Parser2.java:1692)
 
I have the following configuration files
 <?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="PODataAS400.xml" />
  
</sqlMapConfig>
 
 And my PODataAS400.xml is as below

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

 </sqlMap>
 
 I have not defined any SQL, is it not legal to do
 so
 
 Ashish


A$HI$H


		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

Re: Error when sqlMap has no SQL statements defined

Posted by Ashish Kulkarni <ku...@yahoo.com>.
Oh
the reason i am using ibatis is because in my
application i want to make provision to add SQL
statements to get data in XML files in future, so by
default we provide some information, but if our
clients require additional data, they need to define
SQL statements in sqlMap, i have logic which will read
these XML files and get execute the querries and get
the additional data

Ashish

--- Jeff Butler <je...@gmail.com> wrote:

> The DTD requires that sqlMap have at least one sub
> element.
>  This is kind of funny - if it is not legel to
> define any SQL, why are you
> using iBATIS? :)
>  Jeff Butler
> 
>  On 11/18/05, Ashish Kulkarni
> <ku...@yahoo.com> wrote:
> >
> > Hello
> > Why do i get following error
> > Caused by:
> > org.xml.sax.SAXParseException: Element "sqlMap"
> > requires additional elements.
> > at java/lang/Throwable.<init>(Throwable.java:195)
> > at java/lang/Exception.<init>(Exception.java:41)
> > at
> >
>
org/xml/sax/SAXException.<init>(SAXException.java:55)
> > at
> >
> >
>
org/xml/sax/SAXParseException.<init>(SAXParseException.java:56)
> > at
> >
> >
>
org/apache/crimson/parser/Parser2.error(Parser2.java:3343)
> > at
> >
>
org/apache/crimson/parser/ValidatingParser$ChildrenValidator.done(
> > ValidatingParser.java:361)
> > at
> >
> >
>
org/apache/crimson/parser/Parser2.maybeElement(Parser2.java:1692)
> >
> > I have the following configuration files
> > <?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="PODataAS400.xml" />
> >
> > </sqlMapConfig>
> >
> > And my PODataAS400.xml is as below
> >
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <!DOCTYPE sqlMap
> > PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
> > "http://www.ibatis.com/dtd/sql-map-2.dtd">
> > <sqlMap namespace="POData">
> >
> > </sqlMap>
> >
> > I have not defined any SQL, is it not legal to do
> > so
> >
> > Ashish
> >
> >
> > A$HI$H
> >
> >
> >
> > __________________________________
> > Start your day with Yahoo! - Make it your home
> page!
> > http://www.yahoo.com/r/hs
> >
> 



		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

Re: Error when sqlMap has no SQL statements defined

Posted by Jeff Butler <je...@gmail.com>.
The DTD requires that sqlMap have at least one sub element.
 This is kind of funny - if it is not legel to define any SQL, why are you
using iBATIS? :)
 Jeff Butler

 On 11/18/05, Ashish Kulkarni <ku...@yahoo.com> wrote:
>
> Hello
> Why do i get following error
> Caused by:
> org.xml.sax.SAXParseException: Element "sqlMap"
> requires additional elements.
> at java/lang/Throwable.<init>(Throwable.java:195)
> at java/lang/Exception.<init>(Exception.java:41)
> at
> org/xml/sax/SAXException.<init>(SAXException.java:55)
> at
>
> org/xml/sax/SAXParseException.<init>(SAXParseException.java:56)
> at
>
> org/apache/crimson/parser/Parser2.error(Parser2.java:3343)
> at
> org/apache/crimson/parser/ValidatingParser$ChildrenValidator.done(
> ValidatingParser.java:361)
> at
>
> org/apache/crimson/parser/Parser2.maybeElement(Parser2.java:1692)
>
> I have the following configuration files
> <?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="PODataAS400.xml" />
>
> </sqlMapConfig>
>
> And my PODataAS400.xml is as below
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE sqlMap
> PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
> "http://www.ibatis.com/dtd/sql-map-2.dtd">
> <sqlMap namespace="POData">
>
> </sqlMap>
>
> I have not defined any SQL, is it not legal to do
> so
>
> Ashish
>
>
> A$HI$H
>
>
>
> __________________________________
> Start your day with Yahoo! - Make it your home page!
> http://www.yahoo.com/r/hs
>