Connector/J 5.1.16 Errors when URL Contains Session Variables and UTF8 Character Encoding
Last updated on MARCH 08, 2017
Applies to:MySQL Connectors - Version: 5.1
Information in this document applies to any platform.
When attempting to connect via JDBC with both UTF8 character encoding and SESSION variables set in the connection string such as:
the follow error occurs:
Caused by: java.lang.NullPointerException
... 18 more
SQLException: Unexpected exception encountered during query.
This issue can be reproduced with the following steps:
- Create a connection string for Connector/J defining both session variables and UTF8 character encoding.
- Attempt to open the connection to MySQL.
The issue has the following business impact:
Users cannot connect to the MySQL server using all the capabilities they employed in the previous versions. Involves waiting for patch or changing application code to get a working connection.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms