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 Sathish S <fl...@gmail.com> on 2005/12/13 14:28:43 UTC

iBatis DTD validation

Hi All,
    I have been facing some problems using iBatis. I have noticed that
whenever the site (iBatis.apache.org) is down, the application hangs and it
does not perform anything (Its probably because the schemas are validated
using the DTD's from this site). How do we overcome such a scenario? Also
how do we deploy our application  in  intranet where there's no connection
to the internet?

   I appreciate any help / suggestion on this.

--
Thanks,
Sathish S

Re: iBatis DTD validation

Posted by Sathish S <fl...@gmail.com>.
Hi Nathan and All,
    Thanks for the suggestion. Upgrading to 2.1.5 solves my problem too.
Dev environment is as below
- It's a web application and the server is Apache Tomcat 5.0.25
- OS - Windows 2000 Professional Edition
- JVM - Sun JVM - J2SDK 1.4.2

--
Thanks,
Sathish S


On 12/14/05, Mark Bennett <ma...@gmail.com> wrote:
>
> Nathan,
>
> Cool, I upgraded to 2.1.5 and that solved my problem.  Thanks!
>
>
>
> On 12/13/05, Nathan Maves <Na...@sun.com> wrote:
> >
> > Mark,
> >
> > Everything looks good to me.  There is nothing that you have to do on
> > your part to get the parser to look inside of the jar files.
> >
> >
> > You might want to upgrade your ibatis jars to the newest build. I would
> > stick to 2.1.5 as a production release but there is a newer build then
> > you have.  As you can see below there was a fix with the entity resolver.
> >
> >
> > Build Date: 2005/07/17 20:58
> > Build Number: 582
> >
> >
> > ------------------------------
> > 2.1.5 - July 17, 2005
> > ------------------------------
> >
> >
> > o Fixed IBATIS-136 groupBy not carried forward to extended result maps
> > o Fixed IBATIS-139 discriminator being applied to too many result maps
> > (thanks Sven)
> > o Fixed IBATIS-152, 149, 116 null result sets now handled properly by
> > JDBC logging classes (thanks Sven)
> > o Fixed IBATIS-146 consumes additional result sets before retrieving
> > output params (JTDS fix)
> > o Fixed IBATIS-130 parameter maps don't allow for complete TypeHandler
> > implementations
> > o Fixed IBATIS-148 parameter maps don't allow for complete TypeHandler
> > implementations
> > o Removed dependency on Commons Logging, will autodetect and use Commons
> > Logging, Log4J, JDK 1.4 or no logging
> > o Improved entity resolvers to be smarter, checks both system and public
> > IDs, and both ibatis.com and apache.org
> >
> >
> > http://prdownloads.sourceforge.net/ibatisdb/iBATIS_DBL-2.1.5.582.zip?download
> >
> >
> >
> > Again I think we need to know more about how you are running your app?
> > Is is a standalone app or a webapp?  If it is a webapp then what server are
> > you running and on  what OS?  Also what is the jvm that you are running on?
> >
> >
> > Nathan
> >
> >
> >
> >  On Dec 13, 2005, at 10:46 AM, Mark Bennett wrote:
> >
> >  I'm using iBATIS_DBL-2.1.0.565.  The jars are already in my classpath
> > so do I need to give it some more hints somehow to let it know where inside
> > the jars the dtds are?  Thanks!
> >
> > Here are the dtds I have:
> >
> > <!DOCTYPE daoConfig PUBLIC "-//iBATIS.com//DTD DAO Configuration 2.0//EN"
> > "http://ibatis.apache.org/dtd/dao-2.dtd ">
> >
> > <!
> > DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
> > "http://ibatis.apache.org/dtd/sql-map-config-2.dtd ">
> >
> > <!
> > DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd
> > ">
> >
> > And my error (only when apache.org is down):
> >
> > Caused by: java.lang.RuntimeException: Could not initialize DaoConfig.
> > Cause: com.ibatis.dao.client.DaoException: Error while configuring
> > DaoManager.  Cause: com.ibatis.common.exception.NestedRuntimeException:
> > XML Parser Error.  Cause: java.net.ConnectException: Tried all: '1'
> > addresses, but could not connect over HTTP to server: 'ibatis.apache.org
> > ', port: '80'
> > Caused by: com.ibatis.common.exception.NestedRuntimeException : XML
> > Parser Error.  Cause: java.net.ConnectException: Tried all: '1'
> > addresses, but could not connect over HTTP to server: 'ibatis.apache.org',
> > port: '80'
> > at ncjoin.persistence.DaoConfig .(DaoConfig.java:26)
> > ... 29 more
> >
> >
> >
> >
> > On 12/13/05, Jeff Butler <jeffgbutler@gmail.com > wrote:
> > >
> > > The DTDs are also contained in the iBATIS JAR file, and iBATIS does
> > > not go to the internet to validate.  Typically, the DTDs on the
> > > internet are only used in tools like validating XML editors.  So there
> > > must be some other problem.
> > >
> > > What IDE are you using?
> > > Are you using the latest iBATIS release?
> > > Do you have the DOCTYPEs set properly (as shown on the iBATIS home
> > > page now)?
> > >
> > > Jeff Butler
> > >
> > >
> > > On 12/13/05, Mark Bennett <ma...@gmail.com> wrote:
> > > > I do know that you can replace ibatis.apache.org with ibatis.com and
> > > that
> > > > will work as long as Clinton keeps that domain running.  You would
> > > think
> > > > that apache would be more stable than it is.  I'm struggling with
> > > the same
> > > > problem.  If apache won't stay up perhaps we'll just host it on our
> > > public
> > > > web site.
> > > >
> > > > Mark
> > > >
> > > >
> > > > On 12/13/05, Sathish S <flex2004@gmail.com > wrote:
> > > > > Hi All,
> > > > >     I have been facing some problems using iBatis. I have noticed
> > > that
> > > > whenever the site ( iBatis.apache.org <http://ibatis.apache.org/>)
> > > is down, the application hangs and it
> > > > does not perform anything (Its probably because the schemas are
> > > validated
> > > > using the DTD's from this site). How do we overcome such a scenario?
> > > Also
> > > > how do we deploy our application  in  intranet where there's no
> > > connection
> > > > to the internet?
> > > > >
> > > > >    I appreciate any help / suggestion on this.
> > > > >
> > > > > --
> > > > > Thanks,
> > > > > Sathish S
> > > >
> > > >
> > >
> >
> >
> >
> >
>
>

Re: iBatis DTD validation

Posted by Mark Bennett <ma...@gmail.com>.
Nathan,

Cool, I upgraded to 2.1.5 and that solved my problem.  Thanks!



On 12/13/05, Nathan Maves <Na...@sun.com> wrote:
>
> Mark,
>
> Everything looks good to me.  There is nothing that you have to do on your
> part to get the parser to look inside of the jar files.
>
>
> You might want to upgrade your ibatis jars to the newest build. I would
> stick to 2.1.5 as a production release but there is a newer build then you
> have.  As you can see below there was a fix with the entity resolver.
>
>
> Build Date: 2005/07/17 20:58
> Build Number: 582
>
>
> ------------------------------
> 2.1.5 - July 17, 2005
> ------------------------------
>
>
> o Fixed IBATIS-136 groupBy not carried forward to extended result maps
> o Fixed IBATIS-139 discriminator being applied to too many result maps
> (thanks Sven)
> o Fixed IBATIS-152, 149, 116 null result sets now handled properly by JDBC
> logging classes (thanks Sven)
> o Fixed IBATIS-146 consumes additional result sets before retrieving
> output params (JTDS fix)
> o Fixed IBATIS-130 parameter maps don't allow for complete TypeHandler
> implementations
> o Fixed IBATIS-148 parameter maps don't allow for complete TypeHandler
> implementations
> o Removed dependency on Commons Logging, will autodetect and use Commons
> Logging, Log4J, JDK 1.4 or no logging
> o Improved entity resolvers to be smarter, checks both system and public
> IDs, and both ibatis.com and apache.org
>
>
>
> http://prdownloads.sourceforge.net/ibatisdb/iBATIS_DBL-2.1.5.582.zip?download
>
>
> Again I think we need to know more about how you are running your app?  Is
> is a standalone app or a webapp?  If it is a webapp then what server are you
> running and on  what OS?  Also what is the jvm that you are running on?
>
>
> Nathan
>
>
>
>  On Dec 13, 2005, at 10:46 AM, Mark Bennett wrote:
>
>  I'm using iBATIS_DBL-2.1.0.565.  The jars are already in my classpath so
> do I need to give it some more hints somehow to let it know where inside the
> jars the dtds are?  Thanks!
>
> Here are the dtds I have:
>
> <!DOCTYPE daoConfig PUBLIC "-//iBATIS.com//DTD DAO Configuration 2.0//EN"
> "http://ibatis.apache.org/dtd/dao-2.dtd">
>
> <!
> DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "
> http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
>
> <!
> DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "
> http://ibatis.apache.org/dtd/sql-map-2.dtd">
>
> And my error (only when apache.org is down):
>
> Caused by: java.lang.RuntimeException: Could not initialize DaoConfig.
> Cause: com.ibatis.dao.client.DaoException: Error while configuring
> DaoManager.  Cause: com.ibatis.common.exception.NestedRuntimeException:
> XML Parser Error.  Cause: java.net.ConnectException: Tried all: '1'
> addresses, but could not connect over HTTP to server: 'ibatis.apache.org',
> port: '80'
> Caused by: com.ibatis.common.exception.NestedRuntimeException : XML Parser
> Error.  Cause: java.net.ConnectException: Tried all: '1' addresses, but
> could not connect over HTTP to server: 'ibatis.apache.org', port: '80'
> at ncjoin.persistence.DaoConfig .(DaoConfig.java:26)
> ... 29 more
>
>
>
>
> On 12/13/05, Jeff Butler <je...@gmail.com> wrote:
> >
> > The DTDs are also contained in the iBATIS JAR file, and iBATIS does
> > not go to the internet to validate.  Typically, the DTDs on the
> > internet are only used in tools like validating XML editors.  So there
> > must be some other problem.
> >
> > What IDE are you using?
> > Are you using the latest iBATIS release?
> > Do you have the DOCTYPEs set properly (as shown on the iBATIS home page
> > now)?
> >
> > Jeff Butler
> >
> >
> > On 12/13/05, Mark Bennett <ma...@gmail.com> wrote:
> > > I do know that you can replace ibatis.apache.org with ibatis.com and
> > that
> > > will work as long as Clinton keeps that domain running.  You would
> > think
> > > that apache would be more stable than it is.  I'm struggling with the
> > same
> > > problem.  If apache won't stay up perhaps we'll just host it on our
> > public
> > > web site.
> > >
> > > Mark
> > >
> > >
> > > On 12/13/05, Sathish S <flex2004@gmail.com > wrote:
> > > > Hi All,
> > > >     I have been facing some problems using iBatis. I have noticed
> > that
> > > whenever the site ( iBatis.apache.org <http://ibatis.apache.org/>) is
> > down, the application hangs and it
> > > does not perform anything (Its probably because the schemas are
> > validated
> > > using the DTD's from this site). How do we overcome such a scenario?
> > Also
> > > how do we deploy our application  in  intranet where there's no
> > connection
> > > to the internet?
> > > >
> > > >    I appreciate any help / suggestion on this.
> > > >
> > > > --
> > > > Thanks,
> > > > Sathish S
> > >
> > >
> >
>
>
>
>

Re: iBatis DTD validation

Posted by Nathan Maves <Na...@Sun.COM>.
Mark,

Everything looks good to me.  There is nothing that you have to do on  
your part to get the parser to look inside of the jar files.

You might want to upgrade your ibatis jars to the newest build. I  
would stick to 2.1.5 as a production release but there is a newer  
build then you have.  As you can see below there was a fix with the  
entity resolver.

Build Date: 2005/07/17 20:58
Build Number: 582

------------------------------
2.1.5 - July 17, 2005
------------------------------

o Fixed IBATIS-136 groupBy not carried forward to extended result maps
o Fixed IBATIS-139 discriminator being applied to too many result  
maps (thanks Sven)
o Fixed IBATIS-152, 149, 116 null result sets now handled properly by  
JDBC logging classes (thanks Sven)
o Fixed IBATIS-146 consumes additional result sets before retrieving  
output params (JTDS fix)
o Fixed IBATIS-130 parameter maps don't allow for complete  
TypeHandler implementations
o Fixed IBATIS-148 parameter maps don't allow for complete  
TypeHandler implementations
o Removed dependency on Commons Logging, will autodetect and use  
Commons Logging, Log4J, JDK 1.4 or no logging
o Improved entity resolvers to be smarter, checks both system and  
public IDs, and both ibatis.com and apache.org

http://prdownloads.sourceforge.net/ibatisdb/iBATIS_DBL-2.1.5.582.zip? 
download

Again I think we need to know more about how you are running your  
app?  Is is a standalone app or a webapp?  If it is a webapp then  
what server are you running and on  what OS?  Also what is the jvm  
that you are running on?

Nathan


On Dec 13, 2005, at 10:46 AM, Mark Bennett wrote:

> I'm using iBATIS_DBL-2.1.0.565.  The jars are already in my  
> classpath so do I need to give it some more hints somehow to let it  
> know where inside the jars the dtds are?  Thanks!
>
> Here are the dtds I have:
>
> <!DOCTYPE daoConfig PUBLIC "-//iBATIS.com//DTD DAO Configuration  
> 2.0//EN" "http://ibatis.apache.org/dtd/dao-2.dtd">
> <!
>
> DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0// 
> EN" "http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
> <!
>
> DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"  
> "http://ibatis.apache.org/dtd/sql-map-2.dtd">
>
> And my error (only when apache.org is down):
>
> Caused by: java.lang.RuntimeException: Could not initialize  
> DaoConfig.  Cause: com.ibatis.dao.client.DaoException: Error while  
> configuring DaoManager.  Cause:  
> com.ibatis.common.exception.NestedRuntimeException: XML Parser  
> Error.  Cause: java.net.ConnectException: Tried all: '1' addresses,  
> but could not connect over HTTP to server: 'ibatis.apache.org',  
> port: '80'
> Caused by: com.ibatis.common.exception.NestedRuntimeException : XML  
> Parser Error.  Cause: java.net.ConnectException: Tried all: '1'  
> addresses, but could not connect over HTTP to server:  
> 'ibatis.apache.org', port: '80'
> at ncjoin.persistence.DaoConfig .(DaoConfig.java:26)
> ... 29 more
>
>
>
>
> On 12/13/05, Jeff Butler <je...@gmail.com> wrote:
> The DTDs are also contained in the iBATIS JAR file, and iBATIS does
> not go to the internet to validate.  Typically, the DTDs on the
> internet are only used in tools like validating XML editors.  So there
> must be some other problem.
>
> What IDE are you using?
> Are you using the latest iBATIS release?
> Do you have the DOCTYPEs set properly (as shown on the iBATIS home  
> page now)?
>
> Jeff Butler
>
>
> On 12/13/05, Mark Bennett <ma...@gmail.com> wrote:
> > I do know that you can replace ibatis.apache.org with ibatis.com  
> and that
> > will work as long as Clinton keeps that domain running.  You  
> would think
> > that apache would be more stable than it is.  I'm struggling with  
> the same
> > problem.  If apache won't stay up perhaps we'll just host it on  
> our public
> > web site.
> >
> > Mark
> >
> >
> > On 12/13/05, Sathish S <flex2004@gmail.com > wrote:
> > > Hi All,
> > >     I have been facing some problems using iBatis. I have  
> noticed that
> > whenever the site ( iBatis.apache.org) is down, the application  
> hangs and it
> > does not perform anything (Its probably because the schemas are  
> validated
> > using the DTD's from this site). How do we overcome such a  
> scenario? Also
> > how do we deploy our application  in  intranet where there's no  
> connection
> > to the internet?
> > >
> > >    I appreciate any help / suggestion on this.
> > >
> > > --
> > > Thanks,
> > > Sathish S
> >
> >
>


Re: iBatis DTD validation

Posted by Mark Bennett <ma...@gmail.com>.
I'm using iBATIS_DBL-2.1.0.565.  The jars are already in my classpath so do
I need to give it some more hints somehow to let it know where inside the
jars the dtds are?  Thanks!

Here are the dtds I have:

<!DOCTYPE daoConfig PUBLIC "-//iBATIS.com//DTD DAO Configuration 2.0//EN" "
http://ibatis.apache.org/dtd/dao-2.dtd">

<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "
http://ibatis.apache.org/dtd/sql-map-config-2.dtd">

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

And my error (only when apache.org is down):

Caused by: java.lang.RuntimeException: Could not initialize DaoConfig.
Cause: com.ibatis.dao.client.DaoException: Error while configuring
DaoManager.  Cause: com.ibatis.common.exception.NestedRuntimeException: XML
Parser Error.  Cause: java.net.ConnectException: Tried all: '1' addresses,
but could not connect over HTTP to server: 'ibatis.apache.org', port: '80'
Caused by: com.ibatis.common.exception.NestedRuntimeException: XML Parser
Error.  Cause: java.net.ConnectException: Tried all: '1' addresses, but
could not connect over HTTP to server: 'ibatis.apache.org', port: '80'
at ncjoin.persistence.DaoConfig.(DaoConfig.java:26)
... 29 more




On 12/13/05, Jeff Butler <je...@gmail.com> wrote:
>
> The DTDs are also contained in the iBATIS JAR file, and iBATIS does
> not go to the internet to validate.  Typically, the DTDs on the
> internet are only used in tools like validating XML editors.  So there
> must be some other problem.
>
> What IDE are you using?
> Are you using the latest iBATIS release?
> Do you have the DOCTYPEs set properly (as shown on the iBATIS home page
> now)?
>
> Jeff Butler
>
>
> On 12/13/05, Mark Bennett <ma...@gmail.com> wrote:
> > I do know that you can replace ibatis.apache.org with ibatis.com and
> that
> > will work as long as Clinton keeps that domain running.  You would think
> > that apache would be more stable than it is.  I'm struggling with the
> same
> > problem.  If apache won't stay up perhaps we'll just host it on our
> public
> > web site.
> >
> > Mark
> >
> >
> > On 12/13/05, Sathish S <fl...@gmail.com> wrote:
> > > Hi All,
> > >     I have been facing some problems using iBatis. I have noticed that
> > whenever the site ( iBatis.apache.org) is down, the application hangs
> and it
> > does not perform anything (Its probably because the schemas are
> validated
> > using the DTD's from this site). How do we overcome such a scenario?
> Also
> > how do we deploy our application  in  intranet where there's no
> connection
> > to the internet?
> > >
> > >    I appreciate any help / suggestion on this.
> > >
> > > --
> > > Thanks,
> > > Sathish S
> >
> >
>

Re: iBatis DTD validation

Posted by Jeff Butler <je...@gmail.com>.
The DTDs are also contained in the iBATIS JAR file, and iBATIS does
not go to the internet to validate.  Typically, the DTDs on the
internet are only used in tools like validating XML editors.  So there
must be some other problem.

What IDE are you using?
Are you using the latest iBATIS release?
Do you have the DOCTYPEs set properly (as shown on the iBATIS home page now)?

Jeff Butler


On 12/13/05, Mark Bennett <ma...@gmail.com> wrote:
> I do know that you can replace ibatis.apache.org with ibatis.com and that
> will work as long as Clinton keeps that domain running.  You would think
> that apache would be more stable than it is.  I'm struggling with the same
> problem.  If apache won't stay up perhaps we'll just host it on our public
> web site.
>
> Mark
>
>
> On 12/13/05, Sathish S <fl...@gmail.com> wrote:
> > Hi All,
> >     I have been facing some problems using iBatis. I have noticed that
> whenever the site ( iBatis.apache.org) is down, the application hangs and it
> does not perform anything (Its probably because the schemas are validated
> using the DTD's from this site). How do we overcome such a scenario? Also
> how do we deploy our application  in  intranet where there's no connection
> to the internet?
> >
> >    I appreciate any help / suggestion on this.
> >
> > --
> > Thanks,
> > Sathish S
>
>

Re: iBatis DTD validation

Posted by Nathan Maves <Na...@Sun.COM>.
I have to agree with Larry on this topic.  The real issue is why your  
parser is not using your local copy of the DTD.  All of the DTD's are  
in the ibatis jar files.  Look ups via the internet are slow and  
costly.  Not only are the costly in runtime but in dollar value from  
the bandwidth that they consume.  The DTD's on ibatis.com WILL be  
removed later this month for just this reason.  All users have been  
asked to migrate their applications to the DTD's on apache.org.

Nathan

On Dec 13, 2005, at 6:43 AM, Mark Bennett wrote:

> I do know that you can replace ibatis.apache.org with ibatis.com  
> and that will work as long as Clinton keeps that domain running.   
> You would think that apache would be more stable than it is.  I'm  
> struggling with the same problem.  If apache won't stay up perhaps  
> we'll just host it on our public web site.
>
> Mark
>
>
> On 12/13/05, Sathish S <fl...@gmail.com> wrote:
> Hi All,
>     I have been facing some problems using iBatis. I have noticed  
> that whenever the site ( iBatis.apache.org) is down, the  
> application hangs and it does not perform anything (Its probably  
> because the schemas are validated using the DTD's from this site).  
> How do we overcome such a scenario? Also how do we deploy our  
> application  in  intranet where there's no connection to the internet?
>
>    I appreciate any help / suggestion on this.
>
> -- 
> Thanks,
> Sathish S
>


Re: iBatis DTD validation

Posted by Mark Bennett <ma...@gmail.com>.
I do know that you can replace ibatis.apache.org with ibatis.com and that
will work as long as Clinton keeps that domain running.  You would think
that apache would be more stable than it is.  I'm struggling with the same
problem.  If apache won't stay up perhaps we'll just host it on our public
web site.

Mark


On 12/13/05, Sathish S <fl...@gmail.com> wrote:
>
> Hi All,
>     I have been facing some problems using iBatis. I have noticed that
> whenever the site (iBatis.apache.org <http://ibatis.apache.org/>) is down,
> the application hangs and it does not perform anything (Its probably because
> the schemas are validated using the DTD's from this site). How do we
> overcome such a scenario? Also how do we deploy our application  in
> intranet where there's no connection to the internet?
>
>    I appreciate any help / suggestion on this.
>
> --
> Thanks,
> Sathish S