"Batch update returned unexpected row count from update" error in Crowd

お困りですか?

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

コミュニティに質問

症状

Operations will fail in applications using Crowd authentication, and upon further investigation the following error is logged in Crowd logs:

com.atlassian.util.concurrent.LazyReference$InitializationException: org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Batch update returned unexpected row count from update [0];  actual row count: 0; expected: 1
  at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReferen ce.java:152)
  at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:115)

または


2019-08-02 17:49:29,526 http-nio-8095-exec-25 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [org.hibernate.jdbc.BatchedTooManyRowsAffectedException: Batch update returned unexpected row count from update [0]; actual row count: 9; expected: 1], SQL: insert into cwd_property (property_value, property_key, property_name) values (?, ?, ?)
2019-08-02 17:49:29,528 http-nio-8095-exec-25 ERROR [org.hibernate.internal.ExceptionMapperStandardImpl] HHH000346: Error during managed flush [org.hibernate.jdbc.BatchedTooManyRowsAffectedException: Batch update returned unexpected row count from update [0]; actual row count: 9; expected: 1]
2019-08-02 17:49:29,533 http-nio-8095-exec-25 INFO [crowd.xwork.interceptors.TransactionalInvocation] Invoking rollback for transaction on action '/console/setup/setupoptions.action (Options.execute())' due to throwable: org.springframework.orm.hibernate5.HibernateSystemException: Batch update returned unexpected row count from update [0]; actual row count: 9; expected: 1; nested exception is org.hibernate.jdbc.BatchedTooManyRowsAffectedException: Batch update returned unexpected row count from update [0]; actual row count: 9; expected: 1
org.springframework.orm.hibernate5.HibernateSystemException: Batch update returned unexpected row count from update [0]; actual row count: 9; expected: 1; nested exception is org.hibernate.jdbc.BatchedTooManyRowsAffectedException: Batch update returned unexpected row count from update [0]; actual row count: 9; expected: 1


原因

This error is typically caused by one of the following:

  • MySQL is not configured with the required read-commit isolation parameter.
  • You are using two versions of an application ( for example JIRA 3.13 and JIRA 4 ) using the same application ID in Crowd.
  • MySQL JDBC driver

ソリューション

  1. Verify your database is set up according to our setup documentation: Connecting Crowd to a Database
    (info) In MySQL, this error often occurs when the transaction-isolation is not set to READ-COMMITTED.
  2. If the errors continue, create two different application contexts in Crowd for each of the JIRA applications.
  3. Update the MySQL JDBC driver: Connector\J 5.1 driver download
最終更新日 2019 年 8 月 9 日

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

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