Cannot Update Universal Plugin Manager (UPM) due to NO_AUTO_VALUE_ON_ZERO set on MySQL's sql_mode parameter

お困りですか?

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

コミュニティに質問

症状

Attempting to update the universal plugin manager (UPM) display the Error message on screen that suggesting to check the logs for additional information.

atlassian-confluence.log に次のメッセージが表示される。

2014-03-11 17:33:26,417 ERROR [UpmAsynchronousTaskManager:thread-2] [atlassian.event.internal.AsynchronousAbleEventDispatcher] run There was an exception thrown trying to dispatch event 'com.atlassian.plugin.event.events.PluginModuleEnabledEvent@a81fe5' from the invoker 'SingleParameterMethodListenerInvoker{method=public void com.atlassian.confluence.plugins.featurediscovery.PluginModuleEventListener.onPluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent), listener=com.atlassian.confluence.plugins.featurediscovery.PluginModuleEventListener@1158ba9}'.
 -- referer: http://athena.yorkstreet.local/plugins/servlet/upm | url: /rest/plugins/1.0/ | userName: admin
java.lang.RuntimeException: java.lang.NullPointerException
	at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:50)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:60)
	at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:160)
	at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:79)
	at com.atlassian.plugin.event.impl.DefaultPluginEventManager.broadcast(DefaultPluginEventManager.java:84)
	at com.atlassian.plugin.manager.DefaultPluginManager.notifyModuleEnabled(DefaultPluginManager.java:1663)
..
Caused by: java.lang.NullPointerException
	at net.java.ao.EntityManager$CacheKey.hashCode(EntityManager.java:1227)
	at java.util.HashMap.hash(HashMap.java:351)
	at java.util.HashMap.getEntry(HashMap.java:443)
	at java.util.LinkedHashMap.get(LinkedHashMap.java:301)
	at net.java.ao.EntityManager.getFromCache(EntityManager.java:285)
	at net.java.ao.EntityManager.peer(EntityManager.java:269)

Or :

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '0' for key 'PRIMARY'
2014-02-25 16:22:43,983 ERROR [UpmAsynchronousTaskManager:thread-2] [atlassian.event.internal.AsynchronousAbleEventDispatcher] run There was an exception thrown trying to dispatch event 'com.atlassian.plugin.event.events.PluginModuleEnabledEvent@f1e16a' from the invoker 'SingleParameterMethodListenerInvoker{method=public void com.atlassian.confluence.plugins.featurediscovery.PluginModuleEventListener.onPluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent), listener=com.atlassian.confluence.plugins.featurediscovery.PluginModuleEventListener@1ea12da}'.
 -- referer: http://local
host:8090/plugins/servlet/upm#manage | url: /rest/plugins/1.0/ | userName: admin
java.lang.RuntimeException: There was a SQL exception thrown by the Active Objects library:
Database:
	- name:MySQL
	- version:5.5.36-log
	- minor version:5
	- major version:5
Driver:
	- name:MySQL Connector Java
	- version:mysql-connector-java-5.1.28 ( Revision: user@oracle.com-20131125092425-yvejy3xvci77ru3k )

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '0' for key 'PRIMARY'
	at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66)
........

原因

In MySQL configuration ( my.ini (Windows) or my.cnf (Unix) ), parameter of sql_mode is set to  NO_AUTO_VALUE_ON_ZERO.

ソリューション

  1. Edit the my.cnf file (often named my.ini on Windows operating systems or my.cnf on UNIX operating systems) in your MySQL server.
  2. Remove NO_AUTO_VALUE_ON_ZERO from sql_mode.

    After removing NO_AUTO_VALUE_ON_ZERO parameter from sql_mode:

      sql_mode = NO_AUTO_CREATE_USER

  3. Clear Plugin Cache

最終更新日 2018 年 11 月 2 日

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

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