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 Zsolt Koppany <zk...@intland.com> on 2007/05/30 16:24:32 UTC

executing batch file

Hi,

what ist he best way to execute a batch file? Does ibatis support it? If
not, could spring help me?

Zsolt 


RE: Nested transactions?

Posted by Chris Lamey <cl...@localmatters.com>.
You could look at how Spring implements their declarative transaction
handling.

On Thu, 2007-05-31 at 08:14 -0500, Sudhir, Sudhir (Contractor) wrote:
> Thanks Clinton,
> 
> I am curious about the second approach, I don’t think I quite got what
> you are saying there…is there an example that you can illustrate or
> point to?
> 
>  
> 
> Thanks,
> 
> Sudhir
> 
>  
> 
> From: Clinton Begin [mailto:clinton.begin@gmail.com] 
> Sent: Wednesday, May 30, 2007 8:31 PM
> To: user-java@ibatis.apache.org
> Subject: Re: Nested transactions?
> 
> 
>  
> 
> The DAO framework is smart enough to deal with that.  But yeah, you
> need to move your transaction management out of those methods.  I
> understand the challenge there.  There are at least 3 possible
> solutions:
> 
> 1) Move the transaction control up to the web tier or at least higher
> than the service layer.  Servlet filters (or struts/webwork filters
> work well fot this).  This is the simplest approach and nobody should
> scare you out of high level transaction scoping...transactions should
> be as broadly scoped as possible.  An easy way to do it is start a
> transaction for all POST requests, but not for GET requests -- handle
> odd cases as appropriate.  
> 
> 2) Build your own filtering mechanism into your service layer.  It's
> fairly simple, you can copy the dynamic proxy code from the DAO
> manager that handles automatic transactions.  Basically the first
> service method called becomes the transaction scope, regardless of how
> many other services or DAOs it calls.  It can get a little tricky
> around the nested stuff (think ThreadLocal) and exception handling,
> but this is the way I almost always do it for clients. 
> 
> 3) Use Spring, it does all of the above.  And Spring 2 has simplified
> configuration quite a bit.  :-)
> 
> Cheers,
> Clinton
> 
> On 5/30/07, Sudhir, Sudhir (Contractor) <SS...@moneygram.com> wrote:
> 
> Thanks,
> 
> The only issue that you run into quite often is that you need both
> composite services as well as more fine grained services and both
> these kinds of services need to be "transaction aware". So you end of
> creating "layers on top of the service layer" to delegate and allow
> for transactions. Not a problem other than the fact not you have  a
> set of methods that do nothing but start and end transactions, just
> becomes cumbersome I guess.
> 
> So essentially if I wanted to do something to the effect, is my only
> option to re-factor such behavior into a different method?:
> 
> > ServiceClass1
> 
> > public void doSomething() {
> 
> >       try {
> 
> >              daoManager.startTransaction();
> 
> >              // Write some stuff to a database
> 
> >              daoManager.commitTransaction();
> 
> >       } catch (Exception e) {
> 
> >              throw e;
> 
> >       } finally {
> 
> >              daoManager.endTransaction();
> 
> >       }
> 
> > }
> 
> > 
> 
> > ServiceClass2
> 
> > public void doSomethingElse() {
> 
> >       try {
> 
> >              daoManager.startTransaction();
> 
> >              ServiceClass1 sc1 = new ServiceClass1();
> 
> >              sc1.doSomething();
> 
> >              // Write some stuff to a database
> 
> >              daoManager.commitTransaction();
> 
> >       } catch (Exception e) {
> 
> >              throw e;
> 
> >       } finally {
> 
> >              daoManager.endTransaction();
> 
> >       }
> 
> > }
> 
> Thanks,
> 
> -Sudhir
> 
>  
> 
> From: Clinton Begin [mailto:clinton.begin@gmail.com] 
> Sent: Wednesday, May 30, 2007 5:47 PM
> To: user-java@ibatis.apache.org
> Subject: Re: Nested transactions?
> 
> 
>  
> 
> Nested transactions are evil*.  iBATIS has a strict policy to use its
> powers only for good.  So unfortunately no.  
> 
> :-)
> 
> Clinton
> 
> * Why? See the 'A' in ACID.  http://en.wikipedia.org/wiki/ACID  
> 
> On 5/30/07, Sudhir, Sudhir (Contractor) <SS...@moneygram.com>
> wrote: 
> 
> Does iBatis support nested transactions?
> 
> -Sudhir
> ----------------------------------------- 
> 
> This message may contain confidential information.  If you are not
> the intended recipient, please notify the sender immediately and
> delete this email from your system.
> 
> 
>  
> 
> 
>  
> 
> 

RE: Nested transactions?

Posted by "Sudhir, Sudhir (Contractor)" <SS...@moneygram.com>.
Thanks Clinton,

I am curious about the second approach, I don't think I quite got what
you are saying there...is there an example that you can illustrate or
point to?

 

Thanks,

Sudhir

 

From: Clinton Begin [mailto:clinton.begin@gmail.com] 
Sent: Wednesday, May 30, 2007 8:31 PM
To: user-java@ibatis.apache.org
Subject: Re: Nested transactions?

 

The DAO framework is smart enough to deal with that.  But yeah, you need
to move your transaction management out of those methods.  I understand
the challenge there.  There are at least 3 possible solutions:

1) Move the transaction control up to the web tier or at least higher
than the service layer.  Servlet filters (or struts/webwork filters work
well fot this).  This is the simplest approach and nobody should scare
you out of high level transaction scoping...transactions should be as
broadly scoped as possible.  An easy way to do it is start a transaction
for all POST requests, but not for GET requests -- handle odd cases as
appropriate.  

2) Build your own filtering mechanism into your service layer.  It's
fairly simple, you can copy the dynamic proxy code from the DAO manager
that handles automatic transactions.  Basically the first service method
called becomes the transaction scope, regardless of how many other
services or DAOs it calls.  It can get a little tricky around the nested
stuff (think ThreadLocal) and exception handling, but this is the way I
almost always do it for clients. 

3) Use Spring, it does all of the above.  And Spring 2 has simplified
configuration quite a bit.  :-)

Cheers,
Clinton

On 5/30/07, Sudhir, Sudhir (Contractor) <SS...@moneygram.com> wrote:

Thanks,

The only issue that you run into quite often is that you need both
composite services as well as more fine grained services and both these
kinds of services need to be "transaction aware". So you end of creating
"layers on top of the service layer" to delegate and allow for
transactions. Not a problem other than the fact not you have  a set of
methods that do nothing but start and end transactions, just becomes
cumbersome I guess.

So essentially if I wanted to do something to the effect, is my only
option to re-factor such behavior into a different method?:

> ServiceClass1

> public void doSomething() {

>       try {

>              daoManager.startTransaction();

>              // Write some stuff to a database

>              daoManager.commitTransaction();

>       } catch (Exception e) {

>              throw e;

>       } finally {

>              daoManager.endTransaction();

>       }

> }

> 

> ServiceClass2

> public void doSomethingElse() {

>       try {

>              daoManager.startTransaction();

>              ServiceClass1 sc1 = new ServiceClass1();

>              sc1.doSomething();

>              // Write some stuff to a database

>              daoManager.commitTransaction();

>       } catch (Exception e) {

>              throw e;

>       } finally {

>              daoManager.endTransaction();

>       }

> }

Thanks,

-Sudhir

 

From: Clinton Begin [mailto:clinton.begin@gmail.com] 
Sent: Wednesday, May 30, 2007 5:47 PM
To: user-java@ibatis.apache.org
Subject: Re: Nested transactions?

 

Nested transactions are evil*.  iBATIS has a strict policy to use its
powers only for good.  So unfortunately no.  

:-)

Clinton

* Why? See the 'A' in ACID.  http://en.wikipedia.org/wiki/ACID  

On 5/30/07, Sudhir, Sudhir (Contractor) <SS...@moneygram.com> wrote: 

Does iBatis support nested transactions?

-Sudhir
----------------------------------------- 

This message may contain confidential information.  If you are not
the intended recipient, please notify the sender immediately and
delete this email from your system.

 

 


Re: Nested transactions?

Posted by Clinton Begin <cl...@gmail.com>.
The DAO framework is smart enough to deal with that.  But yeah, you need to
move your transaction management out of those methods.  I understand the
challenge there.  There are at least 3 possible solutions:

1) Move the transaction control up to the web tier or at least higher than
the service layer.  Servlet filters (or struts/webwork filters work well fot
this).  This is the simplest approach and nobody should scare you out of
high level transaction scoping...transactions should be as broadly scoped as
possible.  An easy way to do it is start a transaction for all POST
requests, but not for GET requests -- handle odd cases as appropriate.

2) Build your own filtering mechanism into your service layer.  It's fairly
simple, you can copy the dynamic proxy code from the DAO manager that
handles automatic transactions.  Basically the first service method called
becomes the transaction scope, regardless of how many other services or DAOs
it calls.  It can get a little tricky around the nested stuff (think
ThreadLocal) and exception handling, but this is the way I almost always do
it for clients.

3) Use Spring, it does all of the above.  And Spring 2 has simplified
configuration quite a bit.  :-)

Cheers,
Clinton

On 5/30/07, Sudhir, Sudhir (Contractor) <SS...@moneygram.com> wrote:
>
>  Thanks,
>
> The only issue that you run into quite often is that you need both
> composite services as well as more fine grained services and both these
> kinds of services need to be "transaction aware". So you end of creating
> "layers on top of the service layer" to delegate and allow for transactions.
> Not a problem other than the fact not you have  a set of methods that do
> nothing but start and end transactions, just becomes cumbersome I guess.
>
> So essentially if I wanted to do something to the effect, is my only
> option to re-factor such behavior into a different method?:
>
> > ServiceClass1
>
> > public void doSomething() {
>
> >       try {
>
> >              daoManager.startTransaction();
>
> >              // Write some stuff to a database
>
> >              daoManager.commitTransaction();
>
> >       } catch (Exception e) {
>
> >              throw e;
>
> >       } finally {
>
> >              daoManager.endTransaction();
>
> >       }
>
> > }
>
> >
>
> > ServiceClass2
>
> > public void doSomethingElse() {
>
> >       try {
>
> >              daoManager.startTransaction();
>
> >              ServiceClass1 sc1 = new ServiceClass1();
>
> >              sc1.doSomething();
>
> >              // Write some stuff to a database
>
> >              daoManager.commitTransaction();
>
> >       } catch (Exception e) {
>
> >              throw e;
>
> >       } finally {
>
> >              daoManager.endTransaction();
>
> >       }
>
> > }
>
> Thanks,
>
> -Sudhir
>
>
>
> *From:* Clinton Begin [mailto:clinton.begin@gmail.com]
> *Sent:* Wednesday, May 30, 2007 5:47 PM
> *To:* user-java@ibatis.apache.org
> *Subject:* Re: Nested transactions?
>
>
>
> Nested transactions are evil*.  iBATIS has a strict policy to use its
> powers only for good.  So unfortunately no.
>
> :-)
>
> Clinton
>
> * Why? See the 'A' in ACID.  http://en.wikipedia.org/wiki/ACID
>
> On 5/30/07, *Sudhir, Sudhir (Contractor)* <SS...@moneygram.com> wrote:
>
> Does iBatis support nested transactions?
>
> -Sudhir
> -----------------------------------------
>
> This message may contain confidential information.  If you are not
> the intended recipient, please notify the sender immediately and
> delete this email from your system.
>
>
>

RE: Nested transactions?

Posted by "Sudhir, Sudhir (Contractor)" <SS...@moneygram.com>.
Thanks,

The only issue that you run into quite often is that you need both
composite services as well as more fine grained services and both these
kinds of services need to be "transaction aware". So you end of creating
"layers on top of the service layer" to delegate and allow for
transactions. Not a problem other than the fact not you have  a set of
methods that do nothing but start and end transactions, just becomes
cumbersome I guess.

So essentially if I wanted to do something to the effect, is my only
option to re-factor such behavior into a different method?:

> ServiceClass1

> public void doSomething() {

>       try {

>              daoManager.startTransaction();

>              // Write some stuff to a database

>              daoManager.commitTransaction();

>       } catch (Exception e) {

>              throw e;

>       } finally {

>              daoManager.endTransaction();

>       }

> }

> 

> ServiceClass2

> public void doSomethingElse() {

>       try {

>              daoManager.startTransaction();

>              ServiceClass1 sc1 = new ServiceClass1();

>              sc1.doSomething();

>              // Write some stuff to a database

>              daoManager.commitTransaction();

>       } catch (Exception e) {

>              throw e;

>       } finally {

>              daoManager.endTransaction();

>       }

> }

Thanks,

-Sudhir

 

From: Clinton Begin [mailto:clinton.begin@gmail.com] 
Sent: Wednesday, May 30, 2007 5:47 PM
To: user-java@ibatis.apache.org
Subject: Re: Nested transactions?

 

Nested transactions are evil*.  iBATIS has a strict policy to use its
powers only for good.  So unfortunately no.  

:-)

Clinton

* Why? See the 'A' in ACID.  http://en.wikipedia.org/wiki/ACID  

On 5/30/07, Sudhir, Sudhir (Contractor) <SS...@moneygram.com> wrote: 

Does iBatis support nested transactions?

-Sudhir
----------------------------------------- 

This message may contain confidential information.  If you are not
the intended recipient, please notify the sender immediately and
delete this email from your system.

 


Re: Nested transactions?

Posted by Clinton Begin <cl...@gmail.com>.
Nested transactions are evil*.  iBATIS has a strict policy to use its powers
only for good.  So unfortunately no.

:-)

Clinton

* Why? See the 'A' in ACID.  http://en.wikipedia.org/wiki/ACID

On 5/30/07, Sudhir, Sudhir (Contractor) <SS...@moneygram.com> wrote:
>
> Does iBatis support nested transactions?
>
> -Sudhir
> -----------------------------------------
>
> This message may contain confidential information.  If you are not
> the intended recipient, please notify the sender immediately and
> delete this email from your system.
>

Nested transactions?

Posted by "Sudhir, Sudhir (Contractor)" <SS...@moneygram.com>.
Does iBatis support nested transactions?

-Sudhir
-----------------------------------------

This message may contain confidential information.  If you are not
the intended recipient, please notify the sender immediately and
delete this email from your system.

Re: Postres 8.1 and double precision

Posted by Larry Meadors <lm...@apache.org>.
This seems wrong:

<isNotNull prepend="," property="priority">
  PRIORITY=#priority#
</isNotNull>

Why the prepend value?

What does the bean look like?

Larry


On 6/8/07, Marco Berri <ma...@bluestudio.it> wrote:
> Hi,
>
> I have a problem with Postgres 8.1, ibatis and jdbc
> postgresql-8.1-409.jdbc3.jar
>
>
> My update map is ...
>
> <update id="updmenuforId">
> UPDATE PUBLIC.MENU
>         <dynamic prepend="SET">                                 <isNotNull prepend="," property="priority">
> PRIORITY=#priority#
> </isNotNull>
>
> <isNotNull prepend="," property="item_id">
> ITEM_ID=#item_id#
> </isNotNull>
>
> <isNotNull prepend="," property="att_name">
> ATT_NAME=#att_name#
> </isNotNull>
>
> <isNotNull prepend="," property="att_value">
> ATT_VALUE=#att_value#
> </isNotNull>
> </dynamic>
>
> WHERE MENU_ID=#menu_id#
> </update>
>
> if i try using "updmenuforId"" with postgresql-8.1-409.jdbc3.jar the
> error is:
>
> Error Execute query:updmenuforId key:{att_value=Personajes,
> menu_id=138201, att_name=title, priority=10, item_id=1}
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred while applying a parameter map.
> --- Check the updmenuforId-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: org.postgresql.util.PSQLException: ERROR: column "priority"
> is of type double precision but expression is of type character varying
>         at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
>         at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:447)
>         at
> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82)
>         at
> com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(SqlMapClientImpl.java:59)
>         at org.tnes.storage.StorageService.save(StorageService.java:871)
>         at org.tnes.object.ObjectService.update(ObjectService.java:1107)
>         at org.tnes.action.java.Save.exec(Save.java:351)
>         at
> org.tnes.script.NativeScriptManager.eval(NativeScriptManager.java:66)
>         at
> org.tnes.script.AbstractScriptManager.eval(AbstractScriptManager.java:59)
>         at
> org.tnes.action.ActionService.executeAction(ActionService.java:578)
>         at
> org.tnes.action.ActionService.executeAction(ActionService.java:538)
>         at org.tnes.kernel.Cycle.exec(Cycle.java:925)
>         at org.tnes.kernel.Cycle.action(Cycle.java:882)
>         at org.tnes.kernel.Cycle.service(Cycle.java:252)
>         at org.tnes.main.TnesFilter.doFilter(TnesFilter.java:164)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at
> org.tnes.kernel.MicroKernelFilter.doFilter(MicroKernelFilter.java:182)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at
> org.tnes.kernel.MicroKernelFilter.doFilter(MicroKernelFilter.java:212)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at org.apache.coyote.http11.Http11Protocol
> $Http11ConnectionHandler.process(Http11Protocol.java:634)
>         at org.apache.tomcat.util.net.JIoEndpoint
> $Worker.run(JIoEndpoint.java:445)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: org.postgresql.util.PSQLException: ERROR: column "priority"
> is of type double precision but expression is of type character varying
>         at
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1531)
>         at
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1313)
>         at
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
>         at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
>         at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
>         at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:347)
>         at
> org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:168)
>         at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:81)
>         at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteUpdate(GeneralStatement.java:200)
>         at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78)
>         ... 32 more
>
>
>
>
>
>
>
> with postgresql-74_jdbc.jar this does not happed!
>
> Thanks!
>
>
>
>
>

Postres 8.1 and double precision

Posted by Marco Berri <ma...@bluestudio.it>.
Hi,

I have a problem with Postgres 8.1, ibatis and jdbc
postgresql-8.1-409.jdbc3.jar


My update map is ...

<update id="updmenuforId">
UPDATE PUBLIC.MENU
	<dynamic prepend="SET">					<isNotNull prepend="," property="priority">
PRIORITY=#priority#
</isNotNull>

<isNotNull prepend="," property="item_id">
ITEM_ID=#item_id#
</isNotNull>

<isNotNull prepend="," property="att_name">
ATT_NAME=#att_name#
</isNotNull>

<isNotNull prepend="," property="att_value">
ATT_VALUE=#att_value#
</isNotNull>
</dynamic>

WHERE MENU_ID=#menu_id#
</update>

if i try using "updmenuforId"" with postgresql-8.1-409.jdbc3.jar the
error is:

Error Execute query:updmenuforId key:{att_value=Personajes,
menu_id=138201, att_name=title, priority=10, item_id=1}
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred while applying a parameter map.  
--- Check the updmenuforId-InlineParameterMap.  
--- Check the statement (update failed).  
--- Cause: org.postgresql.util.PSQLException: ERROR: column "priority"
is of type double precision but expression is of type character varying
        at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:447)
        at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82)
        at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(SqlMapClientImpl.java:59)
        at org.tnes.storage.StorageService.save(StorageService.java:871)
        at org.tnes.object.ObjectService.update(ObjectService.java:1107)
        at org.tnes.action.java.Save.exec(Save.java:351)
        at
org.tnes.script.NativeScriptManager.eval(NativeScriptManager.java:66)
        at
org.tnes.script.AbstractScriptManager.eval(AbstractScriptManager.java:59)
        at
org.tnes.action.ActionService.executeAction(ActionService.java:578)
        at
org.tnes.action.ActionService.executeAction(ActionService.java:538)
        at org.tnes.kernel.Cycle.exec(Cycle.java:925)
        at org.tnes.kernel.Cycle.action(Cycle.java:882)
        at org.tnes.kernel.Cycle.service(Cycle.java:252)
        at org.tnes.main.TnesFilter.doFilter(TnesFilter.java:164)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.tnes.kernel.MicroKernelFilter.doFilter(MicroKernelFilter.java:182)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.tnes.kernel.MicroKernelFilter.doFilter(MicroKernelFilter.java:212)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:634)
        at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:445)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.postgresql.util.PSQLException: ERROR: column "priority"
is of type double precision but expression is of type character varying
        at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1531)
        at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1313)
        at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
        at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
        at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
        at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:347)
        at
org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:168)
        at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:81)
        at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteUpdate(GeneralStatement.java:200)
        at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78)
        ... 32 more







with postgresql-74_jdbc.jar this does not happed!

Thanks!





Re: executing batch file

Posted by Richard Yee <ry...@cruzio.com>.
Zsolt,
Why do you need iBATIS to do this at all. Can't you just run the file as 
a SQL script?

-Richard

Zsolt Koppany wrote:
>
> Nathan,
>
> I mean an external file.
>
> INSERT ….;
>
> INSERT ….;
>
> DELETE …;
>
> Zsolt
>
> ------------------------------------------------------------------------
>
> *From:* Nathan Maves [mailto:nathan.maves@gmail.com]
> *Sent:* Thursday, May 31, 2007 11:31 PM
> *To:* user-java@ibatis.apache.org
> *Subject:* Re: executing batch file
>
> Not quite sure what you are asking? Do you have an external file with 
> statements in it that need to be executed? Or are you asking if ibatis 
> can do batch inserts/updates ?
>
> Nathan
>
> On 5/30/07, *Zsolt Koppany* <zkoppanylist@intland.com 
> <ma...@intland.com>> wrote:
>
> Hi,
>
> what ist he best way to execute a batch file? Does ibatis support it? If
> not, could spring help me?
>
> Zsolt
>


RE: executing batch file

Posted by Zsolt Koppany <zk...@intland.com>.
Nathan,

 

I mean an external file.

 

INSERT ..;

INSERT ..;

DELETE .;

Zsolt 

  _____  

From: Nathan Maves [mailto:nathan.maves@gmail.com] 
Sent: Thursday, May 31, 2007 11:31 PM
To: user-java@ibatis.apache.org
Subject: Re: executing batch file

 

Not quite sure what you are asking?  Do you have an external file with
statements in it that need to be executed? Or are you asking if ibatis can
do batch inserts/updates ?

Nathan

On 5/30/07, Zsolt Koppany <zk...@intland.com> wrote:

Hi,

what ist he best way to execute a batch file? Does ibatis support it? If
not, could spring help me?

Zsolt

 


Re: executing batch file

Posted by Nathan Maves <na...@gmail.com>.
Not quite sure what you are asking?  Do you have an external file with
statements in it that need to be executed? Or are you asking if ibatis can
do batch inserts/updates ?

Nathan

On 5/30/07, Zsolt Koppany <zk...@intland.com> wrote:
>
> Hi,
>
> what ist he best way to execute a batch file? Does ibatis support it? If
> not, could spring help me?
>
> Zsolt
>
>