ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher.Mathru...@sybase.com
Subject Re: Sybase JConnect 5.5 & CLOB
Date Wed, 22 Mar 2006 22:18:30 GMT

<br><font size=2 face="sans-serif">You should be reading the CLOB out of
the database into a byte[] rather than a String. From there you can convert
it into a String and apply any encoding that might be necessary.</font>
<br><font size=2 face="sans-serif"><br>
Chris Mathrusse<br>
christopher.mathrusse@sybase.com<br>
Sybase, Inc<br>
One Sybase Drive<br>
Dublin, CA 94568<br>
(925) 236-5553</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>&quot;Balaji&quot;
&lt;balaji@objectec.com&gt;</b>
</font>
<p><font size=1 face="sans-serif">03/22/2006 02:15 PM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
user-java@ibatis.apache.org</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif">&lt;user-java@ibatis.apache.org&gt;</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">Sybase JConnect 5.5 &amp;
CLOB</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>When i try to read a 'TEXT' datatype field from Sybase
12.0 database &amp;<br>
JConnect 5.5,<br>
- datatype in POJO is String &nbsp;(also tried java.sql.Clob)<br>
- jdbcType in resultMap is 'CLOB'<br>
<br>
i get the following error message shown below. &nbsp;Looks like getClob(string)<br>
is not implemented in Jconnect yet.<br>
<br>
Does anyone know how to get this to work, any workaround?<br>
<br>
Thanks<br>
Balaji<br>
<br>
/***************************************************************************<br>
*********************/<br>
 &nbsp; &nbsp; &nbsp; &nbsp;ERROR MESSAGE<br>
/***************************************************************************<br>
*********************/<br>
Caused by:<br>
java.lang.UnsupportedOperationException: The method<br>
com.sybase.jdbc2.jdbc.SybResultSet.getClob(String) is not supported and<br>
should not be called.<br>
 at<br>
com.sybase.jdbc2.jdbc.ErrorMessage.raiseRuntimeException(ErrorMessage.java:7<br>
63)<br>
 at com.sybase.jdbc2.utils.Debug.notSupported(Debug.java:366)<br>
 at com.sybase.jdbc2.jdbc.SybResultSet.getClob(SybResultSet.java:1371)<br>
 at<br>
com.ibatis.sqlmap.engine.type.ResultGetterImpl.getClob(ResultGetterImpl.java<br>
:108)<br>
 at<br>
com.ibatis.sqlmap.engine.type.ClobTypeHandlerCallback.getResult(ClobTypeHand<br>
lerCallback.java:28)<br>
 at<br>
com.ibatis.sqlmap.engine.type.CustomTypeHandler.getResult(CustomTypeHandler.<br>
java:52)<br>
 at<br>
com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getPrimitiveResultMap<br>
pingValue(BasicResultMap.java:552)<br>
 at<br>
com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getResults(BasicResul<br>
tMap.java:311)<br>
 at<br>
com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.jav<br>
a:390)<br>
 at<br>
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java<br>
:184)<br>
 at<br>
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(<br>
GeneralStatement.java:205)<br>
 at<br>
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWith<br>
Callback(GeneralStatement.java:173)<br>
 at<br>
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForO<br>
bject(GeneralStatement.java:104)<br>
 at<br>
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapEx<br>
ecutorDelegate.java:561)<br>
 at<br>
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapEx<br>
ecutorDelegate.java:536)<br>
 at<br>
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSession<br>
Impl.java:93)<br>
 at<br>
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientIm<br>
pl.java:70)<br>
<br>
<br>
----- Original Message ----- <br>
From: &quot;Nathan Maves&quot; &lt;Nathan.Maves@Sun.COM&gt;<br>
To: &lt;user-java@ibatis.apache.org&gt;<br>
Sent: Tuesday, March 21, 2006 5:51 PM<br>
Subject: Re: multiple setters<br>
<br>
<br>
&gt; Ahhh yeah... &nbsp;not good don't have them. &nbsp;:)<br>
&gt;<br>
&gt; They are against the java bean specification.<br>
&gt;<br>
&gt; Nathan<br>
&gt; On Mar 21, 2006, at 4:38 PM, Ben Munat wrote:<br>
&gt;<br>
&gt; &gt; Hey All... I seem to remember someone talking recently about<br>
&gt; &gt; difficulties with a property set by ibatis having multiple setters.<br>
&gt; &gt; Does this ring a bell?<br>
&gt; &gt;<br>
&gt; &gt; b<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
</tt></font>
<br>

Mime
View raw message