Nicky Jha | 25 May 07:03 2010

Re: Need support for Dynamic procedure invocation


with approach mentioned below(DynamicProcedureParams) , I want to also pass some of parameter as
null((private List<Object> params = new ArrayList<Object>(); params.add(null))), but when I pass
string value as null , it executes parametes procedure as

call procname(?,?,?,?,?)
Types: [java.lang.String, java.lang.String, null, null, java.lang.Byte]

I want type to be java.lang.String instead of null(as with null, I am getting Unsupported SQL type 0 )

If I pass blank string "" in place of null in (private List<Object> params = new ArrayList<Object>();
params.add("")), Types become java.lang.String, but then I think it no more considers it as null.

Please help


-----Original Message-----
From: Nicky Jha
Sent: Friday, May 14, 2010 8:46 PM
To: 'user-java <at>'
Subject: RE: Need support for Dynamic procedure invocation


This worked with your suggestion.Thank you so much!!!
(Continue reading)

Warren Bell | 24 May 21:11 2010

Still see SQL in log for cached statements

I am still seeing SQL  for statements that should be cached when I turn 
logging on. Is that normal? And if so how do I know the cache is working?

My cache configuration:

    <cacheModel id="storeCache" type ="LRU" readOnly="false" 
        <flushInterval minutes="30"/>
        <property name="cache-size" value="10" />



Warren Bell
Jane88 | 24 May 19:12 2010

iBATIS with Java, SQL Server 2008

Hello, I am new to iBATIS and I am gethering information for a project. We
have SQL Server 2005/2008 but I would like to use java and ibatis for the
backend. Could some one tall me it is feasible and point me some direction
to start with(example or tutorial ) ?

Thanks in advance.

View this message in context:
Sent from the iBATIS - User - Java mailing list archive at
Alex Sherwin | 21 May 16:23 2010

iBATIS 3 <at> InsertProvider (and other <at> *Provider) annotation question

I just want to make sure, but there is there simply no way to pass 
arguments to the sql provider method defined in the annotations such as 
 <at> InsertProvider?

It would be very beneficial to be able to do so in terms of building 
dynamic sql, such as an insert statements for a dynamic number of rows
Giorgio Vespucci | 21 May 12:43 2010

Dynamic DataSource

Hi everybody
We have the need to decide the referring datasource for some iBatis
DAO at login.
We are using Spring 3.0.2 with iBatis 2.x

We have some properties for the pool _luckily_ fixed, but the DBNAME.
Now the situation is as follow:
<from applicationContext.xml>

<bean id="dao" class="....SqlMapFlussoNauiDao"
        <property name="sqlMapClient" ref="sqlMap" />
        <property name="dataSource" ref="NOW_FIXED-datasource" />

<bean id="NOW_FIXED-datasource"
        <property name="driverClassName"
        <property name="url" value="jdbc:jtds:sqlserver://HOST:PORT/DBNAME"/>
        <property name="username" value="USERNAME"/>
        <property name="password" value="PASSWORD"/>
        <property name="maxActive" value="30"/>
        <property name="maxIdle" value="10"/>
        <property name="maxWait" value="1000"/>
        <property name="defaultAutoCommit" value="true"/>

(Continue reading)

Clinton Begin | 21 May 09:54 2010

[ANNOUNCEMENT] iBATIS Project Team Moving to Google Code


Eight years ago in 2002, I created the iBATIS Data Mapper and introduced SQL Mapping as an approach to persistence layer development.  Shortly thereafter, I donated the iBATIS name and code to the Apache Software Foundation.  The ASF has been the home of iBATIS for the past six years. 

A lot changes in six years.  By 2010 we've seen a great deal of innovation and change in the areas of development methodology, source control, social networking and open-source infrastructure.  As part of the ASF, iBATIS has had only limited ability to benefit from some of these new developments -- some of which are not all that new anymore.

Our project has a committed team, a vibrant community, a great culture of cooperation and some exciting new releases.  But we believe we can make it even better. 

Therefore, the entire core development team of iBATIS has decided to continue the development of the framework at a new home and with a new name. 

This includes all of the iBATIS for Java committers:

  * Clinton Begin
  * Brandon Goodin
  * Jeff Butler
  * Larry Meadors
  * Nathan Maves
  * Kai Grabfelder

And all of the iBATIS.NET committers:

  * Michael McCurrey
  * Ron Grabowski
  * Michael Schall


Both the Java and .NET project teams have forked the software to Google Code, where they'll continue to maintain it and create new releases.

 * The names of the new projects are:  MyBatis and MyBatis.NET
 * The website for the new projects is:
 * Java Google Code Project:
 * .NET Google Code Project:


Some answers to obvious questions:

 * The license will not change
 * Your code will be fully compatible
 * The package names and namespaces won't change anytime soon
 * iBATIS 2 and 3 will be supported, with both 2.3.5 GA and 3.0.1 GA releases becoming available immediately
 * iBATIS.NET 1.x and 3.x will be supported, with a new release coming available soon
 * None of the existing Apache resources will be deleted
 * The Apache project will be archived in the Apache Attic, if or when it becomes stale


  * Now - The Confluence wiki is already frozen (due to login issues)
  * By June 23rd - The Jira issue tracker will be changed to read-only mode
  * By June 30th - The team (mentioned above) will unsubscribe from the Apache mailing lists
  * July 1st, 2010 - Marks the 8th birthday of the framework!


We believe can improve a number of things by making this move, including (but not limited to):

  * Lighter process
  * More frequent releases
  * Unified infrastructure
  * Modernized tools (source control etc.)
  * Build and deployment automation
  * Easier to use mailing lists
  * Single sign-on for users
  * Greater community involvement
  * More productive development team


There are only a few things you need to do immediately, and a couple that you'll need to do eventually.

  1. Sign up for new mailing lists (now)
  2. Use the new issue tracker and wiki (now)
  3. Change bookmarks / links to the new site (now)
  4. Download new build (when you need your next build)
  5. Change DTD/XSD DOCTYPE headers in XML files (after you upgrade in #4, but old doctypes will work with the new framework too)

Full details for each of these steps can be found at the following Wiki page.

Making this move is a big decision and a lot of work.  However, we truly believe that the efforts will pay off. 

We'd like to thank the Apache Software Foundation for the past six years of working together.

We'll see you all on the other side.


Clinton Begin
Original Creator of iBATIS

Zhong Nanhai | 21 May 09:17 2010

list all databases in mysql server


Is it possible to show all databases in a mysql server with iBatis?

Best Regards,
Zhong Nanhai
François Schiettecatte | 20 May 14:18 2010

Question about 'jdbcType='


I remember seeing something about "jdbcType=" not being needed anymore in xml maps for columns which can
contain NULL values, is that the case or am I mis-remmembering?




François Schiettecatte
JohannesK | 20 May 12:57 2010

resultType="list" contains null values


I am having the weirdest problem with Ibatis 3. Here is my mapper XML:

   	<select id="verify" resultType="list">
		SELECT table_name.id_column 
		FROM table_name 
		WHERE table_name.other_column = #{parameter_id}
		AND table_name.id_column IN 
		<foreach item="id" index="index" collection="parameter_ids" open="("
separator="," close=")">

Mapper Java looks like this:

    public List verify(
             <at> Param("parameter_id") Long customerId, 
             <at> Param("parameter_ids") Long... ids);

The log tells me this:

13:48:11 DEBUG [Slf4jImpl] - <==>  Executing: SELECT table_name.id_column
FROM table_name WHERE table_name.other_column = ? AND table_name.id_column
IN ( ? , ? ) >
13:48:11 DEBUG [Slf4jImpl] - <==> Parameters: 1(Long), 71(Long), 78(Long)>
13:48:11 DEBUG [Slf4jImpl] - <<==    Columns: id_column>
13:48:11 DEBUG [Slf4jImpl] - <<==        Row: 71>
13:48:11 DEBUG [Slf4jImpl] - <<==        Row: 78>
13:48:11 DEBUG [Slf4jImpl] - <xxx Connection Closed>

The query seems to be in order and the result (based on the log) is the
right one. However, the resulting List that I receive from the mapper
contains two null values instead.

Anyone have any ideas what's going on here? 

table and column names have been replaced, please excuse any mistakes

View this message in context:
Sent from the iBATIS - User - Java mailing list archive at
Tom Kunicki | 20 May 05:17 2010

ibatis-3-mapper.dtd question

Is there any reason for the strict ordering of child elements for resultMap, resultMap/collection, and
resultMap/association elements?

There current specification in the ibatis-3-mapper.dtd for the resultMap element looks like:

<!ELEMENT resultMap (constructor?,id*,result*,association*,collection*, discriminator?)>

For my work the order of calls to the mapped object is important and I would like to use:

<!ELEMENT resultMap (constructor?,id*,(result*|association*|collection*|discriminator?)*)>

to, as an example, support a structure something like

   <result />
   <association />
   <result />
   <collection />

I have tested this against with my local build and it appears to work as desired which means the iBatis
parsing can handle the DTD change (haven't noticed side effects *yet*).  Any thoughts on incorporation a
change like this into future iBatis releases?

For background we are using iBatis 3.0 to directly map multiple row results sets to StAX events by using a
singleton result object implementing the Map interface (from a custom ObjectFactory).  The map keys
(property attribute of resultMap/result element) represent the XML element/attribute stack (along
with some unflattening directives) and the values are the mapped columns.    So far this has allowed us to
stream GB of results from a single request w/ minimal footprint. 


Tom Kunicki
Center for Integrated Data Analytics
U.S. Geological Survey
8505 Research Way
Middleton, WI  53562
Sergey Livanov | 20 May 00:41 2010

Best practices

I have an idea to run sql operators from the stored procedures.

For me it has become a necessity because every client has their own
data structure and when a new version is released errors spring up.
In transfering a variable code to the level of database mistakes can
be avoided.
But in transfering the code I'm losing flexibility of iBatis.

What is the best practices ?