Sidebar

How to resolve this "No Dialect mapping for JDBC type: 0" for MySql 8.0.20?

0 votes
9.7K views
asked May 18, 2020 by rich-c-2789 (16,180 points)
I am trying to install QIE using MySql 8.0.20.  It fails to start with this error in the log file.

...

Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'miscJobMutexMemDAO' threw exception; nested exception is javax.persistence.PersistenceException: org.hibernate.MappingException: No Dialect mapping for JDBC type: 0

...

1 Answer

0 votes
 
Best answer

If you see this error in QIE while using MySql 8 for the QIE database switch to the MySql8UnicodeDialect.

Your JDBC/database connection details should look something like this:

    -Dconnection.driver=com.mysql.cj.jdbc.Driver

    -Dconnection.url=jdbc:mysql://[your mysql instance name]:[port to your mysql instance]/[your database name]?serverTimezone=[timezone matching your mysql instance]&sslMode=DISABLED

    -Dhibernate.dialect=com.qvera.qie.persistence.MySQL8UnicodeDialect

Adjusted for your MySql instance details/configuration.

NOTE: This is a custom dialect that address an issue when executing SHOW INDEX or SHOW INDEXES against a MySql 8 database using MySql Connector/j 8.

    This dialect adds this registration:

        registerHibernateType(Types.NULL, "string");

    This is not important for QIE users but may be helpful to other developers that use hibernate.

See also:

    What dialects are available in QIE?

    How to configure the JDBC connection to the QIE database for MySql/MariaDB?

    What -Dconnection.url configuration properties/parameters are recommended when using MySql/MariaDB?

Resources:

    https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-charsets.html

    https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-configuration-properties.html

answered May 18, 2020 by rich-c-2789 (16,180 points)
edited May 18, 2020 by rich-c-2789
...