LDAP sync fails with IllegalArgumentException due to wrong MySQL JDBC driver being used

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

要約

Syncing with LDAP directory fails and the following exception is written in the atlassian-fisheye.log file:

2021-06-07 12:36:31,273 ERROR [schedulerServiceQuartzScheduler_Worker-1 ] com.atlassian.crowd.directory.DbCachingDirectoryPoller DbCachingDirectoryPoller-pollChanges - Error occurred while refreshing the cache for directory [ 2 ].
org.hibernate.exception.GenericJDBCException: could not execute query
	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
	at org.hibernate.loader.Loader.doList(Loader.java:2553) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
	at org.hibernate.loader.Loader.doList(Loader.java:2536) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2366) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
	at org.hibernate.loader.Loader.list(Loader.java:2361) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:495) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
	at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:357) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
	at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:198) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
	at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1194) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
	at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
	at com.atlassian.crowd.dao.user.UserDAOHibernate.search(UserDAOHibernate.java:377) [crowd-persistence-hibernate4-2.9.5-7fb674b.jar:?]
Caused by: java.sql.SQLException: HOUR_OF_DAY: 2 -> 3
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) [mysql-connector-java-8.0.24.jar:8.0.24]
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) [mysql-connector-java-8.0.24.jar:8.0.24]
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89) [mysql-connector-java-8.0.24.jar:8.0.24]
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63) [mysql-connector-java-8.0.24.jar:8.0.24]
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73) [mysql-connector-java-8.0.24.jar:8.0.24]
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:85) [mysql-connector-java-8.0.24.jar:8.0.24]
	at com.mysql.cj.jdbc.result.ResultSetImpl.getTimestamp(ResultSetImpl.java:939) [mysql-connector-java-.jar:8.0.24]
	at com.mysql.cj.jdbc.result.ResultSetImpl.getTimestamp(ResultSetImpl.java:977) [mysql-connector-java-8.0.24.jar:8.0.24]
Caused by: com.mysql.cj.exceptions.WrongArgumentException: HOUR_OF_DAY: 2 -> 3
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [?:1.8.0_191]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [?:1.8.0_191]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [?:1.8.0_191]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [?:1.8.0_191]
	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) [mysql-connector-java-8.0.24.jar:8.0.24]
	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) [mysql-connector-java-8.0.24.jar:8.0.24]
	at com.mysql.cj.result.SqlTimestampValueFactory.localCreateFromDatetime(SqlTimestampValueFactory.java:195) [mysql-connector-java-8.0.24.jar:8.0.24]
	at com.mysql.cj.result.SqlTimestampValueFactory.localCreateFromDatetime(SqlTimestampValueFactory.java:51) [mysql-connector-java-8.0.24.jar:8.0.24]
	at com.mysql.cj.result.AbstractDateTimeValueFactory.createFromDatetime(AbstractDateTimeValueFactory.java:104) [mysql-connector-java-8.0.24.jar:8.0.24]
	at com.mysql.cj.protocol.a.MysqlTextValueDecoder.decodeDatetime(MysqlTextValueDecoder.java:90) [mysql-connector-java-8.0.24.jar:8.0.24]
	at com.mysql.cj.protocol.result.AbstractResultsetRow.decodeAndCreateReturnValue(AbstractResultsetRow.java:86) [mysql-connector-java-8.0.24.jar:8.0.24]
	at com.mysql.cj.protocol.result.AbstractResultsetRow.getValueFromBytes(AbstractResultsetRow.java:243) [mysql-connector-java-8.0.24.jar:8.0.24]
	at com.mysql.cj.protocol.a.result.ByteArrayRow.getValue(ByteArrayRow.java:91) [mysql-connector-java-8.0.24.jar:8.0.24]
	... 71 more
Caused by: java.lang.IllegalArgumentException: HOUR_OF_DAY: 2 -> 3
	at java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2829) [?:1.8.0_191]
	at java.util.Calendar.updateTime(Calendar.java:3393) [?:1.8.0_191]
	at java.util.Calendar.getTimeInMillis(Calendar.java:1782) [?:1.8.0_191]
	at com.mysql.cj.result.SqlTimestampValueFactory.localCreateFromDatetime(SqlTimestampValueFactory.java:191) [mysql-connector-java-8.0.24.jar:8.0.24]
	... 77 more

環境

  • Fisheye 4.8.6
  • MySQL 5.7
  • JDBC Driver version 8.x

原因

This turns out to be a bug in MySQL JDBC driver version 8.x, and as can be seen in the stack trace above the mysql-connector-java-8.0.24.jar driver version is being used.

ソリューション

We recommend at Migrating to MySQL to not use the JDBC driver version 8.x. The driver version needs to be downgraded to 5.1.x by following these steps:

  1. Access the MySQL Connector / J download website
  2. Click the Archives tab
  3. In Product Version dropdown, select 5.1.49.
  4. Leave the Operating System dropdown set to Platform Independent
  5. Click the Download button corresponding to the Compressed TAR Archive option listed
  6. Expand the downloaded tar.gz file.
  7. Copy the mysql-connector-java-5.1.49-bin.jar file to your FISHEYE_INST/lib directory.
    NOTES:
    1. FISHEYE_INST is an environment variable that points to the directory used by Fisheye for storing data
    2. You may need to create the lib directory inside FISHEYE_INST
  8. Delete the existing MySQL driver mysql-connector-java-8.0.24.jar from FISHEYE_INST/lib directory.
  9. Restart Fisheye/Crucible.

最終更新日 2021 年 6 月 16 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.