New doctype won't work

2005-11-18 Thread Vincent NICOLAS

Hi everyone,

I'm trying to change my DOCTYPE from
!DOCTYPE sqlMapConfig PUBLIC -//iBATIS.com//DTD SQL Map Config 
2.0//EN http://www.ibatis.com/dtd/sql-map-config-2.dtd;


to the new one :
!DOCTYPE sqlMapConfig PUBLIC -//ibatis.apache.org//DTD SQL Map Config 
2.0//EN http://ibatis.apache.org/dtd/sql-map-config-2.dtd;


However, doing so leads to an error when I launch Tomcat (4.1.31, from 
Eclipse 3.1) : a connect error (timeout). This behavior seems logical to 
me because my computer is behind a proxy, and I haven't set any proxy 
config in Tomcat. The question is : why it is working in the first case ?


Any idea is welcome...

--
Vincent NICOLAS
Teamlog, Lyon



Re: [Fwd: [Fwd: Re: connection pooling]]

2005-11-18 Thread mischa
what happens if the ping fails. does the connection getting removed from 
the pool?
the reason why i don't have pinging enabled is because i want to control 
the case when a connection is closed for one cluster on my own (so i can 
switch to another cluster). even if i could solve the problem by pinging 
the connection i still think it is bad that closed connections are 
getting put back into the pool (or not getting recycled after a certain 
period).



Do you have the ping query (or validation query) enabled?

Cheers,
Clinton

On 11/17/05, *mischa* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
wrote:


is there anything i can do to prevent ibatis from putting back
connetions to the pool when they are already closed? i am working with
cluster pairs and when the connection to one cluster fails i am
switching back to another. it seems like the connection that
failed/is
closed is getting put back into the pool and is not getting
reinitialized by the pool. so even if the first cluster is back
online i
am getting a

Cause: java.sql.SQLException: No operations allowed after
connection closed.

any thoughts?
thanks,
mischa







Re: Reusing resultmap for nested object

2005-11-18 Thread Medium

Hi Jeff,

Thanks for the clarification. I have filed a jira request (IBATIS-225)

Anyone who may find this useful, please vote for it.

Huy

Jeff Butler wrote:

I believe this is because reusing result maps is a feature of the 
groupBy function, and iBATIS assumes the property will be a 
Collection of some kind.  So, the real answer is that you can reuse 
result maps if your properties are collections.  Otherwise not.
 
I'm not sure if this is an oversight or by design - but it probably 
should be fixed/enhanced.  You could file a JIRA request to help us 
remember.
 
Jeff Butler
 
On 11/17/05, *Medium* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


I tried this, but get the following error. I am using the java version
2.1.6.589 (Sorry about the long trace). Hoping someone can shed some
light on this.

Thanks.

Huy


My map is below:


sqlMap namespace=Pick
resultMap id=pickResultMap class=package.domain.Pick
   result column=pick_id property=pickId/
   result column=pick_ref property=pickRef/
/resultMap
resultMap id=pickJoined class=package.domain.Pick
extends=pickResultMap
   result property=sale resultMap=Sale.Sale/
/resultMap
/sqlMap

sqlMap namespace=Sale
typeAlias alias=Sale type= openlink.domain.Sale/
resultMap id=Sale class=Sale
   result column=sale_id property=saleId/
/resultMap
/sqlMap

org.springframework.jdbc.UncategorizedSQLException: (SqlMapClient
operation): encountered SQLException [
--- The error occurred in openlink/dao/ibatis/maps/Pick.xml.
--- The error occurred while applying a result map.
--- Check the Pick.pickJoined.
--- The error happened while setting a property on the result object.
--- Cause: com.ibatis.sqlmap.client.SqlMapException: Error
instantiating
collection property for mapping 'sale'.  Cause:
java.lang.ClassCastException
Caused by: java.lang.ClassCastException]; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in openlink/dao/ibatis/maps/Pick.xml.
--- The error occurred while applying a result map.
--- Check the Pick.pickJoined.
--- The error happened while setting a property on the result object.
--- Cause: com.ibatis.sqlmap.client.SqlMapException: Error
instantiating
collection property for mapping 'sale'.  Cause:
java.lang.ClassCastException
Caused by: java.lang.ClassCastException
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in openlink/dao/ibatis/maps/Pick.xml.
--- The error occurred while applying a result map.
--- Check the Pick.pickJoined.
--- The error happened while setting a property on the result object.
--- Cause: com.ibatis.sqlmap.client.SqlMapException: Error
instantiating
collection property for mapping 'sale'.  Cause:
java.lang.ClassCastException
Caused by: java.lang.ClassCastException
Caused by: com.ibatis.sqlmap.client.SqlMapException: Error
instantiating
collection property for mapping 'sale'.  Cause:
java.lang.ClassCastException
Caused by: java.lang.ClassCastException
   at

com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:188)
   at



Gilles Bayon wrote:

 This syntax
 resultMap id=product
 result property=id column=PRD_ID/
 result property=description column=PRD_DESCRIPTION/
 result property=category resultMap=category
 /resultMap

 is supported .


 On 11/16/05, *Medium*  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
wrote:

 Hi,

 Is there a way to reuse a resultmap for a nested object ?

 I know how to map it as specified by the docs but its
getting a bit
 unwieldly with all the repetition.

 Docs:
 resultMap
 result property=id column=PRD_ID/
 result property=description column=PRD_DESCRIPTION/
 result property=category.id http://category.id
column=CAT_ID /
 result property=category.description
column=CAT_DESCRIPTION /
 /resultMap

 Goal:
 resultMap id=product
 result property=id column=PRD_ID/
 result property=description column=PRD_DESCRIPTION/
 result property=category resultMap=category
 /resultMap

 resultMap id=category
 result property=id column=CAT_ID/
 result property=description column=CAT_DESCRIPTION/
 /resultMap

 Any help would be greatly appreciated. A simple yah or nah would
 do fine
 as well.

 Thanks

 Huy








Re: connection pooling

2005-11-18 Thread mischa
what happens if the ping fails. does the connection getting removed from 
the pool?
the reason why i don't have pinging enabled is because i want to control 
the case when a connection is closed for one cluster on my own (so i can 
switch to another cluster). even if i could solve the problem by pinging 
the connection i still think it is bad that closed connections are 
getting put back into the pool (or not getting recycled after a certain 
period).

thanks.

Do you have the ping query (or validation query) enabled?

Cheers,
Clinton

On 11/17/05, *mischa* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
wrote:


   is there anything i can do to prevent ibatis from putting back
   connetions to the pool when they are already closed? i am working with
   cluster pairs and when the connection to one cluster fails i am
   switching back to another. it seems like the connection that
   failed/is
   closed is getting put back into the pool and is not getting
   reinitialized by the pool. so even if the first cluster is back
   online i
   am getting a

   Cause: java.sql.SQLException: No operations allowed after
   connection closed.

   any thoughts?
   thanks,
   mischa




Re: Nested Result Sets with inner joins (important!)

2005-11-18 Thread Jeff Butler
Wow - synchronicity. This is the same as IBATIS-225 (just filed). I agree that this should be fixed/enhanced. There are some issues, but we should be able to overcome them.

Jeff Butler
On 11/18/05, Paul Benedict [EMAIL PROTECTED]
 wrote: 
Clinton,One of the most disappointing aspects of IBATIS has to be the inability to reuse result maps for 
nested properties. IBATIS only allows me to use them if I [1] use another select or [2] use acollection. I get this error every time:Error instantiating collection property for mapping 'apple'. 
I ask this because sometimes I need to do joins for efficiency and want to reuse my resultMap topopulate my inner objects. The user guide talks about how we can use the nested notation to getthis done, but it's too much work to list out all the properties again. I would love to see 
something like this come along soon:resultMap id=fruitMap class=TootyFruityresult property=apple resultMap=appleMap/result property=orange resultMap=orangeMap/ 
/resultMapresultMap id=appleMap class=Appleresult property=id column=id/result property=name column=name/ 
/resultMapThis way I can write a select to populate fruitMap that joins to APPLE and ORANGE and use myexisting maps for them to populate them as children of TootyFruit. --Gotta love the names! 
What do you think? This is very important to me. Hibernate can do this, why can't we?Thanks!Paul__Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs


Re: New doctype won't work

2005-11-18 Thread Vincent NICOLAS
Thanks you for the quick answer. Does this mean that I will have to 
change it again with a future revision of iBatis ? Or will the 
//iBatis.com be recognize too in future releases ?



Niels Beekman a écrit :


iBATIS uses a SAX EntityResolver to resolve DTD's from the iBATIS jars.
The public identifier //ibatis.apache.org does not resolve to the jars
yet. If you use the following:

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

it should work.

Niels

-Original Message-
From: Vincent NICOLAS [mailto:[EMAIL PROTECTED] 
Sent: vrijdag 18 november 2005 11:12

To: user-java@ibatis.apache.org
Subject: New doctype won't work

Hi everyone,

I'm trying to change my DOCTYPE from
!DOCTYPE sqlMapConfig PUBLIC -//iBATIS.com//DTD SQL Map Config 
2.0//EN http://www.ibatis.com/dtd/sql-map-config-2.dtd;


to the new one :
!DOCTYPE sqlMapConfig PUBLIC -//ibatis.apache.org//DTD SQL Map Config 
2.0//EN http://ibatis.apache.org/dtd/sql-map-config-2.dtd;


However, doing so leads to an error when I launch Tomcat (4.1.31, from 
Eclipse 3.1) : a connect error (timeout). This behavior seems logical to


me because my computer is behind a proxy, and I haven't set any proxy 
config in Tomcat. The question is : why it is working in the first case

?

Any idea is welcome...
 



--
Vincent NICOLAS
Teamlog, Lyon



RE: New doctype won't work

2005-11-18 Thread Niels Beekman
One of the developers should comment on this, personally I think the identifier 
will be recognized in future versions, amongst other reasons, it saves bandwith 
and is a small effort.

Niels

-Original Message-
From: Vincent NICOLAS [mailto:[EMAIL PROTECTED] 
Sent: vrijdag 18 november 2005 14:34
To: user-java@ibatis.apache.org
Subject: Re: New doctype won't work

Thanks you for the quick answer. Does this mean that I will have to 
change it again with a future revision of iBatis ? Or will the 
//iBatis.com be recognize too in future releases ?


Niels Beekman a écrit :

iBATIS uses a SAX EntityResolver to resolve DTD's from the iBATIS jars.
The public identifier //ibatis.apache.org does not resolve to the jars
yet. If you use the following:

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

it should work.

Niels

-Original Message-
From: Vincent NICOLAS [mailto:[EMAIL PROTECTED] 
Sent: vrijdag 18 november 2005 11:12
To: user-java@ibatis.apache.org
Subject: New doctype won't work

Hi everyone,

I'm trying to change my DOCTYPE from
!DOCTYPE sqlMapConfig PUBLIC -//iBATIS.com//DTD SQL Map Config 
2.0//EN http://www.ibatis.com/dtd/sql-map-config-2.dtd;

to the new one :
!DOCTYPE sqlMapConfig PUBLIC -//ibatis.apache.org//DTD SQL Map Config 
2.0//EN http://ibatis.apache.org/dtd/sql-map-config-2.dtd;

However, doing so leads to an error when I launch Tomcat (4.1.31, from 
Eclipse 3.1) : a connect error (timeout). This behavior seems logical to

me because my computer is behind a proxy, and I haven't set any proxy 
config in Tomcat. The question is : why it is working in the first case
?

Any idea is welcome...
  


-- 
Vincent NICOLAS
Teamlog, Lyon



Re: New doctype won't work

2005-11-18 Thread Jeff Butler
The entity resolver ignores the public id - the system id is what's important. There was a bug in this area that was fixed in version 2.1.5 - make sure you are using that version. If you are not using 2.1.5, then you'll need to use the old system ids.


Jeff Butler
On 11/18/05, Niels Beekman [EMAIL PROTECTED] wrote:
One of the developers should comment on this, personally I think the identifier will be recognized in future versions, amongst other reasons, it saves bandwith and is a small effort.
Niels-Original Message-From: Vincent NICOLAS [mailto:[EMAIL PROTECTED]]Sent: vrijdag 18 november 2005 14:34To: 
user-java@ibatis.apache.orgSubject: Re: New doctype won't workThanks you for the quick answer. Does this mean that I will have tochange it again with a future revision of iBatis ? Or will the//iBatis.com be recognize too in future releases ?
Niels Beekman a écrit :iBATIS uses a SAX EntityResolver to resolve DTD's from the iBATIS jars.The public identifier //ibatis.apache.org does not resolve to the jarsyet. If you use the following:
!DOCTYPE sqlMapConfig PUBLIC -//iBATIS.com//DTD SQL Map Config2.0//EN http://ibatis.apache.org/dtd/sql-map-config-2.dtd
it should work.Niels-Original Message-From: Vincent NICOLAS [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 18 november 2005 11:12To: user-java@ibatis.apache.orgSubject: New doctype won't workHi everyone,I'm trying to change my DOCTYPE from
!DOCTYPE sqlMapConfig PUBLIC -//iBATIS.com//DTD SQL Map Config2.0//EN http://www.ibatis.com/dtd/sql-map-config-2.dtd
to the new one :!DOCTYPE sqlMapConfig PUBLIC -//ibatis.apache.org//DTD SQL Map Config2.0//EN 
http://ibatis.apache.org/dtd/sql-map-config-2.dtdHowever, doing so leads to an error when I launch Tomcat (4.1.31, fromEclipse 3.1) : a connect error (timeout). This behavior seems logical to
me because my computer is behind a proxy, and I haven't set any proxyconfig in Tomcat. The question is : why it is working in the first case?Any idea is welcome...
--Vincent NICOLASTeamlog, Lyon


Re: Error when sqlMap has no SQL statements defined

2005-11-18 Thread Jeff Butler
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 [EMAIL PROTECTED] wrote:
HelloWhy do i get following errorCaused 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)atorg/xml/sax/SAXException.init(SAXException.java
:55)atorg/xml/sax/SAXParseException.init(SAXParseException.java:56)atorg/apache/crimson/parser/Parser2.error(Parser2.java:3343)atorg/apache/crimson/parser/ValidatingParser$ChildrenValidator.done(
ValidatingParser.java:361)atorg/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//DTDSQLMap Config 2.0//ENhttp://www.ibatis.com/dtd/sql-map-config-2.dtd
sqlMapConfigsqlMap resource=PODataAS400.xml //sqlMapConfigAnd my PODataAS400.xml is as below?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE sqlMapPUBLIC -//iBATIS.com//DTD SQL Map 2.0//ENhttp://www.ibatis.com/dtd/sql-map-2.dtdsqlMap namespace=POData
/sqlMapI have not defined any SQL, is it not legal to dosoAshishA$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

2005-11-18 Thread Ashish Kulkarni
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 [EMAIL PROTECTED] 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
 [EMAIL PROTECTED] 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: New doctype won't work

2005-11-18 Thread Vincent NICOLAS

Unfortunately, I am using 2.1.5.

Jeff Butler a écrit :

The entity resolver ignores the public id - the system id is what's 
important.  There was a bug in this area that was fixed in version 
2.1.5 - make sure you are using that version.  If you are not using 
2.1.5, then you'll need to use the old system ids.
 
Jeff Butler


 
On 11/18/05, *Niels Beekman* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


One of the developers should comment on this, personally I think
the identifier will be recognized in future versions, amongst
other reasons, it saves bandwith and is a small effort.

Niels

-Original Message-
From: Vincent NICOLAS [mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]]
Sent: vrijdag 18 november 2005 14:34
To: user-java@ibatis.apache.org mailto:user-java@ibatis.apache.org
Subject: Re: New doctype won't work

Thanks you for the quick answer. Does this mean that I will have to
change it again with a future revision of iBatis ? Or will the
//iBatis.com be recognize too in future releases ?


Niels Beekman a écrit :

iBATIS uses a SAX EntityResolver to resolve DTD's from the iBATIS
jars.
The public identifier //ibatis.apache.org does not resolve to the
jars
yet. If you use the following:

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

it should work.

Niels

-Original Message-
From: Vincent NICOLAS [mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]]
Sent: vrijdag 18 november 2005 11:12
To: user-java@ibatis.apache.org mailto:user-java@ibatis.apache.org
Subject: New doctype won't work

Hi everyone,

I'm trying to change my DOCTYPE from
!DOCTYPE sqlMapConfig PUBLIC -//iBATIS.com//DTD SQL Map Config
2.0//EN http://www.ibatis.com/dtd/sql-map-config-2.dtd;
http://www.ibatis.com/dtd/sql-map-config-2.dtd%22

to the new one :
!DOCTYPE sqlMapConfig PUBLIC -//ibatis.apache.org//DTD SQL Map
Config
2.0//EN  http://ibatis.apache.org/dtd/sql-map-config-2.dtd;
http://ibatis.apache.org/dtd/sql-map-config-2.dtd%22

However, doing so leads to an error when I launch Tomcat (4.1.31,
from
Eclipse 3.1) : a connect error (timeout). This behavior seems
logical to

me because my computer is behind a proxy, and I haven't set any proxy
config in Tomcat. The question is : why it is working in the
first case
?

Any idea is welcome...







--
Vincent NICOLAS
Teamlog, Lyon



Re: New doctype won't work

2005-11-18 Thread Clinton Begin


2.1.6 improved this yet again. So you should upgrade if you can. 

Here's the code:

http://svn.apache.org/repos/asf/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapClasspathEntityResolver.java

It should be case insensitive and should fully support both ibatis.com and apache.org doctypes.

Comments welcome.

Cheers,
Clinton



On 11/18/05, Vincent NICOLAS [EMAIL PROTECTED] wrote:
Unfortunately, I am using 2.1.5.Jeff Butler a écrit : The entity resolver ignores the public id - the system id is what's important.There was a bug in this area that was fixed in version 
2.1.5 - make sure you are using that version.If you are not using 2.1.5, then you'll need to use the old system ids. Jeff Butler On 11/18/05, *Niels Beekman* 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: One of the developers should comment on this, personally I think the identifier will be recognized in future versions, amongst
 other reasons, it saves bandwith and is a small effort. Niels -Original Message- From: Vincent NICOLAS [mailto:
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]] Sent: vrijdag 18 november 2005 14:34 To: 
user-java@ibatis.apache.org mailto:user-java@ibatis.apache.org Subject: Re: New doctype won't work Thanks you for the quick answer. Does this mean that I will have to
 change it again with a future revision of iBatis ? Or will the //iBatis.com be recognize too in future releases ? Niels Beekman a écrit : iBATIS uses a SAX EntityResolver to resolve DTD's from the iBATIS
 jars. The public identifier //ibatis.apache.org does not resolve to the jars yet. If you use the following:  !DOCTYPE sqlMapConfig PUBLIC -//iBATIS.com//DTD SQL Map Config
 2.0//EN http://ibatis.apache.org/dtd/sql-map-config-2.dtd 
http://ibatis.apache.org/dtd/sql-map-config-2.dtd%22  it should work.  Niels  -Original Message- From: Vincent NICOLAS [mailto:
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]] Sent: vrijdag 18 november 2005 11:12
 To: user-java@ibatis.apache.org mailto:user-java@ibatis.apache.org Subject: New doctype won't work
  Hi everyone,  I'm trying to change my DOCTYPE from !DOCTYPE sqlMapConfig PUBLIC -//iBATIS.com//DTD SQL Map Config 
2.0//EN http://www.ibatis.com/dtd/sql-map-config-2.dtd http://www.ibatis.com/dtd/sql-map-config-2.dtd%22
  to the new one : !DOCTYPE sqlMapConfig PUBLIC -//ibatis.apache.org//DTD SQL Map Config 2.0//EN  
http://ibatis.apache.org/dtd/sql-map-config-2.dtd http://ibatis.apache.org/dtd/sql-map-config-2.dtd%22 
 However, doing so leads to an error when I launch Tomcat (4.1.31, from Eclipse 3.1) : a connect error (timeout). This behavior seems logical to  me because my computer is behind a proxy, and I haven't set any proxy
 config in Tomcat. The question is : why it is working in the first case ?  Any idea is welcome...  
--Vincent NICOLASTeamlog, Lyon


Re: New doctype won't work

2005-11-18 Thread Clinton Begin

Sorry, my bad. This code isn't in 2.1.6. It will be in the next release.

Cheers,
Clinton
On 11/18/05, Clinton Begin [EMAIL PROTECTED] wrote:


2.1.6 improved this yet again. So you should upgrade if you can. 

Here's the code:


http://svn.apache.org/repos/asf/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapClasspathEntityResolver.java

It should be case insensitive and should fully support both ibatis.com and 
apache.org doctypes.

Comments welcome.

Cheers,
Clinton



On 11/18/05, Vincent NICOLAS [EMAIL PROTECTED]
 wrote:
Unfortunately, I am using 2.1.5.Jeff Butler a écrit : The entity resolver ignores the public id - the system id is what's important.There was a bug in this area that was fixed in version
 
2.1.5 - make sure you are using that version.If you are not using 2.1.5, then you'll need to use the old system ids. Jeff Butler On 11/18/05, *Niels Beekman* 

[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: One of the developers should comment on this, personally I think
 the identifier will be recognized in future versions, amongst
 other reasons, it saves bandwith and is a small effort. Niels -Original Message- From: Vincent NICOLAS [mailto:

[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]] Sent: vrijdag 18 november 2005 14:34
 To: 
user-java@ibatis.apache.org mailto:user-java@ibatis.apache.org Subject: Re: New doctype won't work
 Thanks you for the quick answer. Does this mean that I will have to
 change it again with a future revision of iBatis ? Or will the //iBatis.com be recognize too in future releases ? Niels Beekman a écrit : iBATIS uses a SAX EntityResolver to resolve DTD's from the iBATIS
 jars. The public identifier //ibatis.apache.org does not resolve to the jars yet. If you use the following:  !DOCTYPE sqlMapConfig PUBLIC -//iBATIS.com//DTD SQL Map Config
 2.0//EN http://ibatis.apache.org/dtd/sql-map-config-2.dtd
 
http://ibatis.apache.org/dtd/sql-map-config-2.dtd%22  it should work.  Niels  -Original Message- From: Vincent NICOLAS [mailto:
[EMAIL PROTECTED] mailto:
[EMAIL PROTECTED]] Sent: vrijdag 18 november 2005 11:12
 To: user-java@ibatis.apache.org mailto:
user-java@ibatis.apache.org Subject: New doctype won't work
  Hi everyone,  I'm trying to change my DOCTYPE from !DOCTYPE sqlMapConfig PUBLIC -//iBATIS.com//DTD SQL Map Config 
2.0//EN http://www.ibatis.com/dtd/sql-map-config-2.dtd 
http://www.ibatis.com/dtd/sql-map-config-2.dtd%22
  to the new one : !DOCTYPE sqlMapConfig PUBLIC -//ibatis.apache.org//DTD SQL Map Config 2.0//EN  

http://ibatis.apache.org/dtd/sql-map-config-2.dtd http://ibatis.apache.org/dtd/sql-map-config-2.dtd%22
 
 However, doing so leads to an error when I launch Tomcat (4.1.31, from Eclipse 3.1) : a connect error (timeout). This behavior seems logical to  me because my computer is behind a proxy, and I haven't set any proxy
 config in Tomcat. The question is : why it is working in the first case ?  Any idea is welcome...  

--Vincent NICOLASTeamlog, Lyon




Re: New doctype won't work

2005-11-18 Thread Clinton Begin

Here's the 2.1.6 code

http://svn.apache.org/repos/asf/ibatis/tags/java_release_2.1.6-589/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapClasspathEntityResolver.java



ClintonOn 11/18/05, Clinton Begin [EMAIL PROTECTED] wrote:

Sorry, my bad. This code isn't in 2.1.6. It will be in the next release.

Cheers,
Clinton
On 11/18/05, Clinton Begin [EMAIL PROTECTED]
 wrote:


2.1.6 improved this yet again. So you should upgrade if you can. 

Here's the code:



http://svn.apache.org/repos/asf/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapClasspathEntityResolver.java

It should be case insensitive and should fully support both ibatis.com and 

apache.org doctypes.

Comments welcome.

Cheers,
Clinton



On 11/18/05, Vincent NICOLAS [EMAIL PROTECTED]
 wrote:
Unfortunately, I am using 2.1.5.Jeff Butler a écrit : The entity resolver ignores the public id - the system id is what's important.There was a bug in this area that was fixed in version

 
2.1.5 - make sure you are using that version.If you are not using 2.1.5, then you'll need to use the old system ids. Jeff Butler On 11/18/05, *Niels Beekman* 


[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: One of the developers should comment on this, personally I think
 the identifier will be recognized in future versions, amongst
 other reasons, it saves bandwith and is a small effort. Niels -Original Message- From: Vincent NICOLAS [mailto:


[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]] Sent: vrijdag 18 november 2005 14:34
 To: 
user-java@ibatis.apache.org mailto:user-java@ibatis.apache.org Subject: Re: New doctype won't work
 Thanks you for the quick answer. Does this mean that I will have to
 change it again with a future revision of iBatis ? Or will the //iBatis.com be recognize too in future releases ? Niels Beekman a écrit : iBATIS uses a SAX EntityResolver to resolve DTD's from the iBATIS
 jars. The public identifier //ibatis.apache.org does not resolve to the jars yet. If you use the following:  !DOCTYPE sqlMapConfig PUBLIC -//iBATIS.com//DTD SQL Map Config
 2.0//EN http://ibatis.apache.org/dtd/sql-map-config-2.dtd
 
http://ibatis.apache.org/dtd/sql-map-config-2.dtd%22  it should work.  Niels  -Original Message- From: Vincent NICOLAS [mailto:
[EMAIL PROTECTED] mailto:

[EMAIL PROTECTED]] Sent: vrijdag 18 november 2005 11:12
 To: user-java@ibatis.apache.org mailto:

user-java@ibatis.apache.org Subject: New doctype won't work
  Hi everyone,  I'm trying to change my DOCTYPE from !DOCTYPE sqlMapConfig PUBLIC -//iBATIS.com//DTD SQL Map Config 
2.0//EN http://www.ibatis.com/dtd/sql-map-config-2.dtd 
http://www.ibatis.com/dtd/sql-map-config-2.dtd%22
  to the new one : !DOCTYPE sqlMapConfig PUBLIC -//ibatis.apache.org//DTD SQL Map Config 2.0//EN  


http://ibatis.apache.org/dtd/sql-map-config-2.dtd http://ibatis.apache.org/dtd/sql-map-config-2.dtd%22
 
 However, doing so leads to an error when I launch Tomcat (4.1.31, from Eclipse 3.1) : a connect error (timeout). This behavior seems logical to  me because my computer is behind a proxy, and I haven't set any proxy
 config in Tomcat. The question is : why it is working in the first case ?  Any idea is welcome...  


--Vincent NICOLASTeamlog, Lyon






Help With 2.0 SqlMap, XmlSqlMapBuilder

2005-11-18 Thread Scott Purcell

I am using the 2.1.5 Ibatis and I am following a 1.0 example (see below). 
Currently I am trying to compile the below code, but the SqlMap and the 
XmlSqlMapBuilder do not exist in the 2.1.5  libs.  When looking through the 
download I see them in the lib folder under 1-x-Compatibility. But I really do 
not want to use older files. I was building a new clean project and hoping to 
just use the 2.1.5 product.

So what is one to do when trying to Instantiate the SqlMap with 2.0?

Can someone give me a hand here, I have looked through all PDF doc with no 
help, and the JPetstore is using the DAO manager stuff, and I am not ready for 
that yet.

Thanks,


import com.ibatis.common.resources.Resources;
import com.ibatis.db.sqlmap.SqlMap;
import com.ibatis.db.sqlmap.XmlSqlMapBuilder;

public class BaseDAO {
private static Log log = LogFactory.getLog(BaseDAO.class);
private static SqlMap sqlMap = null;

static {
try {
String resource = com/some/fun/sql-map-config.xml;
Reader reader = Resources.getResourceAsReader(resource);
log.debug(reader = +reader );
sqlMap = XmlSqlMapBuilder.buildSqlMap(reader);
log.debug(sqlMap = +sqlMap );
reader.close();
} catch (Exception ex) {
log.error(BaseDAO static block:  + ex);
throw new RuntimeException(Error Initializing BaseDAO : + ex);
}
}





Re: Help With 2.0 SqlMap, XmlSqlMapBuilder

2005-11-18 Thread Jeff Butler
This should be pretty simple...

1. SqlMap -- SqlMapClient

2. XmlSqlMapBuilder.buildSqlMap -- SqlMapClientBuilder.buildSqlMapClient
Then make sure you use the 2.x versions of the DTDs.

Jeff Butler
On 11/18/05, Scott Purcell [EMAIL PROTECTED] wrote:
I am using the 2.1.5 Ibatis and I am following a 1.0 example (see below). Currently I am trying to compile the below code, but the SqlMap and the XmlSqlMapBuilder do not exist in the 
2.1.5libs.When looking through the download I see them in the lib folder under 1-x-Compatibility. But I really do not want to use older files. I was building a new clean project and hoping to just use the 2.1.5 product.
So what is one to do when trying to Instantiate the SqlMap with 2.0?Can someone give me a hand here, I have looked through all PDF doc with no help, and the JPetstore is using the DAO manager stuff, and I am not ready for that yet.
Thanks,import com.ibatis.common.resources.Resources;import com.ibatis.db.sqlmap.SqlMap;import com.ibatis.db.sqlmap.XmlSqlMapBuilder;public class BaseDAO { private static Log log = 
LogFactory.getLog(BaseDAO.class); private static SqlMap sqlMap = null; static { try { String resource = com/some/fun/sql-map-config.xml; Reader reader = Resources.getResourceAsReader
(resource); log.debug(reader = +reader ); sqlMap = XmlSqlMapBuilder.buildSqlMap(reader); log.debug(sqlMap = +sqlMap ); reader.close
(); } catch (Exception ex) { log.error(BaseDAO static block:  + ex); throw new RuntimeException(Error Initializing BaseDAO : + ex); } }