on 2019 Jan 05 12:20 PM
Problem Statement: Getting below SQL error while updating the hybris platform, post installing the My SQL 8.0 latest version.
Exception : Caused by: java.sql.SQLSyntaxErrorException: Unknown table 'abstractcontactinfo' in information_schema
Local.properties: # Mysql Data Base Config## db.url=jdbc:mysql://localhost/your_schema?useConfigs=maxPerformance&characterEncoding=utf8 db.driver=com.mysql.jdbc.Driver
Technical Problem: Driver compatibility issue. Solved by replacing mysql-connector-java-8.0.13 with mysql-connector-java-5.1.15
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
During Update Running System Hybris is loading the Tables of the Db from the DB itself.
I do not know how it was done with Driver 5.x but it worked.
With Driver 8.x the logic behind retrieving of Table information was changed.
The Table Information is loaded from 'INFORMATION_SCHEMA.TABLES'. In this Table all existing Tables of all Databases are listed. With the default configuration of Driver 8.x
useConfigs=maxPerformance&characterEncoding=utf8
there is no restriction to the current Database and because of this, the User is loading all Tables that the user can read. The reason for this is, that the schema/catalog parameter is set to
% (wildcard)
when no catalog is provided (null) and those is loading all tables from all readable Databases.
With the default settings from platform/project.properties
#db.url=jdbc:mysql://localhost/<dbname>?useConfigs=maxPerformance&characterEncoding=utf8
The schema/catalog is not set which is resulting in using the wildcard instead.
This can be changed by setting the value
nullDatabaseMeansCurrent=true (default: false)
see: https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-configuration-properties.html
This will ensure that the current Database is used as schema/catalog and only tables from this Database is loaded.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The Hybris 1808 3rd-party compatibility guide suggests to use mySQL 5.6 or 5.7: https://help.hybris.com/1808/hcd/8c71300f866910149b40c88dfc0de431.html
( You haven't specified what Hybris version you are using )
I don't know if there are any issues with mySQL 8, but it's probably best that you downgrade. When you use mySQL 5.7, the DB Driver would also have to be 5.1.x.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.