Updates Java Updatable Resultset Anomaly with UTF-8 data in English Windows

I got a strange problem. I get an exception when I try to update or delete a row in an updatable result set that contains non-English utf characters. However, the insertion is going well.


java.sql.SQLException: refreshRow () is called on the line that was deleted or the primary key was changed.


The strangest things:

  • This error only occurs when starting compiled jar in windows
  • However, the same jar run on Linux works fine for the same data without problems.
  • The same project launched from the IDE also works fine on Windows.

Other information in case this is useful


OS: Windows XP (English with support for non-language support)

DB: MySQL, utf8 encoding, collation - utf8_general_ci

IDE: Netbeans 6.9.1

JDK: 6 update 23

Connector / J 5.1.15 (Just switch to check if this works, but with the same issue with version 14)

The connection string includes: "useUnicode = true" and "characterEncoding = utf8"

It was originally supposed that there was something to be done in the IDE, posted this post in the netbeans forum

http://forums.netbeans.org/topic36558.html

Also the crossroads are posted in mysql JDBC forums, hoping to find some kind of answer

http://forums.mysql.com/read.php?39,408795,408795

but could not get help.


So far, the problem has looked like Windows. Maybe this is just a minor problem, but cannot come up with any work.

You need some suggestion

Thank you and welcome

Deepak

+3
2

, IDE , . JVM, IDE ( IDE), , , :

-Dfile.encoding="UTF-8"

JVM , , - , IDE :

System.out.println(System.getProperty("file.encoding"));
0

. , , , mysql . , , . , , .

0

Source: https://habr.com/ru/post/1794061/


All Articles