Spring Toplink Integration Issue with XMLType
steve_hJul 7 2008 — edited Jul 8 2008I am trying to update an XMLType column using Toplink 10.1.3 with Spring 2.0.7. I configured in the Toplink Workbench a class with a org.w3c.dom.Document attribute, which is direct mapped to XMLType. In my Java code I am able to read the class and the XMLType data from the database just fine. It is when I try to update the XMLType column that I get the following error: "JDBC exception on TopLink data access:
Internal Exception: java.sql.SQLException: ORA-17155: cannot map Unicode to Oracle character". The following method in a class that extends TopLinkDaoSupport is what generates the message:
public void setConfigXml(ConfigXml cfgXml) {
getTopLinkTemplate().merge(cfgXml);
}
I was thinking that maybe I could change the XML encoding, but I am not sure how to do that with Spring or Toplink. Another alternative I am considering but have not tried is to extend JdbcDaoSupport instead of TopLinkDaoSupport. I would like to see if I can get the toplink dao to work first before heading down the jdbc path. Any advice would be greatly appreciated.