From user-javaostanton@example.com Fri Aug 01 00:46:07 2008 Return-Path: <user-javaostanton@example.com> Delivered-To: ostanton@example.com Received: (qmail 96838 invoked from network); 1 Aug 2008 00:46:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Aug 2008 00:46:07 -0000 Received: (qmail 40755 invoked by uid 500); 1 Aug 2008 00:46:01 -0000 Delivered-To: ostanton@example.com Received: (qmail 40741 invoked by uid 500); 1 Aug 2008 00:46:00 -0000 Mailing-List: contact ostanton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ostanton@example.com> List-Unsubscribe: <mailto:ostanton@example.com> List-Post: <mailto:ostanton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ostanton@example.com Delivered-To: mailing list ostanton@example.com Received: (qmail 40730 invoked by uid 99); 1 Aug 2008 00:46:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jul 2008 17:46:00 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ostanton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO ik-out-1112.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2008 00:45:06 +0000 Received: by ik-out-1112.google.com with SMTP id b32so716485ika.0 for <ostanton@example.com>; Thu, 31 Jul 2008 17:45:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=Ur5ZsRcVNJvMjtmLN6RMW5wevjRMu7cHdFfWh3PKpZU=; b=fVg3dnw8XRd6z7EkJzTA9PL5BvHwq5XCIebS75A+Uqc+PRlpYGhs393Z+jJP8Ngvzk YeFDlxebghAy8NF+FwnhjcePK+/HDPvBUkRUj1sNza72rRQK3SpEHj3ST1ezKTFIbHg+ lAEkognC+bdGk2W/WcP6kqSzaSTQ8VrOK4zLo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=rycAvEWKhWNq/OnV6QIU3kxI8UCK8Sh0PcHtDWVVjK1mosQV3bLLlHpx2Vc3yT993L f3jmzYsHujSJr1JYgsETPI99PZXRdr6QslnL1D6CP5H+Bj0/EumObd3R+fxOyHOnqsB9 30bidAY0L/CvnTNl2eP3+kp4egHikYXiJCAB8= Received: by 83.161.120.155 with SMTP id c14mr8583233ebb.139.1217551514886; Thu, 31 Jul 2008 17:45:14 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Thu, 31 Jul 2008 17:45:14 -0700 (PDT) Message-ID: <ostanton@example.com> Date: Thu, 31 Jul 2008 19:45:14 -0500 From: "Jeff Butler" <ostanton@example.com> To: ostanton@example.com Subject: Re: Is there a way using Ibator to do a case-insensitive LIKE compare In-Reply-To: <ostanton@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9490_5925487.1217551514881" References: <ostanton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_9490_5925487.1217551514881 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Take a look in the ibator documentation here: http://svn.apache.org/repos/asf/ibatis/trunk/java/tools/ibator/core/htmldoc/generatedobjects/extendingExampleClass.html I describe exactly how to extend the generated example classes to add this functionality. Jeff Butler On Thu, Jul 31, 2008 at 5:09 PM, Robert Glover <ostanton@example.com>wrote: > Disclaimer: I really, really like Ibator and use it in all my > projects. > > A programmer has inherited one of my projects that uses Ibator. He > needs to use Ibator to do some name comparisons on people's names. For > example, a database column might contain a value of "John .J. Hancock". He > wants to use Ibator to do a "LIKE" compare against "%HANCOCK%". > Unfortunately it is Oracle 10i, not MySql. So, no match results because > Oracle is case sensitive. (MySql is not case sensitive). > Short of modifying the java code that Ibator generates, is there any > way using Ibator to do the "LIKE" as if the column in the database > contained "JOHN J. HANCOCK" instead of "John .J. Hancock"? > I realize that one solution would be to create a VIEW of the TABLE > that had the column value upper-cased and then run the VIEW into an IBATOR > generation, but he would prefer not to have to do that. > > Thanks in advance, > Robert (a bit Ibator fan) > ------=_Part_9490_5925487.1217551514881 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline <div dir="ltr"><div>Take a look in the ibator documentation here:</div> <div>&nbsp;</div> <div><a href="http://svn.apache.org/repos/asf/ibatis/trunk/java/tools/ibator/core/htmldoc/generatedobjects/extendingExampleClass.html">http://svn.apache.org/repos/asf/ibatis/trunk/java/tools/ibator/core/htmldoc/generatedobjects/extendingExampleClass.html</a><br> </div> <div>I describe exactly how to extend the generated example classes to add this functionality.</div> <div>&nbsp;</div> <div>Jeff Butler</div> <div><br>&nbsp;</div> <div class="gmail_quote">On Thu, Jul 31, 2008 at 5:09 PM, Robert Glover <span dir="ltr">&lt;<a href="mailto:ostanton@example.com">ostanton@example.com</a>&gt;</span> wrote:<br> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> <div> <div style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"> <div>&nbsp;&nbsp; Disclaimer:&nbsp; I really, really like Ibator and use it in all my projects.<br><br>&nbsp;&nbsp; A programmer has inherited one of my projects that uses Ibator.&nbsp; He needs to use Ibator to do some name comparisons on people&#39;s names.&nbsp; For example, a database column might contain&nbsp; a value of &quot;John .J. Hancock&quot;.&nbsp; He wants to use Ibator to do&nbsp; a &quot;LIKE&quot; compare against &quot;%HANCOCK%&quot;.&nbsp; Unfortunately it is Oracle 10i, not MySql.&nbsp; So, no match results because Oracle is case sensitive. (MySql is not case sensitive). <br> &nbsp; &nbsp;&nbsp; Short of modifying the java code that Ibator generates,&nbsp; is there any way&nbsp; using Ibator to do the &quot;LIKE&quot;&nbsp; as if the column in the database&nbsp; contained &quot;JOHN J. HANCOCK&quot;&nbsp; instead of &quot;John .J. Hancock&quot;? <br> &nbsp; &nbsp;&nbsp; I realize that one solution would be to create a VIEW of the TABLE that had the column value upper-cased and then run the VIEW into an IBATOR generation, but he would prefer not to have to do that.<br><br>Thanks in advance,<br> Robert (a bit Ibator fan)<br></div></div></div></blockquote></div><br></div> ------=_Part_9490_5925487.1217551514881-- From user-javaostanton@example.com Fri Aug 01 00:57:03 2008 Return-Path: <user-javaostanton@example.com> Delivered-To: ostanton@example.com Received: (qmail 9286 invoked from network); 1 Aug 2008 00:57:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Aug 2008 00:57:03 -0000 Received: (qmail 48706 invoked by uid 500); 1 Aug 2008 00:57:01 -0000 Delivered-To: ostanton@example.com Received: (qmail 48692 invoked by uid 500); 1 Aug 2008 00:57:01 -0000 Mailing-List: contact ostanton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ostanton@example.com> List-Unsubscribe: <mailto:ostanton@example.com> List-Post: <mailto:ostanton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ostanton@example.com Delivered-To: mailing list ostanton@example.com Received: (qmail 48681 invoked by uid 99); 1 Aug 2008 00:57:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jul 2008 17:57:01 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ostanton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO nf-out-0910.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2008 00:56:06 +0000 Received: by nf-out-0910.google.com with SMTP id 30so313193nfu.46 for <ostanton@example.com>; Thu, 31 Jul 2008 17:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=voFcwY+Qpt2tKfKKJawAspTJ1exA8Ojri1Ztb2WCXBc=; b=Uj1TQIdtUNEPG5BXWpuA3qksEOIvWg9hOyorRwnpgd6Qdrc2bFzWC8hEG2uWLHp9OY beEaFF9hKcyMyBsih2IHGfc4Ita5tWHf2zHKiYBcs24HcDCgAAsUP8gIGyWua4W3kNKB zHkJisCRDZ6ZGnLNvu254nJQDhyqERzb1kzBM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=RN9Hif+PmQvQ2HnuDR6I6M557GUNyMz3xQg8HB4qFACUr8KEDEyurbToWxqxoMNoac o59PecMT1Jsj3zyoffgk2cYbq3SYO+FpOv7Rj/98ajlhLamX9ZhFJvCdQpTJTBALMmdR Qo27PU0cu2YpEcmGXXFQcPRTRi/AcD7UgBX8g= Received: by 83.161.120.155 with SMTP id w7mr11708281ebw.169.1217552174300; Thu, 31 Jul 2008 17:56:14 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Thu, 31 Jul 2008 17:56:14 -0700 (PDT) Message-ID: <ostanton@example.com> Date: Thu, 31 Jul 2008 19:56:14 -0500 From: "Jeff Butler" <ostanton@example.com> To: ostanton@example.com Subject: Re: Problem using SelectByExample with TypeHandlerCallback In-Reply-To: <ostanton@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9510_18092111.1217552174265" References: <ostanton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_9510_18092111.1217552174265 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Try this column override in your (i)abatorConfig: <columnOverride column="LOCATION_TYPE" javaType="LocationType" typeHandler="LocationTypeTypeHandler" /> This will cause (i)abator to generate code that explicitly calls the type handler. I'm fairly certain this will solve the problem. Without this, then we're possibly dealing with a limitation in iBATIS. The ByExample dynamic SQL is very complex and I don't think iBATIS is able to do as much runtime introspection to resolve the type handler as is needed here. Jeff Butler On Thu, Jul 31, 2008 at 11:10 AM, Doug Flex <ostanton@example.com> wrote: > Hi, > > I have a problem with Null Pointer Exception when trying to use > SelectByExample with enum criteria. > > I have done the following to seek for answer but have no success yet. > Please help! > > - google > - looked through iBatis FAQ > - looked through iBatis WIKI > - looked thought iBatis mailing archive > > the code described below omits full package path for readability > ------------------ > 1) I specified type conversion for a column in AbatorConfig.xml. This > generated code with the > VARCHAR mapped to Java enum LocationType correctly. The generated code was > Java 5, Spring Dao style. > <table tableName="LOCATION"> > <columnOverride column="LOCATION_TYPE" javaType="LocationType"/> > </table> > > 2) I have a class that called LocationTypeTypeHandler which implement > TypeHandlerCallback to map database VARCHAR to Java enum LocationType > > 3) I specified the usage of the callback in SQLMapConfig.xml as follows: > <typeHandler javaType="LocationType" > jdbcType="VARCHAR" > callback="LocationTypeTypeHandler"/> > 4) Most of the cases such as SelectByPrimimaryKey, insert, etc...seems to > be working. So, I know that my enum type conversion using > LocationTypeTypeHandler was configured and invoked correctly. The problem I > ran into was when using SelectByExample with line d) below. If I commented > out line d) then the query works ok. > > a) LocationExample example = new LocationExample(); > b) LocationExample.Criteria criteria = example.createCriteria(); > c) criteria.andLocationIdEqualTo(1); > d) criteria.andLocationTypeEqualTo(LocationType.GENERAL); > e) List<Location> result = locationDao.selectByExample(example); > > 5) The stack trace are shown below. Using the debugger, all the data looks > to be valid, especially 'oredCriteria[0].criteriaWithSingleValue[1].value' > > Caused by: com.ibatis.common.jdbc.exception.NestedSQLException: > --- The error occurred while applying a parameter map. > --- Check the LOCATION.abatorgenerated_selectByExample-InlineParameterMap. > > --- Check the parameter mapping for the > 'oredCriteria[0].criteriaWithSingleValue[1].value' property. > --- Cause: java.lang.NullPointerException > Caused by: java.lang.NullPointerException > at > com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:188) > at > com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123) > at > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:614) > at > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:588) > at > com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118) > at > org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:298) > at > org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:209) > ... 23 more > Caused by: java.lang.NullPointerException > at > com.ibatis.sqlmap.engine.type.UnknownTypeHandler.setParameter(UnknownTypeHandler.java:70) > at > com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.setParameter(BasicParameterMap.java:165) > at > com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.setParameters(BasicParameterMap.java:125) > at > com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:180) > at > com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205) > at > com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173) > > > ------=_Part_9510_18092111.1217552174265 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline <div dir="ltr"><div>Try this column override in your (i)abatorConfig:</div> <div>&nbsp;</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;columnOverride column=&quot;LOCATION_TYPE&quot; javaType=&quot;LocationType&quot;</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeHandler=&quot;LocationTypeTypeHandler&quot; /&gt;&nbsp; <br></div> <div>This will cause (i)abator to generate code that explicitly calls the&nbsp;type handler.&nbsp; I&#39;m fairly certain this will solve the problem.&nbsp; Without this, then we&#39;re possibly dealing with a limitation in iBATIS.&nbsp; The ByExample dynamic SQL is very complex and I don&#39;t think iBATIS is able to&nbsp;do as much runtime introspection to resolve the type handler as is needed here.&nbsp;</div> <div>&nbsp;</div> <div>Jeff Butler<br><br></div> <div class="gmail_quote">On Thu, Jul 31, 2008 at 11:10 AM, Doug Flex <span dir="ltr">&lt;<a href="mailto:ostanton@example.com">ostanton@example.com</a>&gt;</span> wrote:<br> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> <div> <div style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> <div>Hi,<br><br>I have a problem with Null Pointer Exception when trying to use SelectByExample with enum criteria.<br><br>I have done the following to seek for answer but have no success yet.&nbsp; Please help!<br><br>- google<br> - looked through iBatis FAQ<br>- looked through iBatis WIKI<br>- looked thought iBatis mailing archive<br><br>the code described below omits full package path for readability<br>------------------<br>1) I specified type conversion for a column in AbatorConfig.xml.&nbsp; This generated code with the<br> VARCHAR mapped to Java enum LocationType correctly.&nbsp; The generated code was Java 5, Spring Dao style.<br>&nbsp;&nbsp;&nbsp; &lt;table tableName=&quot;LOCATION&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;columnOverride column=&quot;LOCATION_TYPE&quot; javaType=&quot;LocationType&quot;/&gt;&nbsp; <br> &nbsp; &nbsp;&nbsp; &lt;/table&gt;<br><br>2) I have a class that called LocationTypeTypeHandler which implement TypeHandlerCallback to map database VARCHAR to Java enum LocationType<br><br>3)&nbsp; I specified the usage of the callback in SQLMapConfig.xml as follows:<br> &lt;typeHandler javaType=&quot;LocationType&quot; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jdbcType=&quot;VARCHAR&quot; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callback=&quot;LocationTypeTypeHandler&quot;/&gt;<br>4) Most of the cases such as SelectByPrimimaryKey, insert, etc...seems to be working.&nbsp; So, I know that my enum type conversion using LocationTypeTypeHandler was configured and invoked correctly.&nbsp; The problem I ran into was when using SelectByExample with line d) below.&nbsp; If I commented out line d) then the query works ok.<br> <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a) LocationExample example = new LocationExample();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; b) LocationExample.Criteria criteria = example.createCriteria();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; c) criteria.andLocationIdEqualTo(1);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; d) criteria.andLocationTypeEqualTo(LocationType.GENERAL);<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; e) List&lt;Location&gt; result = locationDao.selectByExample(example);<br><br>5) The stack trace are shown below.&nbsp; Using the debugger, all the data looks to be valid, especially &#39;oredCriteria[0].criteriaWithSingleValue[1].value&#39;<br> <br>Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:&nbsp;&nbsp; <br>--- The error occurred while applying a parameter map.&nbsp; <br>--- Check the LOCATION.abatorgenerated_selectByExample-InlineParameterMap.&nbsp; <br>--- Check the parameter mapping for the &#39;oredCriteria[0].criteriaWithSingleValue[1].value&#39; property.&nbsp; <br> --- Cause: java.lang.NullPointerException<br>Caused by: java.lang.NullPointerException<br>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:188)<br>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123)<br> &nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:614)<br>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:588)<br>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)<br> &nbsp;&nbsp;&nbsp; at org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:298)<br>&nbsp;&nbsp;&nbsp; at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:209)<br>&nbsp;&nbsp;&nbsp; ... 23 more<br> Caused by: java.lang.NullPointerException<br>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.type.UnknownTypeHandler.setParameter(UnknownTypeHandler.java:70)<br>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.setParameter(BasicParameterMap.java:165)<br> &nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.setParameters(BasicParameterMap.java:125)<br>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:180)<br>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205)<br> &nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)<br><br></div></div><br></div></blockquote></div><br></div> ------=_Part_9510_18092111.1217552174265-- From user-javaostanton@example.com Fri Aug 01 15:32:53 2008 Return-Path: <user-javaostanton@example.com> Delivered-To: ostanton@example.com Received: (qmail 88668 invoked from network); 1 Aug 2008 15:32:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Aug 2008 15:32:53 -0000 Received: (qmail 1116 invoked by uid 500); 1 Aug 2008 15:32:49 -0000 Delivered-To: ostanton@example.com Received: (qmail 1099 invoked by uid 500); 1 Aug 2008 15:32:49 -0000 Mailing-List: contact ostanton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ostanton@example.com> List-Unsubscribe: <mailto:ostanton@example.com> List-Post: <mailto:ostanton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ostanton@example.com Delivered-To: mailing list ostanton@example.com Received: (qmail 1088 invoked by uid 99); 1 Aug 2008 15:32:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2008 08:32:49 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ostanton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO wf-out-1314.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2008 15:31:50 +0000 Received: by wf-out-1314.google.com with SMTP id 28so1014423wfa.27 for <ostanton@example.com>; Fri, 01 Aug 2008 08:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=gE930asqSC3mQQ8LHSwladb6mxUPgsFD6zj/u87NiJc=; b=I9Cram1gGgnSM2Vnyts75QTjFvz/3aGc6hghYS/lSQh/2uCeKWr2UmMIpyYHzdk/8K ifpJHw2AXTeu7T9E84uQFOY2pnrBSpAJjKmmCUpQ9JCA1wzRVJY1GblPJEkkIVHVArGe x/2Yvgw0ST4qxKUfH08N0GCozNmNfTXJ1jI7k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=CBOyRelK3aIWNMB/KWGBvidtVkUqN0c4RXGU8xcIxx1fw/ZEha4TZyC7pXg9MgXezB RRC7hEJA4t6cWIpZSZD7lQVJ7zaPkRnNNwSysWcz3tfRJUpJFs/A9BQrg588qd2OvmFA t1AstzQ6J7UJh9ihuM4NXvXtK2u9a7KsNMkWs= Received: by 83.161.120.155 with SMTP id z9mr3784446wfz.258.1217604720346; Fri, 01 Aug 2008 08:32:00 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Fri, 1 Aug 2008 08:32:00 -0700 (PDT) Message-ID: <ostanton@example.com> Date: Fri, 1 Aug 2008 17:32:00 +0200 From: "Giovanni Cuccu" <ostanton@example.com> To: ostanton@example.com Subject: Re: INOUT and Typehandler In-Reply-To: <ostanton@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <ostanton@example.com> <ostanton@example.com> <ostanton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org I created and subitted a patch today. I don't know when will be accepted in the svn. Giovanni On Wed, Jul 16, 2008 at 9:56 PM, Sundar Sankar <ostanton@example.com> wrote: > Hi Giovanni, > Thanks for the effort. Can you let me know when the patch is > in, I will download the latest and try it out. > > Thanks > -Sundar > > On Wed, Jul 16, 2008 at 12:33 PM, Giovanni Cuccu <ostanton@example.com> > wrote: >> >> Hi, >> IIRC it's not possible to map custom out oracle parameters in >> iBatis. I did the investigation in the 2.3.0 code, the fix was not too >> hard. I'll try to create an issue in Jira and attach a patch, but I >> can't promise anything. >> Giovanni >> >> On Wed, Jul 16, 2008 at 7:04 PM, Sundar Sankar <ostanton@example.com> >> wrote: >> > Hi All, >> > I am using Typehandler for Oracle user defined databases. The >> > typehandler seems to be invoked when the mode is "IN" and never called >> > when >> > the mode is "INOUT". I saw a post mentioning a similar issue >> > >> > http://ostanton@example.com/msg07216.html >> > >> > I tried Larry's suggestion of changing jdbcType to "Struct" and running >> > the >> > proc. The Typehandler still doesnt seem to get called. Is there >> > something >> > wrong I am doing. >> > >> > ========= >> > My Configs >> > ========= >> > >> > 1. In SQLMap Config >> > >> > <!--originally --> >> > >> > <typeHandler callback="myTypehandler" javaType="myTypehandlerModel" >> > jdbcType="ORACLEDATABASEUSERDEFINEDTYPENAME" /> >> > >> > <!-- Changed to --> >> > >> > <typeHandler callback="myTypehandler" javaType="myTypehandlerModel" >> > jdbcType="STRUCT" /> >> > >> > 2. SQLMAp File >> > >> > <!-- originally --> >> > >> > <parameter property="propertyName" >> > jdbcType="ORACLEDATABASEUSERDEFINEDTYPENAME" >> > javaType="myTypehandlerModell" mode="INOUT" /> >> > >> > <!-- Changed to --> >> > >> > <parameter property="propertyName" jdbcType="STRUCT" >> > javaType="myTypehandlerModell" mode="INOUT" >> > typeName="ORACLEDATABASEUSERDEFINEDTYPENAME"/> >> > >> > What am I Doing wrong here?? >> > >> > -Sundar >> > >> >> >> >> -- >> -------------------------------------------------------------------- >> "You don't know the power of dark side" - Darth Vader > > -- -------------------------------------------------------------------- "You don't know the power of dark side" - Darth Vader From user-javaostanton@example.com Fri Aug 01 15:33:34 2008 Return-Path: <user-javaostanton@example.com> Delivered-To: ostanton@example.com Received: (qmail 89171 invoked from network); 1 Aug 2008 15:33:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Aug 2008 15:33:34 -0000 Received: (qmail 2216 invoked by uid 500); 1 Aug 2008 15:33:31 -0000 Delivered-To: ostanton@example.com Received: (qmail 2194 invoked by uid 500); 1 Aug 2008 15:33:31 -0000 Mailing-List: contact ostanton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ostanton@example.com> List-Unsubscribe: <mailto:ostanton@example.com> List-Post: <mailto:ostanton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ostanton@example.com Delivered-To: mailing list ostanton@example.com Received: (qmail 2183 invoked by uid 99); 1 Aug 2008 15:33:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2008 08:33:31 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ostanton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO wf-out-1314.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2008 15:32:36 +0000 Received: by wf-out-1314.google.com with SMTP id 28so1014423wfa.27 for <ostanton@example.com>; Fri, 01 Aug 2008 08:33:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=jh4ff1I4gelqJ+Yc7/EHdA/vp9xWzRFme6WxLoUf2GI=; b=As7NyydKdQXBtHiWK9rO2ITP0eTLIUyMcTdANYc+dJZDyMLiSIYx9xqVGPFfjVElww k1o8HP7kriSEUwRhu0Yzyy8K5r0B1q6QkueHVqUb60WX5MIJINMqBymt1nUchBnJhcTB 1arigy6UmHsrSA+YfY44fRevw/O/+H5mLF14A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=moVOLFR0/sZPODVFpJ1yIIBhkTuLSRd/Fi9LAmD+QRBW6gO9dTZfmddYa3FqpgDrOw c9IewS3jivB8CNhU4h9IIpCwkSqzLtWQ+f7EhtsGGU7UG2B54ktqbPKZFmMdd/ajXIpv ErdYuQPBeg2Uo45PlGqbzFSDjms0UAU847b8U= Received: by 83.161.120.155 with SMTP id h20mr3788709wfd.21.1217604783273; Fri, 01 Aug 2008 08:33:03 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Fri, 1 Aug 2008 08:33:03 -0700 (PDT) Message-ID: <ostanton@example.com> Date: Fri, 1 Aug 2008 17:33:03 +0200 From: "Giovanni Cuccu" <ostanton@example.com> To: ostanton@example.com, ostanton@example.com Subject: Re: INOUT and Typehandler In-Reply-To: <ostanton@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <ostanton@example.com> <ostanton@example.com> <ostanton@example.com> <ostanton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org sorry, partially wrong address. > I created and subitted a patch today. > I don't know when will be accepted in the svn. > Giovanni > > > On Wed, Jul 16, 2008 at 9:56 PM, Sundar Sankar <ostanton@example.com> wrote: >> Hi Giovanni, >> Thanks for the effort. Can you let me know when the patch is >> in, I will download the latest and try it out. >> >> Thanks >> -Sundar >> >> On Wed, Jul 16, 2008 at 12:33 PM, Giovanni Cuccu <ostanton@example.com> >> wrote: >>> >>> Hi, >>> IIRC it's not possible to map custom out oracle parameters in >>> iBatis. I did the investigation in the 2.3.0 code, the fix was not too >>> hard. I'll try to create an issue in Jira and attach a patch, but I >>> can't promise anything. >>> Giovanni -- -------------------------------------------------------------------- "You don't know the power of dark side" - Darth Vader From user-javaostanton@example.com Fri Aug 01 15:37:13 2008 Return-Path: <user-javaostanton@example.com> Delivered-To: ostanton@example.com Received: (qmail 90949 invoked from network); 1 Aug 2008 15:37:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Aug 2008 15:37:13 -0000 Received: (qmail 7276 invoked by uid 500); 1 Aug 2008 15:37:11 -0000 Delivered-To: ostanton@example.com Received: (qmail 7257 invoked by uid 500); 1 Aug 2008 15:37:11 -0000 Mailing-List: contact ostanton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ostanton@example.com> List-Unsubscribe: <mailto:ostanton@example.com> List-Post: <mailto:ostanton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ostanton@example.com Delivered-To: mailing list ostanton@example.com Received: (qmail 7246 invoked by uid 99); 1 Aug 2008 15:37:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2008 08:37:11 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ostanton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO rv-out-0708.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2008 15:36:16 +0000 Received: by rv-out-0708.google.com with SMTP id b17so1049555rvf.36 for <ostanton@example.com>; Fri, 01 Aug 2008 08:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=3Wcx7uLhM4Purlr4xKntSjmujEqt5zyPxIv0zbsapxI=; b=JD5mxxeYfiFHjnP6ieT2/sPSyHDZVAk10X7vF9DwRkTq8VCFRFYvqD7911nIUY11d2 iEuZ9HCBGfnPxzDW4edvAjdPTWftaVm4Fc+qrueg4DEKxjcftR8PBumatw9nYLA7yyqk JpkM7FkYskRgE7krWrtR4MA8EFzyhvkF9Pyu8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=cH2QUvFD+gAqINdyoGsj54VXxko6Ur8quS/5m/fyn3+/5aWbhoGsdYMlNFqJUfWjML GPW4ze4BnDFqo5Gyl1A0G5qEUbYslVodNMwmsr1nMayNe0tmb/RpFkNiN0ZtJvXtVqB9 MAsO8P97O4KGxj8LCAWMm4MCZY8gngqqDsEpQ= Received: by 83.161.120.155 with SMTP id 9mr11751457wal.121.1217604985045; Fri, 01 Aug 2008 08:36:25 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Fri, 1 Aug 2008 08:36:24 -0700 (PDT) Message-ID: <ostanton@example.com> Date: Fri, 1 Aug 2008 09:36:24 -0600 From: "Clinton Begin" <ostanton@example.com> To: ostanton@example.com Subject: Re: INOUT and Typehandler In-Reply-To: <ostanton@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8099_32433121.1217604985030" References: <ostanton@example.com> <ostanton@example.com> <ostanton@example.com> <ostanton@example.com> <ostanton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_8099_32433121.1217604985030 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I've flagged this to have a look at it, hopefully not too long before we can at least commit it to SVN. Cheers, Clinton On Fri, Aug 1, 2008 at 9:33 AM, Giovanni Cuccu <ostanton@example.com>wrote: > sorry, partially wrong address. > > > > I created and subitted a patch today. > > I don't know when will be accepted in the svn. > > Giovanni > > > > > > On Wed, Jul 16, 2008 at 9:56 PM, Sundar Sankar <ostanton@example.com> > wrote: > >> Hi Giovanni, > >> Thanks for the effort. Can you let me know when the > patch is > >> in, I will download the latest and try it out. > >> > >> Thanks > >> -Sundar > >> > >> On Wed, Jul 16, 2008 at 12:33 PM, Giovanni Cuccu < > ostanton@example.com> > >> wrote: > >>> > >>> Hi, > >>> IIRC it's not possible to map custom out oracle parameters in > >>> iBatis. I did the investigation in the 2.3.0 code, the fix was not too > >>> hard. I'll try to create an issue in Jira and attach a patch, but I > >>> can't promise anything. > >>> Giovanni > > -- > -------------------------------------------------------------------- > "You don't know the power of dark side" - Darth Vader > ------=_Part_8099_32433121.1217604985030 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline <div dir="ltr">I&#39;ve flagged this to have a look at it, hopefully not too long before we can at least commit it to SVN.<br><br>Cheers,<br>Clinton<br><br><div class="gmail_quote">On Fri, Aug 1, 2008 at 9:33 AM, Giovanni Cuccu <span dir="ltr">&lt;<a href="mailto:ostanton@example.com">ostanton@example.com</a>&gt;</span> wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">sorry, partially wrong address.<br> <div class="Ih2E3d"><br> <br> &gt; I created and subitted a patch today.<br> &gt; I don&#39;t know when will be accepted in the svn.<br> &gt; Giovanni<br> &gt;<br> &gt;<br> &gt; On Wed, Jul 16, 2008 at 9:56 PM, Sundar Sankar &lt;<a href="mailto:ostanton@example.com">ostanton@example.com</a>&gt; wrote:<br> &gt;&gt; Hi Giovanni,<br> &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Thanks for the effort. Can you let me know when the patch is<br> &gt;&gt; in, I will download the latest and try it out.<br> &gt;&gt;<br> &gt;&gt; Thanks<br> &gt;&gt; -Sundar<br> &gt;&gt;<br> &gt;&gt; On Wed, Jul 16, 2008 at 12:33 PM, Giovanni Cuccu &lt;<a href="mailto:ostanton@example.com">ostanton@example.com</a>&gt;<br> &gt;&gt; wrote:<br> &gt;&gt;&gt;<br> &gt;&gt;&gt; Hi,<br> &gt;&gt;&gt; &nbsp; &nbsp;IIRC it&#39;s not possible to map custom out oracle parameters in<br> &gt;&gt;&gt; iBatis. I did the investigation in the 2.3.0 code, the fix was not too<br> &gt;&gt;&gt; hard. I&#39;ll try to create an issue in Jira and attach a patch, but I<br> &gt;&gt;&gt; can&#39;t promise anything.<br> &gt;&gt;&gt; Giovanni<br> <br> </div>--<br> <div><div></div><div class="Wj3C7c">--------------------------------------------------------------------<br> &quot;You don&#39;t know the power of dark side&quot; - Darth Vader<br> </div></div></blockquote></div><br></div> ------=_Part_8099_32433121.1217604985030-- From user-javaostanton@example.com Fri Aug 01 21:02:36 2008 Return-Path: <user-javaostanton@example.com> Delivered-To: ostanton@example.com Received: (qmail 290 invoked from network); 1 Aug 2008 21:02:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Aug 2008 21:02:36 -0000 Received: (qmail 66495 invoked by uid 500); 1 Aug 2008 21:02:29 -0000 Delivered-To: ostanton@example.com Received: (qmail 66478 invoked by uid 500); 1 Aug 2008 21:02:29 -0000 Mailing-List: contact ostanton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ostanton@example.com> List-Unsubscribe: <mailto:ostanton@example.com> List-Post: <mailto:ostanton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ostanton@example.com Delivered-To: mailing list ostanton@example.com Received: (qmail 66467 invoked by uid 99); 1 Aug 2008 21:02:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2008 14:02:29 -0700 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=HTML_MESSAGE,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO mout.perfora.net) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2008 21:01:33 +0000 Received: from [83.161.120.155] (83.161.120.155.ptr.us.xo.net [83.161.120.155]) by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis) id 0MKpCa-1KP1l83GRq-0004LZ; Fri, 01 Aug 2008 17:01:59 -0400 Message-Id: <ostanton@example.com> From: Jason Kratz <ostanton@example.com> To: ostanton@example.com Content-Type: multipart/alternative; boundary=Apple-Mail-51-946631853 Mime-Version: 1.0 (Apple Message framework v928.1) Subject: strange issue with sqlmapsession Date: Fri, 1 Aug 2008 16:01:56 -0500 X-Mailer: Apple Mail (2.928.1) X-Provags-ID: V01U2FsdGVkX19im2R0SgnaxgSqKcDDJYo130svlMqDuvy8er7 AGqqt9YsKzQ+ZTvJxSFNVHza9mcN0Io34lCfPzuwD8hXEUNRAc ZKSmRW9RmyQlG7awO5pkdgSDwyrZ1xB X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-51-946631853 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi all... I'm using iBATIS with Spring and am having an odd issue that I'm not sure how to resolve. We have an oracle DataSource where we have to set a client identifier which is used by the row-level security feature of oracle when we get connections from the datasource. When we construct the sqlmapdao we call getSqlMapClientTemplate().getSqlMapClient().setUserConnection(). In our Weblogic environment this works fine but we are having problems in a junit environment (using the same connection handling but with Spring's testing framework. The problem is that when the oracle row- level security is enabled we aren't seeing any rows which means the client identifier isn't being set when running unit tests. When we run a queryForList it ends up hitting the execute() method of the SqlMapClientTemplate from Spring. The first thing that method does is call SqlMapSession session = this.sqlMapClient.openSession(); and this seems to be the ultimate source of the problem. Why? Because the localSqlMapSession that is stored in a ThreadLocal when we call sqlMapClient().setUserConnection() is never checked when sqlMapClient.openSession() is called. sqlMapClient.setUserConnection() first checks for a localSqlMapSession and creates one if one isn't already present. But for some reason it seems that that localSqlMapSession is never actually used anywhere (unless I'm missing something but I was looking at the references of the objects themselves and nothing was matching what was originally created when I called setUserConnection() on the sqlMapClient the first time). I seem to be getting a new connection to the database which doesn't have the oracle-specific client identifier stored and this means we get no data back. Now....I'm not sure why this doesn't happen inside of our weblogic environment but the config for ibatis is a bit different. In the sqlMapConfig for weblogic we are specifying a transactionManager type of EXTERNAL. We aren't in the unit testing setup but I was under the impression that the spring defaulted to an EXTERNAL transactionManager anyhow when the sqlmapclientfactorybean builds sqlmapclient objects. This is probably pretty confusing so I can clarify if need be ;) Also, this happens with both release 2.3.3 and 2.3.0. Thanks, Jason --Apple-Mail-51-946631853 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable <html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = -webkit-line-break: after-white-space; ">Hi = all...<div><br></div><div>I'm using iBATIS with Spring and am having an = odd issue that I'm not sure how to = resolve.&nbsp;</div><div><br></div><div>We have an oracle DataSource = where we have to set a client identifier which is used by the row-level = security feature of oracle when we get connections from the datasource. = &nbsp;When we construct the sqlmapdao we call = getSqlMapClientTemplate().getSqlMapClient().setUserConnection(). = &nbsp;In our Weblogic&nbsp;environment&nbsp;this works fine but we are = having problems in a junit environment (using the same connection = handling but with Spring's testing framework. &nbsp;The problem is that = when the oracle row-level security is enabled we aren't seeing any rows = which means the client identifier isn't being set when running unit = tests. &nbsp;</div><div><br></div><div>When we run a queryForList it = ends up hitting the execute() method of the SqlMapClientTemplate from = Spring. &nbsp;The first thing that method does is call&nbsp;<span = class=3D"Apple-style-span" style=3D"font-family: Monaco; font-size: = 11px; ">SqlMapSession session =3D <span style=3D"color: = #7f0055">this</span>.sqlMapClient.openSession(); </span>and this seems = to be the ultimate source of the problem. &nbsp; Why? &nbsp;Because the = localSqlMapSession that is stored in a ThreadLocal when we call = sqlMapClient().setUserConnection() is never checked when = sqlMapClient.openSession() is called. &nbsp; = sqlMapClient.setUserConnection() first checks for a localSqlMapSession = and creates one if one isn't already present. &nbsp;But for some reason = it seems that that localSqlMapSession is never actually used anywhere = (unless I'm missing something but I was looking at the references of the = objects themselves and nothing was matching what was originally created = when I called setUserConnection() on the sqlMapClient the first time). = &nbsp;I seem to be getting a new connection to the database which = doesn't have the oracle-specific client&nbsp;identifier&nbsp;stored and = this means we get no data back.</div><div><br></div><div>Now....I'm not = sure why this doesn't happen inside of our weblogic environment but the = config for ibatis is a bit different. &nbsp;In the sqlMapConfig for = weblogic we are specifying a transactionManager type of EXTERNAL. = &nbsp;We aren't in the unit testing setup but I was under the impression = that the spring defaulted to an EXTERNAL transactionManager anyhow when = the sqlmapclientfactorybean builds sqlmapclient = objects.</div><div><br></div><div>This is probably pretty confusing so I = can clarify if need be ;) Also, this happens with both release 2.3.3 and = 2.3.0.</div><div><br></div><div>Thanks,</div><div><br></div><div>Jason</di= v></body></html>= --Apple-Mail-51-946631853-- From user-javaostanton@example.com Fri Aug 01 22:28:55 2008 Return-Path: <user-javaostanton@example.com> Delivered-To: ostanton@example.com Received: (qmail 52391 invoked from network); 1 Aug 2008 22:28:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Aug 2008 22:28:55 -0000 Received: (qmail 68134 invoked by uid 500); 1 Aug 2008 22:28:53 -0000 Delivered-To: ostanton@example.com Received: (qmail 68115 invoked by uid 500); 1 Aug 2008 22:28:52 -0000 Mailing-List: contact ostanton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ostanton@example.com> List-Unsubscribe: <mailto:ostanton@example.com> List-Post: <mailto:ostanton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ostanton@example.com Delivered-To: mailing list ostanton@example.com Received: (qmail 68104 invoked by uid 99); 1 Aug 2008 22:28:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2008 15:28:52 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO web30803.mail.mud.yahoo.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 01 Aug 2008 22:27:57 +0000 Received: (qmail 60514 invoked by uid 60001); 1 Aug 2008 22:28:22 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=3mfSB/hGvpbzBs/v7dmIupRWoY8d/x1Qoetmwr96JGLSgf1mBBmh5kkNLsM81dDj+YFtquQjBnmm9imlsX0MqEA/ud7AiE3fHMfLJ6J3+2Km6apx/EA4CpPLcReszKEWPUgo516NlbfrKfK0PGsshIPy/9R4M9j60czfcFp28+A=; Received: from [83.161.120.155] by web30803.mail.mud.yahoo.com via HTTP; Fri, 01 Aug 2008 15:28:22 PDT X-Mailer: YahooMailRC/1042.48 YahooMailWebService/0.7.218 Date: Fri, 1 Aug 2008 15:28:22 -0700 (PDT) From: Robert Glover <ostanton@example.com> Subject: re: Is there a way using Ibator to do a case-insensitive LIKE compare To: ostanton@example.com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-784548792-1217629702=:59561" Message-ID: <ostanton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-784548792-1217629702=:59561 Content-Type: text/plain; charset=us-ascii From:Robert Glover [mailto:ostanton@example.com] Sent: Thursday, July 31, 2008 5:10 PM To: ostanton@example.com Subject: Is there a way using Ibator to do a case-insensitive LIKE compare Disclaimer: I really, really like Ibator and use it in all my projects. A programmer has inherited one of my projects that uses Ibator. He needs to use Ibator to do some name comparisons on people's names. For example, a database column might contain a value of "John .J. Hancock". He wants to use Ibator to do a "LIKE" compare against "%HANCOCK%". Unfortunately it is Oracle 10i, not MySql. So, no match results because Oracle is case sensitive. (MySql is not case sensitive). Short of modifying the java code that Ibator generates, is there any way using Ibator to do the "LIKE" as if the column in the database contained "JOHN J. HANCOCK" instead of "John .J. Hancock"? I realize that one solution would be to create a VIEW of the TABLE that had the column value upper-cased and then run the VIEW into an IBATOR generation, but he would prefer not to have to do that. Thanks in advance, Robert (a bit Ibator fan) -----Inline Message Follows----- -----Inline Attachment Follows----- Take a look in the ibator documentation here: http://svn.apache.org/repos/asf/ibatis/trunk/java/tools/ibator/core/htmldoc/generatedobjects/extendingExampleClass.html I describe exactly how to extend the generated example classes to add this functionality. Jeff Butler================== Thank you Mr. Butler!!! I have pasted below the class I just wrote per your excellent documentation and pointer to same: package frb.bsd.abatorExtended.domain; import org.apache.commons.lang.StringUtils; import frb.bsd.abator.domain.IavEmpExample; import frb.bsd.abator.domain.IavEmpExample.Criteria; /** * purpose: to add support for case-insensitive search to Ibator generated class * * @author b1rdg02 (Robert D Glover) * create date: August 1, 2008 - RDG new * update log: August 1, 2008 - RDG initial create * * background: Jeff Butler, author of Ibator (Abator was renamed to Ibator in Spring, 2008), * recommended writing an over-riding class of this type in in documentation at * the following link: * * http://svn.apache.org/repos/asf/ibatis/trunk/java/tools/ibator/core/htmldoc/generatedobjects/extendingExampleClass.html * * The link above describes how to extend the generated example * classes to add functionality for a case insensitive search. * * */ public class IavEmpExampleExtended extends IavEmpExample { @Override protected Criteria createCriteriaInternal() { // TODO Auto-generated method stub return super.createCriteriaInternal(); } public static class ExtendedCriteria extends IavEmpExample.Criteria { /** * Uses org.apache.commons.lang.StringUtils.upperCase because * it will not throw an nullpointer exception if operand is null. * @param value * @return */ public Criteria andLastNameLikeInsensitive(String value) { addCriterion("upper(L_NAME) like", StringUtils.upperCase(value), "lastName"); return this; } /** * Uses org.apache.commons.lang.StringUtils.upperCase because * it will not throw an nullpointer exception if operand is null. * @param value * @return */ public Criteria andFirstNameLikeInsensitive(String value) { addCriterion("upper(F_NAME) like", StringUtils.upperCase(value), "firstName"); return this; } } } --0-784548792-1217629702=:59561 Content-Type: text/html; charset=us-ascii <html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:14pt"><div><div> <div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;"> <p class="MsoNormal"><b><span style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;">From:</span></b><span style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;"> Robert Glover [mailto:ostanton@example.com] <br> <b>Sent:</b> Thursday, July 31, 2008 5:10 PM<br> <b>To:</b> ostanton@example.com<br> <b>Subject:</b> Is there a way using Ibator to do a case-insensitive LIKE compare</span></p> </div> </div> <p class="MsoNormal"> &nbsp;</p> <div> <div> <p class="MsoNormal"><span style="font-size: 14pt;">&nbsp;&nbsp; Disclaimer:&nbsp; I really, really like Ibator and use it in all my projects.<br> <br> &nbsp;&nbsp; A programmer has inherited one of my projects that uses Ibator.&nbsp; He needs to use Ibator to do some name comparisons on people's names.&nbsp; For example, a database column might contain&nbsp; a value of "John .J. Hancock".&nbsp; He wants to use Ibator to do&nbsp; a "LIKE" compare against "%HANCOCK%".&nbsp; Unfortunately it is Oracle 10i, not MySql.&nbsp; So, no match results because Oracle is case sensitive. (MySql is not case sensitive). <br> &nbsp; &nbsp;&nbsp; Short of modifying the java code that Ibator generates,&nbsp; is there any way&nbsp; using Ibator to do the "LIKE"&nbsp; as if the column in the database&nbsp; contained "JOHN J. HANCOCK"&nbsp; instead of "John .J. Hancock"? <br> &nbsp; &nbsp;&nbsp; I realize that one solution would be to create a VIEW of the TABLE that had the column value upper-cased and then run the VIEW into an IBATOR generation, but he would prefer not to have to do that.<br> <br> Thanks in advance,<br> Robert (a bit Ibator fan)</span></p> </div> </div> <p><span style="font-size: 10pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;;"></span><br></p> <!-- kill --><div>-----Inline Message Follows-----<br></div>-----Inline Attachment Follows-----<br><div>Take a look in the ibator documentation here:</div> <div>&nbsp;</div> <div><a rel="nofollow" target="_blank" href="http://svn.apache.org/repos/asf/ibatis/trunk/java/tools/ibator/core/htmldoc/generatedobjects/extendingExampleClass.html">http://svn.apache.org/repos/asf/ibatis/trunk/java/tools/ibator/core/htmldoc/generatedobjects/extendingExampleClass.html</a><br> </div> <div>I describe exactly how to extend the generated example classes to add this functionality.</div> <div>&nbsp;</div> <div>Jeff Butler</div> ==================<br>&nbsp;&nbsp; Thank you Mr. Butler!!!&nbsp; I have pasted below the class I just wrote per your excellent documentation and pointer to same:<br><br>package frb.bsd.abatorExtended.domain;<br><br>import org.apache.commons.lang.StringUtils;<br>import frb.bsd.abator.domain.IavEmpExample;<br>import frb.bsd.abator.domain.IavEmpExample.Criteria;<br><br>/**<br>&nbsp;* purpose: to add support for case-insensitive search to Ibator generated class <br>&nbsp;* <br>&nbsp;* @author b1rdg02 (Robert D Glover)<br>&nbsp;* create date:&nbsp; August 1, 2008 - RDG new<br>&nbsp;* update log:&nbsp; August 1, 2008 - RDG initial create<br>&nbsp;* <br>&nbsp;* background: Jeff Butler, author of Ibator (Abator was renamed to Ibator in Spring, 2008),<br>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; recommended writing an over-riding class of this type in in documentation at<br>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the following link:<br>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;* http://svn.apache.org/repos/asf/ibatis/trunk/java/tools/ibator/core/htmldoc/generatedobjects/extendingExampleClass.html<br>&nbsp;*<br>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The link above describes how to extend the generated example<br>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classes to add functionality for a case insensitive search.<br>&nbsp;* <br>&nbsp;*<br>&nbsp;*/<br>public class IavEmpExampleExtended extends IavEmpExample {<br><br>&nbsp;&nbsp;&nbsp; @Override<br>&nbsp;&nbsp;&nbsp; protected Criteria createCriteriaInternal() {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // TODO Auto-generated method stub<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return super.createCriteriaInternal();<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; public static class ExtendedCriteria extends IavEmpExample.Criteria {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /**<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; Uses org.apache.commons.lang.StringUtils.upperCase because<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; it will not throw an nullpointer exception if operand is null.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * @param value<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * @return<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; */<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public Criteria andLastNameLikeInsensitive(String value) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; addCriterion("upper(L_NAME) like", StringUtils.upperCase(value), "lastName");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return this;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /**<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; Uses org.apache.commons.lang.StringUtils.upperCase because<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; it will not throw an nullpointer exception if operand is null. <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * @param value<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * @return<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; */<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public Criteria andFirstNameLikeInsensitive(String value) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; addCriterion("upper(F_NAME) like", StringUtils.upperCase(value), "firstName");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return this;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; <br>}<br><br></div></div></body></html> --0-784548792-1217629702=:59561-- From user-javaostanton@example.com Sun Aug 03 15:23:04 2008 Return-Path: <user-javaostanton@example.com> Delivered-To: ostanton@example.com Received: (qmail 17240 invoked from network); 3 Aug 2008 15:23:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Aug 2008 15:23:02 -0000 Received: (qmail 95884 invoked by uid 500); 3 Aug 2008 15:22:59 -0000 Delivered-To: ostanton@example.com Received: (qmail 95867 invoked by uid 500); 3 Aug 2008 15:22:59 -0000 Mailing-List: contact ostanton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ostanton@example.com> List-Unsubscribe: <mailto:ostanton@example.com> List-Post: <mailto:ostanton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ostanton@example.com Delivered-To: mailing list ostanton@example.com Received: (qmail 95856 invoked by uid 99); 3 Aug 2008 15:22:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Aug 2008 08:22:58 -0700 X-ASF-Spam-Status: No, hits=3.8 required=10.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO n56.bullet.mail.sp1.yahoo.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 03 Aug 2008 15:22:01 +0000 Received: from [83.161.120.155] by n56.bullet.mail.sp1.yahoo.com with NNFMP; 03 Aug 2008 15:22:28 -0000 Received: from [83.161.120.155] by t2.bullet.sp1.yahoo.com with NNFMP; 03 Aug 2008 15:22:28 -0000 Received: from [83.161.120.155] by omp402.mail.sp1.yahoo.com with NNFMP; 03 Aug 2008 15:22:28 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: {{EMAIL+PHONE}} Received: (qmail 64570 invoked by uid 60001); 3 Aug 2008 15:22:28 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=FAnrRocGN75Dho9PPkg4c6dQ4ew5U1u2DShLwy0D9WpQr2ElcEej/QiphnoDsmggAPiuHhplAChAKaiP878XoiBaqtsFEf3+ksDWOszXAKN7FzvSxuGw1Cxln9SjlxtlnTlduwtOoNB8UmOQwjm6g5KyzBR2dSFYrLwyH+sF3DE=; Received: from [83.161.120.155] by web46206.mail.sp1.yahoo.com via HTTP; Sun, 03 Aug 2008 08:22:27 PDT X-Mailer: YahooMailRC/1042.48 YahooMailWebService/0.7.218 Date: Sun, 3 Aug 2008 08:22:27 -0700 (PDT) From: Doug Flex <ostanton@example.com> Subject: Re: Problem using SelectByExample with TypeHandlerCallback To: ostanton@example.com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1856331134-1217776947=:62795" Message-ID: <ostanton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-1856331134-1217776947=:62795 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi Jeff,=0A=0AThanks for your proposed solution.=A0 It looks very promising= and it should work, but it doesn't.=A0 I got the same error.=A0 I also had= my co-worker try it on different table with different test case, it also f= ailed.=0A=0AThe problem was seen using 2.3.0 release.=A0 I downloaded 2.3.3= beta version and the problem disappeared.=0AI would be happy to try any ot= her solutions you can think of.=A0 In the mean time, I'll move foward with = 2.3.3 Beta.=A0 Hope that 2.3.3 will be official release very soon.=0A=0A=A0= =0AThanks=0ADoug=0A=0A=0A=0A----- Original Message ----=0AFrom: Jeff Butler= <ostanton@example.com>=0ATo: ostanton@example.com=0ASent: Thursday= , July 31, 2008 6:56:14 PM=0ASubject: Re: Problem using SelectByExample wit= h TypeHandlerCallback=0A=0A=0ATry this column override in your (i)abatorCon= fig:=0A=A0=0A=A0=A0=A0=A0=A0=A0=A0 <columnOverride column=3D"LOCATION_TYPE"= javaType=3D"LocationType"=0A=A0=A0=A0=A0=A0=A0=A0=A0 typeHandler=3D"Locati= onTypeTypeHandler" />=A0 =0A=0AThis will cause (i)abator to generate code t= hat explicitly calls the=A0type handler.=A0 I'm fairly certain this will so= lve the problem.=A0 Without this, then we're possibly dealing with a limita= tion in iBATIS.=A0 The ByExample dynamic SQL is very complex and I don't th= ink iBATIS is able to=A0do as much runtime introspection to resolve the typ= e handler as is needed here.=A0=0A=A0=0AJeff Butler=0A=0A=0AOn Thu, Jul 31,= 2008 at 11:10 AM, Doug Flex <ostanton@example.com> wrote:=0A=0AHi,=0A=0AI h= ave a problem with Null Pointer Exception when trying to use SelectByExampl= e with enum criteria.=0A=0AI have done the following to seek for answer but= have no success yet.=A0 Please help!=0A=0A- google=0A- looked through iBat= is FAQ=0A- looked through iBatis WIKI=0A- looked thought iBatis mailing arc= hive=0A=0Athe code described below omits full package path for readability= =0A------------------=0A1) I specified type conversion for a column in Abat= orConfig.xml.=A0 This generated code with the=0AVARCHAR mapped to Java enum= LocationType correctly.=A0 The generated code was Java 5, Spring Dao style= ..=0A=A0=A0=A0 <table tableName=3D"LOCATION">=0A=A0=A0=A0 =A0=A0=A0 <columnO= verride column=3D"LOCATION_TYPE" javaType=3D"LocationType"/>=A0 =0A=A0 =A0= =A0 </table>=0A=0A2) I have a class that called LocationTypeTypeHandler whi= ch implement TypeHandlerCallback to map database VARCHAR to Java enum Locat= ionType=0A=0A3)=A0 I specified the usage of the callback in SQLMapConfig.xm= l as follows:=0A<typeHandler javaType=3D"LocationType" =0A=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 jdbcType=3D"VARCHAR" =0A=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 callback=3D"LocationTypeTypeHandler= "/>=0A4) Most of the cases such as SelectByPrimimaryKey, insert, etc...seem= s to be working.=A0 So, I know that my enum type conversion using LocationT= ypeTypeHandler was configured and invoked correctly.=A0 The problem I ran i= nto was when using SelectByExample with line d) below.=A0 If I commented ou= t line d) then the query works ok.=0A=0A=A0=A0=A0=A0=A0=A0 a) LocationExamp= le example =3D new LocationExample();=0A=A0=A0=A0 =A0=A0 b) LocationExample= ..Criteria criteria =3D example.createCriteria();=0A=A0=A0=A0 =A0=A0 c) crit= eria.andLocationIdEqualTo(1);=0A=A0=A0=A0 =A0=A0 d) criteria.andLocationTyp= eEqualTo(LocationType.GENERAL);=0A=A0=A0=A0 =A0=A0 e) List<Location> result= =3D locationDao.selectByExample(example);=0A=0A5) The stack trace are show= n below.=A0 Using the debugger, all the data looks to be valid, especially = 'oredCriteria[0].criteriaWithSingleValue[1].value'=0A=0ACaused by: com.ibat= is.common.jdbc.exception.NestedSQLException:=A0=A0 =0A--- The error occurre= d while applying a parameter map.=A0 =0A--- Check the LOCATION.abatorgenera= ted_selectByExample-InlineParameterMap.=A0 =0A--- Check the parameter mappi= ng for the 'oredCriteria[0].criteriaWithSingleValue[1].value' property.=A0 = =0A--- Cause: java.lang.NullPointerException=0ACaused by: java.lang.NullPoi= ostanton@example.com= eralStatement.executeQueryWithCallback(GeneralStatement.java:188)=0A=A0=A0= =ostanton@example.com= ueryForList(GeneralStatement.java:123)=ostanton@example.com= ine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:61= 4)=ostanton@example.com= yForList(SqlMapExecutorDelegate.java:588)=ostanton@example.com.= engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)=0A= =ostanton@example.com$3.doInSqlM= apClient(SqlMapClientTemplate.java:298)=ostanton@example.com.= orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:209)=0A= =A0=A0=A0 ... 23 more=0ACaused by: java.lang.NullPointerException=0A=A0=A0= =ostanton@example.com(Unknow= nTypeHandler.java:70)=ostanton@example.com= eter.BasicParameterMap.setParameter(BasicParameterMap.java:165)=ostanton@example.com= ers(BasicParameterMap.java:125)=ostanton@example.com= cution.SqlExecutor.executeQuery(SqlExecutor.java:180)=ostanton@example.com= atis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(Gener= alStatement.java:205)=ostanton@example.com= ment.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)= =0A=0A=0A --0-1856331134-1217776947=:62795 Content-Type: text/html; charset=us-ascii <html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> <DIV>Hi Jeff,<BR><BR>Thanks for your proposed solution.&nbsp; It looks very promising and it should work, but it doesn't.&nbsp; I got the same error.&nbsp; I also had my co-worker try it on different table with different test case, it also failed.<BR><BR>The problem was seen using 2.3.0 release.&nbsp; I downloaded 2.3.3 beta version and the problem disappeared.</DIV> <DIV>&nbsp;</DIV> <DIV>I would be happy to try any other solutions you can think of.&nbsp; In the mean time, I'll move foward with 2.3.3 Beta.&nbsp; Hope that 2.3.3 will be official release very soon.<BR></DIV></DIV><SPAN id=lw_beacon_1217776513129></SPAN> <DIV id=highlighterDivCG style="DISPLAY: none; Z-INDEX: -1; POSITION: absolute; BACKGROUND-COLOR: yellow"></DIV> <DIV class="module overlay yui-module yui-overlay" id=lwPreview style="LEFT: -400px; POSITION: absolute; TOP: -400px"> <DIV class=hd></DIV> <DIV class=bd>&nbsp;</DIV> <DIV class=ft></DIV></DIV> <DIV>Thanks</DIV> <DIV>Doug<BR></DIV> <DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR> <DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Jeff Butler &lt;ostanton@example.com&gt;<BR>To: ostanton@example.com<BR>Sent: Thursday, July 31, 2008 6:56:14 PM<BR>Subject: Re: Problem using SelectByExample with TypeHandlerCallback<BR><BR> <DIV dir=ltr> <DIV>Try this column override in your (i)abatorConfig:</DIV> <DIV>&nbsp;</DIV> <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;columnOverride column="LOCATION_TYPE" javaType="LocationType"</DIV> <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeHandler="LocationTypeTypeHandler" /&gt;&nbsp; <BR></DIV> <DIV>This will cause (i)abator to generate code that explicitly calls the&nbsp;type handler.&nbsp; I'm fairly certain this will solve the problem.&nbsp; Without this, then we're possibly dealing with a limitation in iBATIS.&nbsp; The ByExample dynamic SQL is very complex and I don't think iBATIS is able to&nbsp;do as much runtime introspection to resolve the type handler as is needed here.&nbsp;</DIV> <DIV>&nbsp;</DIV> <DIV>Jeff Butler<BR><BR></DIV> <DIV class=gmail_quote>On Thu, Jul 31, 2008 at 11:10 AM, Doug Flex <SPAN dir=ltr>&lt;<A href="mailto:ostanton@example.com" target=_blank rel=nofollow ymailto="mailto:ostanton@example.com">ostanton@example.com</A>&gt;</SPAN> wrote:<BR> <BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> <DIV> <DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> <DIV>Hi,<BR><BR>I have a problem with Null Pointer Exception when trying to use SelectByExample with enum criteria.<BR><BR>I have done the following to seek for answer but have no success yet.&nbsp; Please help!<BR><BR>- google<BR>- looked through iBatis FAQ<BR>- looked through iBatis WIKI<BR>- looked thought iBatis mailing archive<BR><BR>the code described below omits full package path for readability<BR>------------------<BR>1) I specified type conversion for a column in AbatorConfig.xml.&nbsp; This generated code with the<BR>VARCHAR mapped to Java enum LocationType correctly.&nbsp; The generated code was Java 5, Spring Dao style.<BR>&nbsp;&nbsp;&nbsp; &lt;table tableName="LOCATION"&gt;<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;columnOverride column="LOCATION_TYPE" javaType="LocationType"/&gt;&nbsp; <BR>&nbsp; &nbsp;&nbsp; &lt;/table&gt;<BR><BR>2) I have a class that called LocationTypeTypeHandler which implement TypeHandlerCallback to map database VARCHAR to Java enum LocationType<BR><BR>3)&nbsp; I specified the usage of the callback in SQLMapConfig.xml as follows:<BR>&lt;typeHandler javaType="LocationType" <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jdbcType="VARCHAR" <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callback="LocationTypeTypeHandler"/&gt;<BR>4) Most of the cases such as SelectByPrimimaryKey, insert, etc...seems to be working.&nbsp; So, I know that my enum type conversion using LocationTypeTypeHandler was configured and invoked correctly.&nbsp; The problem I ran into was when using SelectByExample with line d) below.&nbsp; If I commented out line d) then the query works ok.<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a) LocationExample example = new LocationExample();<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; b) LocationExample.Criteria criteria = example.createCriteria();<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; c) criteria.andLocationIdEqualTo(1);<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; d) criteria.andLocationTypeEqualTo(LocationType.GENERAL);<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; e) List&lt;Location&gt; result = locationDao.selectByExample(example);<BR><BR>5) The stack trace are shown below.&nbsp; Using the debugger, all the data looks to be valid, especially 'oredCriteria[0].criteriaWithSingleValue[1].value'<BR><BR>Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:&nbsp;&nbsp; <BR>--- The error occurred while applying a parameter map.&nbsp; <BR>--- Check the LOCATION.abatorgenerated_selectByExample-InlineParameterMap.&nbsp; <BR>--- Check the parameter mapping for the 'oredCriteria[0].criteriaWithSingleValue[1].value' property.&nbsp; <BR>--- Cause: java.lang.NullPointerException<BR>Caused by: java.lang.NullPointerException<BR>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:188)<BR>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123)<BR>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:614)<BR>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:588)<BR>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)<BR>&nbsp;&nbsp;&nbsp; at org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:298)<BR>&nbsp;&nbsp;&nbsp; at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:209)<BR>&nbsp;&nbsp;&nbsp; ... 23 more<BR>Caused by: java.lang.NullPointerException<BR>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.type.UnknownTypeHandler.setParameter(UnknownTypeHandler.java:70)<BR>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.setParameter(BasicParameterMap.java:165)<BR>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.setParameters(BasicParameterMap.java:125)<BR>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:180)<BR>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205)<BR>&nbsp;&nbsp;&nbsp; at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)<BR><BR></DIV></DIV><BR></DIV></BLOCKQUOTE></DIV><BR></DIV></DIV></DIV></div><br> </body></html> --0-1856331134-1217776947=:62795-- From user-javaostanton@example.com Sun Aug 03 16:56:16 2008 Return-Path: <user-javaostanton@example.com> Delivered-To: ostanton@example.com Received: (qmail 33130 invoked from network); 3 Aug 2008 16:56:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Aug 2008 16:56:16 -0000 Received: (qmail 41953 invoked by uid 500); 3 Aug 2008 16:56:10 -0000 Delivered-To: ostanton@example.com Received: (qmail 41935 invoked by uid 500); 3 Aug 2008 16:56:09 -0000 Mailing-List: contact ostanton@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:ostanton@example.com> List-Unsubscribe: <mailto:ostanton@example.com> List-Post: <mailto:ostanton@example.com> List-Id: <user-java.ibatis.apache.org> Reply-To: ostanton@example.com Delivered-To: mailing list ostanton@example.com Received: (qmail 41924 invoked by uid 99); 3 Aug 2008 16:56:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Aug 2008 09:56:09 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ostanton@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO wr-out-0506.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Aug 2008 16:55:15 +0000 Received: by wr-out-0506.google.com with SMTP id 57so1328539wri.12 for <ostanton@example.com>; Sun, 03 Aug 2008 09:55:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=p4hkA9cyM0iBVzX42LCWDR9YJ3bwduOskelkB42qwcM=; b=RFLAipRNCT5VQAPtRyzlV1eZB1oaUV94Jua5FLX1aoLRjIDcEWLDK2X3fdD/ByjpR6 D9/QjtaOR1gSsy75CBoWwmXUskatadw7ZNhU3BeexUpzxfe1E68DeTidDJubWiVTnOba 3diDlK6qU/S+8VLepUhCGUyb6b1GNkexzQaPo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=uqEH+8S2m87MINKncwgOuDYEe5FwsZ6vuWWUgtO6Rvy34joTd6L5SoZcMnYZQTTwZN DZZL5q4AC/+XmgbqMW5IbZA9nBDlMwbDGDIz4bM9VjWJB8RRe5EM/SCqtlmuBJ4RWzj3 0f8Agcc6fa+e5JwfFAN2XFUemEXv6RFBTokmI= Received: by 83.161.120.155 with SMTP id l17mr13238444agc.49.1217782541360; Sun, 03 Aug 2008 09:55:41 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Sun, 3 Aug 2008 09:55:41 -0700 (PDT) Message-ID: <ostanton@example.com> Date: Sun, 3 Aug 2008 11:55:41 -0500 From: "Jeff Butler" <ostanton@example.com> To: ostanton@example.com Subject: Re: Problem using SelectByExample with TypeHandlerCallback In-Reply-To: <ostanton@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_22876_9905500.1217782541356" References: <ostanton@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_22876_9905500.1217782541356 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline There have been some recent changes with regards to enum handling in iBATIS. I'm glad to hear 2.3.3 is working. Jeff Butler On Sun, Aug 3, 2008 at 10:22 AM, Doug Flex <ostanton@example.com> wrote: > Hi Jeff, > > Thanks for your proposed solution. It looks very promising and it should > work, but it doesn't. I got the same error. I also had my co-worker try it > on different table with different test case, it also failed. > > The problem was seen using 2.3.0 release. I downloaded 2.3.3 beta version > and the problem disappeared. > > I would be happy to try any other solutions you can think of. In the mean > time, I'll move foward with 2.3.3 Beta. Hope that 2.3.3 will be official > release very soon. > > Thanks > Doug > > ----- Original Message ---- > From: Jeff Butler <ostanton@example.com> > To: ostanton@example.com > Sent: Thursday, July 31, 2008 6:56:14 PM > Subject: Re: Problem using SelectByExample with TypeHandlerCallback > > Try this column override in your (i)abatorConfig: > > <columnOverride column="LOCATION_TYPE" javaType="LocationType" > typeHandler="LocationTypeTypeHandler" /> > This will cause (i)abator to generate code that explicitly calls the type > handler. I'm fairly certain this will solve the problem. Without this, > then we're possibly dealing with a limitation in iBATIS. The ByExample > dynamic SQL is very complex and I don't think iBATIS is able to do as much > runtime introspection to resolve the type handler as is needed here. > > Jeff Butler > > On Thu, Jul 31, 2008 at 11:10 AM, Doug Flex <ostanton@example.com> wrote: > >> Hi, >> >> I have a problem with Null Pointer Exception when trying to use >> SelectByExample with enum criteria. >> >> I have done the following to seek for answer but have no success yet. >> Please help! >> >> - google >> - looked through iBatis FAQ >> - looked through iBatis WIKI >> - looked thought iBatis mailing archive >> >> the code described below omits full package path for readability >> ------------------ >> 1) I specified type conversion for a column in AbatorConfig.xml. This >> generated code with the >> VARCHAR mapped to Java enum LocationType correctly. The generated code >> was Java 5, Spring Dao style. >> <table tableName="LOCATION"> >> <columnOverride column="LOCATION_TYPE" javaType="LocationType"/> >> </table> >> >> 2) I have a class that called LocationTypeTypeHandler which implement >> TypeHandlerCallback to map database VARCHAR to Java enum LocationType >> >> 3) I specified the usage of the callback in SQLMapConfig.xml as follows: >> <typeHandler javaType="LocationType" >> jdbcType="VARCHAR" >> callback="LocationTypeTypeHandler"/> >> 4) Most of the cases such as SelectByPrimimaryKey, insert, etc...seems to >> be working. So, I know that my enum type conversion using >> LocationTypeTypeHandler was configured and invoked correctly. The problem I >> ran into was when using SelectByExample with line d) below. If I commented >> out line d) then the query works ok. >> >> a) LocationExample example = new LocationExample(); >> b) LocationExample.Criteria criteria = example.createCriteria(); >> c) criteria.andLocationIdEqualTo(1); >> d) criteria.andLocationTypeEqualTo(LocationType.GENERAL); >> e) List<Location> result = locationDao.selectByExample(example); >> >> 5) The stack trace are shown below. Using the debugger, all the data >> looks to be valid, especially >> 'oredCriteria[0].criteriaWithSingleValue[1].value' >> >> Caused by: com.ibatis.common.jdbc.exception.NestedSQLException: >> --- The error occurred while applying a parameter map. >> --- Check the >> LOCATION.abatorgenerated_selectByExample-InlineParameterMap. >> --- Check the parameter mapping for the >> 'oredCriteria[0].criteriaWithSingleValue[1].value' property. >> --- Cause: java.lang.NullPointerException >> Caused by: java.lang.NullPointerException >> at >> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:188) >> at >> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123) >> at >> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:614) >> at >> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:588) >> at >> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118) >> at >> org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:298) >> at >> org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:209) >> ... 23 more >> Caused by: java.lang.NullPointerException >> at >> com.ibatis.sqlmap.engine.type.UnknownTypeHandler.setParameter(UnknownTypeHandler.java:70) >> at >> com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.setParameter(BasicParameterMap.java:165) >> at >> com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.setParameters(BasicParameterMap.java:125) >> at >> com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:180) >> at >> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205) >> at >> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173) >> >> >> > > ------=_Part_22876_9905500.1217782541356 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline <div dir="ltr"><div>There have been some recent changes with regards to enum handling in iBATIS.&nbsp; I&#39;m glad to hear 2.3.3 is working.</div> <div>&nbsp;</div> <div>Jeff Butler</div> <div><br><br>&nbsp;</div> <div class="gmail_quote">On Sun, Aug 3, 2008 at 10:22 AM, Doug Flex <span dir="ltr">&lt;<a href="mailto:ostanton@example.com">ostanton@example.com</a>&gt;</span> wrote:<br> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> <div> <div style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> <div style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> <div>Hi Jeff,<br><br>Thanks for your proposed solution.&nbsp; It looks very promising and it should work, but it doesn&#39;t.&nbsp; I got the same error.&nbsp; I also had my co-worker try it on different
{'source': 'Apache Software Foundation Public Mail Archives'}