ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "McCarrier, Alex" <amccarr...@pointserve.com>
Subject Problems upgrading from 1.2.x to 2.0.8
Date Thu, 02 Dec 2004 21:12:14 GMT
I'm getting ClassCastExceptions on TransactionManager when trying to
load our old ibatis config file using the new iBatis libraries.  

Apparently what it is trying to do is an on the fly conversion from the
old format to the new format (found by tracing through iBatis source
code).  However, we don't have anything transaction related in our
config file other than a settings option to specify using global
transactions.  We let the EJB container handle the demarcation of our
transactions.  When iBatis does the conversion, it seems to default to
using JTA transactions, tries to lookup the UserTransaction with JNDI
name "" and then throws the ClassCastException.  Any ideas on how to fix
this without having to do a manual conversion of the file (although I
will do that if that's the only way, but someone might want to add this
to the upgrade guide).

Here's the part of our config file that is causing problems:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE sql-map-config
    PUBLIC "-//iBATIS.com//DTD SQL Map Config 1.0//EN"
    "http://www.ibatis.com/dtd/sql-map-config.dtd">

<sql-map-config>

    <settings useGlobalTransactions="true"
              cacheModelsEnabled="true" />
    <!--settings useBeansMetaClasses="true"/ Investigate, suppose to be
big performance improvement-->

    <datasource name="snmDataSource"
	
factory-class="com.ibatis.db.sqlmap.datasource.JndiDataSourceFactory"
	          default="true" >
        <property name="DBFullJndiContext" value="java:/dsname" />
    </datasource>

	.. Rest of stuff here ...
    
</sql-map-config>

Mime
View raw message