Projects tigase _server server-core Issues #1003
NullPointerException in com.mysql.jdbc.ConnectionImpl.getServerCharset(ConnectionImpl.java:2997) (#1003)
wojciech.kapcia@tigase.net opened 6 years ago

From https://tigase.tech/boards/4/topics/8265-tigase-8-mysql-server-connectivity-issue:

Could not initialize bean default (class: class tigase.db.beans.DataSourceBean$DataSourceMDConfigBean), skipping injection of this bean
RootCause:
   -> java.lang.reflect.InvocationTargetException
      [sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)]
      -> java.lang.RuntimeException: java.lang.RuntimeException: Could not initialize tigase.db.jdbc.DataRepositoryImpl for name 'default'
         [sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)]
         -> java.lang.RuntimeException: Could not initialize tigase.db.jdbc.DataRepositoryImpl for name 'default'
            [tigase.db.beans.MDPoolConfigBean.lambda$0(MDPoolConfigBean.java:176)]
            -> tigase.db.DBInitException: Database initialization failed
               [tigase.db.jdbc.DataRepositoryImpl.initialize(DataRepositoryImpl.java:317)]
               -> com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
                  [sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)]
                  -> java.lang.NullPointerException
                     [com.mysql.jdbc.ConnectionImpl.getServerCharset(ConnectionImpl.java:2997)]
=====================
wojciech.kapcia@tigase.net commented 6 years ago

As per https://stackoverflow.com/a/50082287/211453:

The issue you reported is related to the changes introduced in MySQL 8.0.1 wrt the character sets and collations support, with the addition of now being 'utf8mb4' the default char set. Such changes broke the way Connector/J initializes connections.

As you know this was fixed in Connector/J 5.1.41 and I'm sure you already updated your library.

I updated MySQL dependency from 5.1.40 to 5.1.41 to make sure Tigase works well with newer MySQL databases.

wojciech.kapcia@tigase.net commented 6 years ago

Bumping mysql-connector-java to 5.1.47 because of additional, following issues:

  • Unable to load authentication plugin 'caching_sha2_password'. ("Starting with MySQL 8.0.4, they have changed the default authentication plugin for MySQL server from mysql_native_password to caching_sha2_password.")
  • Unknown system variable 'query_cache_size'
issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
8676
Version
tigase-server-8.0.0
Spent time
17h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1003
Please wait...
Page is in error, reload to recover