That means that the datatype returned from the MetaData does not have an associated getXXX method on the resultset - in which case iBATIS would use JDBC's getObject method. Maybe it's some wierd Oracle type that needs special handling. Or maybe I've got a bug.
If you could, let me know what the data type is from the Oracle perspective (i.e. what was specified on the CREATE TABLE command). That might help me track it down.
In the meantime, I'm glad the workaround worked. It may be the right solution for the long term. I put the column override stuff in for exactly this type of situation - where the database has a non-standard type that needs special treatment.
Jeff Butler
On 12/22/05, Zhongmin Chen <[EMAIL PROTECTED]> wrote:
Hi Jeff,
Your suggestion did work. Thanks!
Abator generates the following JDBC type (OTHER) and Java type(Object):
private Object doc;
<result column="DOC" property="doc" jdbcType="OTHER" />
Regards,
Zhongmin
On 12/21/05, Jeff Butler <[EMAIL PROTECTED] > wrote:I'm not an Oracle guy, so its hard for me to tell. Can you tell me what Abator generates for the JDBC type, and the Java type related to the column?Something to try would be to force Abator to consider the field as a BLOB like this:<table ...><columnOverride column="myBLOBColumn" jdbcType="BLOB" javaType="java.lang.byte[]" /></table>Jeff Butler
On 12/21/05, Zhongmin Chen <[EMAIL PROTECTED] > wrote:Thanks! Jeff
This fixed our problem.
We are using Oracle 9i. We have another problem with a table which has a BLOB field, but it didn't create the domain object like below (still just tableName or domianObjectName):
<tableName or domainObjectName>WithBLOBs.java
Is this a problem of Abator with Oracle?
Thanks!
Zhongmin
On 12/16/05, Jeff Butler <[EMAIL PROTECTED] > wrote:The SQL maps generated by Abator require the use of statement namespaces. Make sure that you have them turned on in your SqlMapConfig file like this:
<sqlMapConfig><settings useStatementNamespaces="true" />...</sqlMapConfig>Jeff Butler
On 12/16/05, Zhongmin Chen <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I used Abator Plug-in to generated the Domain Object, SqlMap files, and DAO classes for multiple tables, then follow iBATIS JPetStore-5.0 to add the SqlMap files to sql-map-config.xml and add DAO to DAO.xml. I am using iBATIS 2.1.5 (build 582). But I got the following error:
>
> com.ibatis.dao.client.DaoException: Error while configuring DaoManager. Cause: com.ibatis.common.exception.NestedRuntimeException: Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: There is already a statement named abatorgenerated_selectByPrimaryKey in this SqlMap.
> Caused by: com.ibatis.sqlmap.client.SqlMapException: There is already a statement named abatorgenerated_selectByPrimaryKey in this SqlMap.
> Caused by: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: There is already a statement named abatorgenerated_selectByPrimaryKey in this SqlMap.
>
> Is there anybody else getting the same erro? Do you have an example to use the generated SqlMap files and DAO classes?
>
> Thanks!
> Zhongmin
>
>
>
>
> On 12/12/05, Jeff Butler < [EMAIL PROTECTED]> wrote:
> >
> > This version fixes the "divide by zero" error, and also makes things better for SQL Server.
> >
> > If you did the Eclipse automatic install, then Eclipse will pick up the new version automatically when you do "Help>Software Updates>Find and Install...", then select the option to "Search for Updates of Currently Installed Features".
> >
> > If you did the manual install, then you can download the new zip file and update from there. See ibatis.apache.org/abator.html for the link to the zip file.
> >
> > Thanks to Denis Vladimirov and Kevin Broderick for helping to identify these issues!
> >
> > Jeff Butler
> >
>
>
