org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "EPERSON"; SQL statement: update RESOURCEPOLICY set START_DATE = ?, RPDESCRIPTION = ?, RESOURCE_TYPE_ID = ?, EPERSONGROUP_ID = ?, END_DATE = ?, EPERSON_ID = ?, RPTYPE = ?, RESOURCE_ID = ?, ACTION_ID = ?, RPNAME = ? where POLICY_ID = ? [50200-137]

Sakai JIRA | Ivan Masár | 4 years ago
  1. 0

    I ran "mvn clean package license:check -Dmaven.test.skip=false" and 25 tests failed with the following message, 2 seconds apart: 2012-12-02 23:40:08,149 INFO org.dspace.content.Collection @ test@email.com::create_collection:collection_id=197,handle=123456789/423 2012-12-02 23:40:08,149 INFO org.dspace.content.Item @ test@email.com::update_item:item_id=318 2012-12-02 23:40:08,149 INFO org.dspace.content.Item @ test@email.com::create_item:item_id=318 2012-12-02 23:40:10,151 ERROR org.dspace.content.WorkspaceItemTest @ SQL Error in init org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "EPERSON"; SQL statement: update RESOURCEPOLICY set START_DATE = ?, RPDESCRIPTION = ?, RESOURCE_TYPE_ID = ?, EPERSONGROUP_ID = ?, END_DATE = ?, EPERSON_ID = ?, RPTYPE = ?, RESOURCE_ID = ?, ACTION_ID = ?, RPNAME = ? where POLICY_ID = ? [50200-137] at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) at org.h2.message.DbException.get(DbException.java:167) at org.h2.message.DbException.get(DbException.java:144) at org.h2.table.RegularTable.doLock(RegularTable.java:466) at org.h2.table.RegularTable.lock(RegularTable.java:404) at org.h2.constraint.ConstraintReferential.existsRow(ConstraintReferential.java:336) at org.h2.constraint.ConstraintReferential.checkRowOwnTable(ConstraintReferential.java:328) at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:271) at org.h2.table.Table.fireConstraints(Table.java:797) at org.h2.table.Table.fireAfterRow(Table.java:814) at org.h2.command.dml.Update.update(Update.java:130) at org.h2.command.CommandContainer.update(CommandContainer.java:70) at org.h2.command.Command.executeUpdate(Command.java:199) at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:141) at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:127) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.dspace.storage.rdbms.MockDatabaseManager.executeUpdate(MockDatabaseManager.java:1397) at org.dspace.storage.rdbms.MockDatabaseManager.update(MockDatabaseManager.java:803) at org.dspace.storage.rdbms.DatabaseManager.update(DatabaseManager.java) at org.dspace.authorize.ResourcePolicy.update(ResourcePolicy.java:478) at org.dspace.authorize.AuthorizeManager.addPolicy(AuthorizeManager.java:481) at org.dspace.content.WorkspaceItem.create(WorkspaceItem.java:157) at org.dspace.content.WorkspaceItemTest.init(WorkspaceItemTest.java:56) at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at mockit.integration.junit4.internal.BlockJUnit4ClassRunnerDecorator.invokeExplosively(BlockJUnit4ClassRunnerDecorator.java:83) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:120) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:103) at org.apache.maven.surefire.Surefire.run(Surefire.java:169) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021) 2012-12-02 23:40:10,160 INFO org.dspace.content.Collection @ test@email.com::create_collection:collection_id=198,handle=12 See the surefire reports attached. First time this happened to me was here: https://github.com/DSpace/DSpace/pull/125 and now again on DSpace 3.0 (5221f92ce49b3d052fa1d3e7decf1f9b12742df5). Both times I ran the build a second time (with no changes), it built just fine.

    Sakai JIRA | 4 years ago | Ivan Masár
    org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "EPERSON"; SQL statement: update RESOURCEPOLICY set START_DATE = ?, RPDESCRIPTION = ?, RESOURCE_TYPE_ID = ?, EPERSONGROUP_ID = ?, END_DATE = ?, EPERSON_ID = ?, RPTYPE = ?, RESOURCE_ID = ?, ACTION_ID = ?, RPNAME = ? where POLICY_ID = ? [50200-137]
  2. 0

    I ran "mvn clean package license:check -Dmaven.test.skip=false" and 25 tests failed with the following message, 2 seconds apart: 2012-12-02 23:40:08,149 INFO org.dspace.content.Collection @ test@email.com::create_collection:collection_id=197,handle=123456789/423 2012-12-02 23:40:08,149 INFO org.dspace.content.Item @ test@email.com::update_item:item_id=318 2012-12-02 23:40:08,149 INFO org.dspace.content.Item @ test@email.com::create_item:item_id=318 2012-12-02 23:40:10,151 ERROR org.dspace.content.WorkspaceItemTest @ SQL Error in init org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "EPERSON"; SQL statement: update RESOURCEPOLICY set START_DATE = ?, RPDESCRIPTION = ?, RESOURCE_TYPE_ID = ?, EPERSONGROUP_ID = ?, END_DATE = ?, EPERSON_ID = ?, RPTYPE = ?, RESOURCE_ID = ?, ACTION_ID = ?, RPNAME = ? where POLICY_ID = ? [50200-137] at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) at org.h2.message.DbException.get(DbException.java:167) at org.h2.message.DbException.get(DbException.java:144) at org.h2.table.RegularTable.doLock(RegularTable.java:466) at org.h2.table.RegularTable.lock(RegularTable.java:404) at org.h2.constraint.ConstraintReferential.existsRow(ConstraintReferential.java:336) at org.h2.constraint.ConstraintReferential.checkRowOwnTable(ConstraintReferential.java:328) at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:271) at org.h2.table.Table.fireConstraints(Table.java:797) at org.h2.table.Table.fireAfterRow(Table.java:814) at org.h2.command.dml.Update.update(Update.java:130) at org.h2.command.CommandContainer.update(CommandContainer.java:70) at org.h2.command.Command.executeUpdate(Command.java:199) at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:141) at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:127) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.dspace.storage.rdbms.MockDatabaseManager.executeUpdate(MockDatabaseManager.java:1397) at org.dspace.storage.rdbms.MockDatabaseManager.update(MockDatabaseManager.java:803) at org.dspace.storage.rdbms.DatabaseManager.update(DatabaseManager.java) at org.dspace.authorize.ResourcePolicy.update(ResourcePolicy.java:478) at org.dspace.authorize.AuthorizeManager.addPolicy(AuthorizeManager.java:481) at org.dspace.content.WorkspaceItem.create(WorkspaceItem.java:157) at org.dspace.content.WorkspaceItemTest.init(WorkspaceItemTest.java:56) at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at mockit.integration.junit4.internal.BlockJUnit4ClassRunnerDecorator.invokeExplosively(BlockJUnit4ClassRunnerDecorator.java:83) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:120) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:103) at org.apache.maven.surefire.Surefire.run(Surefire.java:169) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021) 2012-12-02 23:40:10,160 INFO org.dspace.content.Collection @ test@email.com::create_collection:collection_id=198,handle=12 See the surefire reports attached. First time this happened to me was here: https://github.com/DSpace/DSpace/pull/125 and now again on DSpace 3.0 (5221f92ce49b3d052fa1d3e7decf1f9b12742df5). Both times I ran the build a second time (with no changes), it built just fine.

    Sakai JIRA | 4 years ago | Ivan Masár
    org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "EPERSON"; SQL statement: update RESOURCEPOLICY set START_DATE = ?, RPDESCRIPTION = ?, RESOURCE_TYPE_ID = ?, EPERSONGROUP_ID = ?, END_DATE = ?, EPERSON_ID = ?, RPTYPE = ?, RESOURCE_ID = ?, ACTION_ID = ?, RPNAME = ? where POLICY_ID = ? [50200-137]
  3. 0

    javax.persistence.PersistenceException

    GitHub | 3 years ago | guwirth
    org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "RULES_PLUGIN_KEY_AND_NAME ON PUBLIC.RULES(PLUGIN_RULE_KEY, PLUGIN_NAME)"; SQL statement:|insert into rules (id, cardinality, plugin_config_key, created_at, description, plugin_rule_key, language, name, parent_id, plugin_name, priority, status, updated_at) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23505-172]<|?at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)<|?at org.h2.message.DbException.get(DbException.java:169)<|?at org.h2.message.DbException.get(DbException.java:146)<|?at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:83)<|?at org.h2.index.PageBtree.find(PageBtree.java:121)<|?at org.h2.index.PageBtreeLeaf.addRow(PageBtreeLeaf.java:148)<|?at org.h2.index.PageBtreeLeaf.addRowTry(PageBtreeLeaf.java:101)<|?at org.h2.index.PageBtreeNode.addRowTry(PageBtreeNode.java:201)<|?at org.h2.index.PageBtreeNode.addRowTry(PageBtreeNode.java:201)<|?at org.h2.index.PageBtreeIndex.addRow(PageBtreeIndex.java:104)<|?at org.h2.index.PageBtreeIndex.add(PageBtreeIndex.java:95)<|?at org.h2.table.RegularTable.addRow(RegularTable.java:124)<|?at org.h2.command.dml.Insert.insertRows(Insert.java:126)<|?at org.h2.command.dml.Insert.update(Insert.java:86)<|?at org.h2.command.CommandContainer.update(CommandContainer.java:79)<|?at org.h2.command.Command.executeUpdate(Command.java:235)<|?at org.h2.server.TcpServerThread.process(TcpServerThread.java:335)<|?at org.h2.server.TcpServerThread.run(TcpServerThread.java:151)<|?at java.lang.Thread.run(Unknown Source)<|
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Grails: Hibernate and Data migrations

    Stack Overflow | 4 years ago | TroyB
    org.h2.jdbc.JdbcSQLException: NULL not allowed for column "ZIPCODE"; SQL statement: insert into customer (id, version, billaddr, billcity, billstate, billzipcode, cell, contact, country_id, custcode, custname, date_created, email, fax, last_updated, organization, phone, shipaddr, shipasbill, shipcity, shipstate, shipzipcode, status, tenant_id) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23502-164]
  6. 0

    MVCC and SELECT FOR UPDATE

    Google Groups | 6 years ago | Dashie
    org.h2.jdbc.JdbcSQLException: Timeout trying to lock table ; SQL statement: insert into materials (id, a, b, c, d, e, f) values (null, ?, ?, ?, ?, ?, 'a') [50200-168]
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.h2.jdbc.JdbcSQLException

    Timeout trying to lock table "EPERSON"; SQL statement: update RESOURCEPOLICY set START_DATE = ?, RPDESCRIPTION = ?, RESOURCE_TYPE_ID = ?, EPERSONGROUP_ID = ?, END_DATE = ?, EPERSON_ID = ?, RPTYPE = ?, RESOURCE_ID = ?, ACTION_ID = ?, RPNAME = ? where POLICY_ID = ? [50200-137]

    at org.h2.message.DbException.getJdbcSQLException()
  2. H2 Database Engine
    JdbcPreparedStatement.executeUpdate
    1. org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
    2. org.h2.message.DbException.get(DbException.java:167)
    3. org.h2.message.DbException.get(DbException.java:144)
    4. org.h2.table.RegularTable.doLock(RegularTable.java:466)
    5. org.h2.table.RegularTable.lock(RegularTable.java:404)
    6. org.h2.constraint.ConstraintReferential.existsRow(ConstraintReferential.java:336)
    7. org.h2.constraint.ConstraintReferential.checkRowOwnTable(ConstraintReferential.java:328)
    8. org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:271)
    9. org.h2.table.Table.fireConstraints(Table.java:797)
    10. org.h2.table.Table.fireAfterRow(Table.java:814)
    11. org.h2.command.dml.Update.update(Update.java:130)
    12. org.h2.command.CommandContainer.update(CommandContainer.java:70)
    13. org.h2.command.Command.executeUpdate(Command.java:199)
    14. org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:141)
    15. org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:127)
    15 frames
  3. Commons DBCP
    DelegatingPreparedStatement.executeUpdate
    1. org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
    2. org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
    3. org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
    3 frames
  4. DSpace Kernel :: API and Implementation
    WorkspaceItemTest.init
    1. org.dspace.storage.rdbms.MockDatabaseManager.executeUpdate(MockDatabaseManager.java:1397)
    2. org.dspace.storage.rdbms.MockDatabaseManager.update(MockDatabaseManager.java:803)
    3. org.dspace.storage.rdbms.DatabaseManager.update(DatabaseManager.java)
    4. org.dspace.authorize.ResourcePolicy.update(ResourcePolicy.java:478)
    5. org.dspace.authorize.AuthorizeManager.addPolicy(AuthorizeManager.java:481)
    6. org.dspace.content.WorkspaceItem.create(WorkspaceItem.java:157)
    7. org.dspace.content.WorkspaceItemTest.init(WorkspaceItemTest.java:56)
    7 frames
  5. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    3. java.lang.reflect.Method.invoke(Method.java:616)
    3 frames
  6. JUnit
    FrameworkMethod.invokeExplosively
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    3 frames
  7. Main
    BlockJUnit4ClassRunnerDecorator.invokeExplosively
    1. mockit.integration.junit4.internal.BlockJUnit4ClassRunnerDecorator.invokeExplosively(BlockJUnit4ClassRunnerDecorator.java:83)
    1 frame
  8. JUnit
    ParentRunner.run
    1. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java)
    2. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
    3. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    4. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
    5. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    6. org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    7. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    8. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    9. org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    10. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    11. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    12. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    13. org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    13 frames
  9. JUnit4 Provider
    JUnit4TestSet.execute
    1. org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
    1 frame
  10. SureFire
    Surefire.run
    1. org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:120)
    2. org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:103)
    3. org.apache.maven.surefire.Surefire.run(Surefire.java:169)
    3 frames
  11. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:616)
    4 frames
  12. SureFire
    SurefireBooter.main
    1. org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
    2. org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
    2 frames