Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 61664 invoked from network); 23 Feb 2007 08:50:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Feb 2007 08:50:11 -0000 Received: (qmail 21906 invoked by uid 500); 23 Feb 2007 08:50:14 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 21889 invoked by uid 500); 23 Feb 2007 08:50:13 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 21878 invoked by uid 99); 23 Feb 2007 08:50:13 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Feb 2007 00:50:13 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [80.16.57.66] (HELO imteam.it) (80.16.57.66) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Feb 2007 00:50:02 -0800 Received: (qmail 8923 invoked by uid 510); 23 Feb 2007 09:49:01 +0100 Received: from 10.10.10.5 by mail01.imteam.it (envelope-from , uid 89) with qmail-scanner-1.25-st-qms (clamdscan: 0.88.2/1514. spamassassin: 3.1.1. perlscan: 1.25-st-qms. Clear:RC:1(10.10.10.5):. Processed in 0.417247 secs); 23 Feb 2007 08:49:01 -0000 X-Antivirus-MYDOMAIN-Mail-From: lpanzetti@imteam.it via mail01.imteam.it X-Antivirus-MYDOMAIN: 1.25-st-qms (Clear:RC:1(10.10.10.5):. Processed in 0.417247 secs Process 8917) Received: from unknown (HELO mail01.imteam.it) (10.10.10.5) by imteam.it with SMTP; 23 Feb 2007 09:49:00 +0100 Subject: SQLServer problem MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C75727.8C52716B" Date: Fri, 23 Feb 2007 09:49:37 +0100 Message-ID: <7C2921E7CC18CF4AAD2F9DF56E49F64F1CFF6F@produzione02.IMTEAM.LOCAL> Content-class: urn:content-classes:message X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: SQLServer problem Thread-Index: AcdXJ4xLTpsttLL0SHC1qSex3trQ5Q== From: "Luca Panzetti" To: X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C75727.8C52716B Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi All, I have a problem with Ibatis 2.3 and SQLServer. I call from java test program the following query: rischio_SqlMap.xml =09 The Ibatis configuration file: SqlMapConfig.xml =09 =09 =09 when I call the function: objRischio =3D (Rischio) = objSqlMapClient.queryForObject("rischio.selectByPrimaryKey", = objRischioParam); I obtain the following exception: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned = connection while in manual transaction mode. someone has already met this problem? Thanks in advance, Luca Panzetti lpanzetti@imteam.it Via Sigismondi, 40 - 24018 Villa d'Alm=E8 (BG) tel: +39+035636029 - fax: +39+035638129 =20 http://www.imteam.it/globo ------_=_NextPart_001_01C75727.8C52716B Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable SQLServer problem

Hi All,

I have a problem with Ibatis 2.3 and = SQLServer.

I call from java test program the = following query:


rischio_SqlMap.xml

        <?xml version=3D"1.0" = encoding=3D"UTF-8"?>
        <!DOCTYPE sqlMap PUBLIC = "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.= org/dtd/sql-map-2.dtd">

        <sqlMap namespace=3D"rischio">
          <resultMap = class=3D"it.imteam.peternet.domain.Rischio" = id=3D"rischio.RischioResult">
            <result = column=3D"idrischio" jdbcType=3D"INTEGER" = property=3D"idrischio"/>
            <result = column=3D"descrizione" jdbcType=3D"VARCHAR" = property=3D"descrizione"/>
            <result = column=3D"popolazioneresidente" jdbcType=3D"INTEGER" = property=3D"popolazioneresidente"/>
            <result = column=3D"popolazionemassima" jdbcType=3D"INTEGER" = property=3D"popolazionemassima"/>
            <result = column=3D"precedenti" jdbcType=3D"VARCHAR" = property=3D"precedenti"/>
            <result = column=3D"gradorischio" jdbcType=3D"INTEGER" = property=3D"gradorischio"/>
            <result = column=3D"simbolopeter" jdbcType=3D"VARCHAR" = property=3D"simbolopeter"/>
            <result = column=3D"utenteultimamodifica" jdbcType=3D"VARCHAR" = property=3D"utenteultimamodifica"/>
            <result = column=3D"utentecreazione" jdbcType=3D"VARCHAR" = property=3D"utentecreazione"/>
            <result = column=3D"dataultimamodifica" jdbcType=3D"TIMESTAMP" = property=3D"dataultimamodifica"/>
            <result = column=3D"livelloriservatezza" jdbcType=3D"INTEGER" = property=3D"livelloriservatezza"/>
            <result = column=3D"tiporischio" jdbcType=3D"INTEGER" = property=3D"tiporischio"/>
            <result = column=3D"idsitopeter" jdbcType=3D"INTEGER" = property=3D"idsitopeter"/>
            <result = column=3D"datacreazione" jdbcType=3D"TIMESTAMP" = property=3D"datacreazione"/>
            <result = column=3D"georeferenziato" jdbcType=3D"INTEGER" = property=3D"georeferenziato"/>
          </resultMap>
       =20
          <select = id=3D"rischio.selectByPrimaryKey" = parameterClass=3D"it.imteam.peternet.domain.Rischio" = resultMap=3D"rischio.RischioResult">

            select idrischio, descrizione, = popolazioneresidente, popolazionemassima, precedenti,
              gradorischio, = simbolopeter, utenteultimamodifica, utentecreazione, = dataultimamodifica,
              livelloriservatezza, = tiporischio, idsitopeter, datacreazione, georeferenziato
            from rischio
            where idrischio =3D #idrischio#
          </select>
        </sqlMap>

The Ibatis configuration file:

SqlMapConfig.xml

<?xml version=3D"1.0" = encoding=3D"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>
        <settings
        =         useStatementNamespaces=3D"false"
        =         cacheModelsEnabled=3D"false"
        =         enhancementEnabled=3D"false"
        =         lazyLoadingEnabled=3D"false"
        =         maxRequests=3D"32"
        =         maxSessions=3D"10"
        =         maxTransactions=3D"5"
        />
       =20
        <transactionManager type=3D"JDBC" = >
        =         <dataSource type=3D"SIMPLE">
        =         =         <property name=3D"JDBC.Driver" = value=3D"com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
        =         =         <property name=3D"JDBC.ConnectionURL" = value=3D"jdbc:microsoft:sqlserver://PANZETTIXP:1433;DatabaseName=3DP= eterNET"/>

        =         =         <property name=3D"JDBC.Username" = value=3D"MyUser"/>
        =         =         <property name=3D"JDBC.Password" = value=3D"MyPassword"/>
        =         </dataSource>
        </transactionManager>
       =20
        <sqlMap = resource=3D"conf/maps/rischio_SqlMap.xml" />
       =20
</sqlMapConfig>


when I call the function:

        objRischio =3D (Rischio) = objSqlMapClient.queryForObject("rischio.selectByPrimaryKey", = objRischioParam);

I obtain the following = exception:

        [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a = cloned connection while in manual transaction mode.


someone has already met this = problem?

Thanks in advance,

Luca Panzetti

lpanzetti@imteam.it
Via Sigismondi, 40 - 24018 Villa = d'Alm=E8 (BG)
tel: +39+035636029 - fax: = +39+035638129  
http://www.imteam.it/globo=



------_=_NextPart_001_01C75727.8C52716B--