Re: No enum constant mysql.cj.conf.PropertyDefinitions.ZerodatetimeBehaviour.CO NVERTTONULL using MySQL Community Server 8.0.11 and NetBeans 8.0.2
Posted by: Alexander Soklakov
Date: June 26, 2018 04:39AM

Hi Martin,

The simple reason for this error could be your application if it itself creates connection using a zeroDateTimeBehavior connection property. Allowed values have changed for Connector/J 8.0, now they are "EXCEPTION", "ROUND" and "CONVERT_TO_NULL" while Connector/J 5.1 accepts "exception", "round" and "convertToNull". So you just need to use new values in your application to make it work.

The worse thing is that NetBeans use this property internally:
1. For MySQL connection template (org-netbeans-modules-db.jar, org/netbeans/modules/db/explorer/dlg/Bundle.properties). But you can edit these values when configuring new connection.
2. For MySQL admin connections (org-netbeans-modules-db-mysql.jar, org/netbeans/modules/db/mysql/util/DatabaseUtils.java). The "convertToNull" value is HARDCODED there and AFAIS there is no other way then to rewrite this module code to provide it's compatibility with Connector/J 8.0.

Moreover, mysql-connector-java-5.1.23-bin.jar requirement is hardcoded inside NetBeans 8.0.2 and even inside latest NetBeans 8.2. This could also lead to some unexpected failures with NetBeans against modern MySQL versions because this connector version is 5 years old, doesn't support new server features and still contain bugs we were fixing over these years.

Though I think it's a NetBeans design issue, I've created the Bug#91421 to provide the legacy zeroDateTimeBehavior values support in c/J 8.0.

But it would be nice if you also write to NetBeans developers about this situation.

Thanks,
Alex

Options: ReplyQuote


Subject
Written By
Posted
Re: No enum constant mysql.cj.conf.PropertyDefinitions.ZerodatetimeBehaviour.CO NVERTTONULL using MySQL Community Server 8.0.11 and NetBeans 8.0.2
June 26, 2018 04:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.