This is my stack trace:
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: XML parsing: line 1, character 38, unable to switch the encoding at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:156) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1373) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatementBatch(SQLServerPreparedStatement.java:1185) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtBatchExecCmd.doExecute(SQLServerPreparedStatement.java:1101) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4003) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1550) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:160) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:133) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeBatch(SQLServerPreparedStatement.java:1065) at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
My file is compile in utf-8 for linux and no encoding in my file, (but i try encoding to utf-8 and utf-16 but same error)
I build my java file in windows my configuration is
<property name="hibernate.connection.url">jdbc:sqlserver://xxxxxxxxxx;databaseName=xxxxxxxxxxxxxxxxxxx</property> <property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property> <property name="hibernate.dialect">org.hibernate.dialect.SQLServer2008Dialect</property> <property name="hibernate.connection.isolation">1</property> <property name="hibernate.connection.username">xxxxxxxxxxxxxxxxxxxx</property> <property name="hibernate.connection.password">xxxxxxxxxxxxxxxxxxxxxxx</property> <property name="hibernate.generate_statistics">true</property> <property name="hibernate.connection.provider_class">com.frimastudio.commons.hibernate.DBCPConnectionProvider</property> <property name="hibernate.dbcp.initialSize">0</property> <property name="hibernate.dbcp.maxActive">500</property> <property name="hibernate.dbcp.maxIdle">500</property> <property name="hibernate.dbcp.minIdle">0</property> <property name="hibernate.dbcp.maxWait">-1</property> <property name="hibernate.dbcp.validationQuery">SELECT 1</property> <property name="hibernate.dbcp.testOnBorrow">true</property> <property name="hibernate.dbcp.testOnReturn">false</property> <property name="hibernate.dbcp.testWhileIdle">false</property> <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property> <property name="hibernate.current_session_context_class">thread</property> <property name="hibernate.cache.use_second_level_cache">false</property> <property name="hibernate.cache.use_query_cache">false</property> <property name="hibernate.jdbc.batch_size">20</property> <property name="hibernate.search.autoregister_listeners">false</property>
|