ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yee, Richard K CTR DMDC" <Richard.Yee....@osd.pentagon.mil>
Subject RE: Mapping HSQLDB's binary using iBatis
Date Fri, 28 Sep 2007 15:35:20 GMT
What does the code look like that you are using to call the
sqlMap.insert() with? It looks like you are passing in a string for the
byte[]

-Richard

-----Original Message-----
From: Jonathan Alvarsson [mailto:jonathan.alvarsson@gmail.com] 
Sent: Friday, September 28, 2007 4:56 AM
To: user-java@ibatis.apache.org
Subject: Mapping HSQLDB's binary using iBatis

I am trying persist a serializable object to hsqldb's binary datatype. I
am currently building a byte[] but obviously there is no iBatis standard
type handler for this operation because I get the following errorwhen
trying to persist: 


org.springframework.jdbc.BadSqlGrammarException: SqlMapClient operation;
bad SQL grammar []; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in sqlMap.xml.  
--- The error occurred while applying a parameter map.  
--- Check the Structure.insertWithoutLibrary-InlineParameterMap.  
--- Check the statement (update failed).  
--- Cause: java.sql.SQLException : Wrong data type: java.io.IOException:
hexadecimal string contains non hex character in statement [
INSERT INTO Structure (   id,     baseObject, smiles,
fingerPrintString,     molecule       )                        VALUES (
'07bdad55-1433-4b12-8446-aa7d0fe644f9',
'07bdad55-1433-4b12-8446-aa7d0fe644f9',     '',
'0000000000000000000000000000000000000000000000000000000000000000', '[
B@1107304' );     ]
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in sqlMap.xml.  
--- The error occurred while applying a parameter map.  
--- Check the Structure.insertWithoutLibrary-InlineParameterMap .  
--- Check the statement (update failed).  
--- Cause: java.sql.SQLException: Wrong data type: java.io.IOException:
hexadecimal string contains non hex character in statement [
INSERT INTO Structure (   id,     baseObject, smiles,
fingerPrintString,     molecule       )                        VALUES (
'07bdad55-1433-4b12-8446-aa7d0fe644f9',
'07bdad55-1433-4b12-8446-aa7d0fe644f9',     '',
'0000000000000000000000000000000000000000000000000000000000000000', '[
B@1107304' );     ]


How can I make this work?

--
// Jonathan 

Mime
View raw message