cancel
Showing results for 
Search instead for 
Did you mean: 

Caused by: java.sql.SQLSyntaxErrorException: Unknown table 'abstractcontactinfo' in information_schema

shrikant_nikam
Participant
0 Kudos
1,852

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

Accepted Solutions (1)

Accepted Solutions (1)

shrikant_nikam
Participant
0 Kudos

Answers (2)

Answers (2)

StefanKruk
Active Participant

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.

geffchang
Active Contributor
0 Kudos

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.