Getting “Unable to switch encoding” error in SQLServer

I have 2 database instances of SQL Server. When I am trying to save XML into a table for one of the databases, it is working fine but for other instance I'm getting an error: Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: XML parsing: line 1, character 39, unable to switch the encoding {prepstmnt 1671783333 UPDATE MYTable SET CreateDate = ?, ExpiryDate = ?, XMLData = ? WHERE ID = ? [params=(Timestamp) 2013-07-10 18:52:12.552, (Timestamp) 2013-07-11 06:52:12.552, (String)