Bug #67828 Crashing applets due to reading file.encoding system property
Submitted: 6 Dec 2012 17:38 Modified: 6 Dec 2012 19:43
Reporter: Pavel Drášil Email Updates:
Status: Verified Impact on me:
Category:Connector / J Severity:S3 (Non-critical)
Version:5.1.22 OS:Any
Assigned to: Alexander Soklakov CPU Architecture:Any

[6 Dec 2012 17:38] Pavel Drášil
Since version 5.1.17, the com.mysql.jdbc.StringUtils class reads system property "file.encoding" in its static initialization. This makes using Connector/J in Applets very problematic, because by default Applets do not have the right to read this property. As a result, Applets using Connector/J crash severely due to the ExceptionInInitializerError.

How to repeat:
Connect to MySQL from any Applet running on Oracle JRE with unchanged java.policy file.
[6 Dec 2012 18:01] Sveta Smirnova
Thank you for the report.

Please provide small test case, demonstrating the problem.
[6 Dec 2012 19:26] Pavel Drášil
Bug demonstration

Attachment: TestCase.zip (application/x-zip-compressed, text), 780.02 KiB.

[6 Dec 2012 19:43] Sveta Smirnova
Thank you for the feedback.

Verified as described.