JBOSS 服务器日志显示错误 SESSIONINFO 添加空值
JBOSS server log showing error SESSIONINFO adding null values
我有 war 文件部署在 jboss-eap-6.3,JBPM 在 [=28= 上运行]-eap-6.4。我们正在使用在 JBPM 中处理的决策表(excel 表)。
我们将 RESTful webserive 与 ejb 和 java 一起使用。
为了执行规则,我们使用 drools-6.0.1.Final。
每当我有大约 4-5 个值的小请求时,它都会给出输出。
但是每当我收到大约超过 100 个值的响应时,我都会在 server.log 文件 jboss-eap-6.4:
中收到此错误
18:45:09,146 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper]
(EJB default - 141) SQL Error: 50200, SQLState: HYT00 18:45:09,147
WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default
- 138) SQL Error: 50200, SQLState: HYT00 18:45:09,163 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 141)
Timeout trying to lock table "SESSIONINFO"; SQL statement: insert into
SessionInfo (id, lastModificationDate, rulesByteArray, startDate,
OPTLOCK) values (null, ?, ?, ?, ?) [50200-168] 18:45:09,168 ERROR
[org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 138)
Timeout trying to lock table "SESSIONINFO"; SQL statement: insert into
SessionInfo (id, lastModificationDate, rulesByteArray, startDate,
OPTLOCK) values (null, ?, ?, ?, ?) [50200-168] 18:45:09,164 WARN
[org.drools.persistence.SingleSessionCommandService] (EJB default -
141) Could not commit session:
javax.persistence.PessimisticLockException: could not execute
statement at
org.hibernate.ejb.AbstractEntityManagerImpl.wrapLockException(AbstractEntityManagerImpl.java:1459)
[hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]
at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1344)
[hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]
at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310)
[hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]
at
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1316)
[hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]
at
org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:881)
[hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]
at
org.drools.persistence.jpa.JpaPersistenceContext.persist(JpaPersistenceContext.java:56)
[drools-persistence-jpa-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
at
org.drools.persistence.SingleSessionCommandService.(SingleSessionCommandService.java:110)
[drools-persistence-jpa-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
at sun.reflect.GeneratedConstructorAccessor253.newInstance(Unknown
Source) [:1.8.0_144] at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[rt.jar:1.8.0_144] at
java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[rt.jar:1.8.0_144] at
org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:171)
[drools-persistence-jpa-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
at
org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newKieSession(KnowledgeStoreServiceImpl.java:70)
[drools-persistence-jpa-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
at
org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newKieSession(KnowledgeStoreServiceImpl.java:39)
[drools-persistence-jpa-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
at
org.kie.internal.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:121)
[kie-internal-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2] at
org.jbpm.runtime.manager.impl.factory.JPASessionFactory.newKieSession(JPASessionFactory.java:42)
[jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
at
org.jbpm.runtime.manager.impl.PerRequestRuntimeManager$PerRequestInitializer.initKieSession(PerRequestRuntimeManager.java:203)
[jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
at
org.jbpm.runtime.manager.impl.RuntimeEngineImpl.getKieSession(RuntimeEngineImpl.java:70)
[jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
at myproject.execute(myejbclass.java:28) [oneofmyejb.jar:] at
sun.reflect.GeneratedMethodAccessor210.invoke(Unknown Source)
[:1.8.0_144] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.8.0_144] at
java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_144]
at
org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
[jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.ee.component.interceptors.UserInterceptorFactory.processInvocation(UserInterceptorFactory.java:63)
[jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:86)
[jboss-as-weld-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:97)
[jboss-as-weld-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.as.ee.component.interceptors.UserInterceptorFactory.processInvocation(UserInterceptorFactory.java:63)
[jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.ee.component.interceptors.UserInterceptorFactory.processInvocation(UserInterceptorFactory.java:63)
[jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
[jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
[jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:93)
[jboss-as-weld-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)
[jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
[jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:280)
[jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:345)
[jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:243)
[jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:79)
[jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
[jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43)
[jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory.processInvocation(ShutDownInterceptorFactory.java:64)
[jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
[jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
[jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55)
[jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
[jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
[jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at
org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185)
[jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:332)
[jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access0(MethodInvocationMessageHandler.java:69)
[jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.run(MethodInvocationMessageHandler.java:202)
[jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[rt.jar:1.8.0_144] at
java.util.concurrent.FutureTask.run(FutureTask.java:266)
[rt.jar:1.8.0_144] at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[rt.jar:1.8.0_144] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[rt.jar:1.8.0_144] at java.lang.Thread.run(Thread.java:748)
[rt.jar:1.8.0_144] at
org.jboss.threads.JBossThread.run(JBossThread.java:122) Caused by:
org.hibernate.PessimisticLockException: could not execute statement
at org.hibernate.dialect.H2Dialect.convert(H2Dialect.java:314)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:189)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:96)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:58)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2987)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3499)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:395)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:229)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:209)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:193)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:321)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:286)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:192)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:125)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:78)
[hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]
at
org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:208)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:151)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:78)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:772)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.internal.SessionImpl.persist(SessionImpl.java:746)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.internal.SessionImpl.persist(SessionImpl.java:750)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at
org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:875)
[hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]
... 73 more Caused by: org.h2.jdbc.JdbcSQLException: Timeout trying
to lock table "SESSIONINFO"; SQL statement: insert into SessionInfo
(id, lastModificationDate, rulesByteArray, startDate, OPTLOCK) values
(null, ?, ?, ?, ?) [50200-168] 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.table.RegularTable.doLock(RegularTable.java:500) at
org.h2.table.RegularTable.lock(RegularTable.java:434) at
org.h2.command.dml.Insert.insertRows(Insert.java:123) at
org.h2.command.dml.Insert.update(Insert.java:84) at
org.h2.command.CommandContainer.update(CommandContainer.java:75) at
org.h2.command.Command.executeUpdate(Command.java:230) at
org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:156)
at
org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:142)
at
org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493)
at
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:186)
[hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] ...
94 more
我试图在互联网上寻找解决方案,但没有成功。我尝试更改超时时间,增加线程池大小,增加 standalone.xml.If 中各处的线程大小有人可以给我一个想法或给我一些相关的文章,这将非常有帮助。
这似乎与 H2 DB 有关,而不直接与 JBoss 本身有关。
异常:
18:45:09,146 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 141) SQL Error: 50200, SQLState: HYT00 18:45:09,147 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 138) SQL Error: 50200, SQLState: HYT00 18:45:09,163 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 141)
如社交 MSDN 中所述,问题可能与 SQL 服务器混合身份验证模式或 DNS 通信有关。
但特别是在您的情况下,以下几行表明该语句无法提交给 table "SESSIONINFO",因此它抛出了超时异常:
Could not commit session: javax.persistence.PessimisticLockException: could not execute statement at
在使用 JBPM 时,h2 数据库的某处被配置为我们应用程序中的数据源 (standalone.xml),因此当许多请求同时到来时,h2 数据库无法处理并给出 悲观锁异常
The solution was to add MVCC=true in the url which is mutliversion
concurrency control and you can read more about it.
我有 war 文件部署在 jboss-eap-6.3,JBPM 在 [=28= 上运行]-eap-6.4。我们正在使用在 JBPM 中处理的决策表(excel 表)。 我们将 RESTful webserive 与 ejb 和 java 一起使用。 为了执行规则,我们使用 drools-6.0.1.Final。 每当我有大约 4-5 个值的小请求时,它都会给出输出。 但是每当我收到大约超过 100 个值的响应时,我都会在 server.log 文件 jboss-eap-6.4:
中收到此错误18:45:09,146 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 141) SQL Error: 50200, SQLState: HYT00 18:45:09,147 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 138) SQL Error: 50200, SQLState: HYT00 18:45:09,163 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 141) Timeout trying to lock table "SESSIONINFO"; SQL statement: insert into SessionInfo (id, lastModificationDate, rulesByteArray, startDate, OPTLOCK) values (null, ?, ?, ?, ?) [50200-168] 18:45:09,168 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 138) Timeout trying to lock table "SESSIONINFO"; SQL statement: insert into SessionInfo (id, lastModificationDate, rulesByteArray, startDate, OPTLOCK) values (null, ?, ?, ?, ?) [50200-168] 18:45:09,164 WARN [org.drools.persistence.SingleSessionCommandService] (EJB default - 141) Could not commit session: javax.persistence.PessimisticLockException: could not execute statement at org.hibernate.ejb.AbstractEntityManagerImpl.wrapLockException(AbstractEntityManagerImpl.java:1459) [hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1344) [hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310) [hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1316) [hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:881) [hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.drools.persistence.jpa.JpaPersistenceContext.persist(JpaPersistenceContext.java:56) [drools-persistence-jpa-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2] at org.drools.persistence.SingleSessionCommandService.(SingleSessionCommandService.java:110) [drools-persistence-jpa-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2] at sun.reflect.GeneratedConstructorAccessor253.newInstance(Unknown Source) [:1.8.0_144] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_144] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [rt.jar:1.8.0_144] at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:171) [drools-persistence-jpa-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2] at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newKieSession(KnowledgeStoreServiceImpl.java:70) [drools-persistence-jpa-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2] at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newKieSession(KnowledgeStoreServiceImpl.java:39) [drools-persistence-jpa-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2] at org.kie.internal.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:121) [kie-internal-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2] at org.jbpm.runtime.manager.impl.factory.JPASessionFactory.newKieSession(JPASessionFactory.java:42) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2] at org.jbpm.runtime.manager.impl.PerRequestRuntimeManager$PerRequestInitializer.initKieSession(PerRequestRuntimeManager.java:203) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2] at org.jbpm.runtime.manager.impl.RuntimeEngineImpl.getKieSession(RuntimeEngineImpl.java:70) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2] at myproject.execute(myejbclass.java:28) [oneofmyejb.jar:] at sun.reflect.GeneratedMethodAccessor210.invoke(Unknown Source) [:1.8.0_144] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_144] at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_144] at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.ee.component.interceptors.UserInterceptorFactory.processInvocation(UserInterceptorFactory.java:63) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:86) [jboss-as-weld-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:97) [jboss-as-weld-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.as.ee.component.interceptors.UserInterceptorFactory.processInvocation(UserInterceptorFactory.java:63) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.ee.component.interceptors.UserInterceptorFactory.processInvocation(UserInterceptorFactory.java:63) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:93) [jboss-as-weld-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:280) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:345) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:243) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:79) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory.processInvocation(ShutDownInterceptorFactory.java:64) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1] at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:332) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access0(MethodInvocationMessageHandler.java:69) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.run(MethodInvocationMessageHandler.java:202) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_144] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_144] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_144] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_144] at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_144] at org.jboss.threads.JBossThread.run(JBossThread.java:122) Caused by: org.hibernate.PessimisticLockException: could not execute statement at org.hibernate.dialect.H2Dialect.convert(H2Dialect.java:314) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:189) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:96) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:58) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2987) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3499) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:395) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:229) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:209) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:193) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:321) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:286) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:192) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:125) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:78) [hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:208) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:151) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:78) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:772) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:746) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:750) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:875) [hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] ... 73 more Caused by: org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "SESSIONINFO"; SQL statement: insert into SessionInfo (id, lastModificationDate, rulesByteArray, startDate, OPTLOCK) values (null, ?, ?, ?, ?) [50200-168] 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.table.RegularTable.doLock(RegularTable.java:500) at org.h2.table.RegularTable.lock(RegularTable.java:434) at org.h2.command.dml.Insert.insertRows(Insert.java:123) at org.h2.command.dml.Insert.update(Insert.java:84) at org.h2.command.CommandContainer.update(CommandContainer.java:75) at org.h2.command.Command.executeUpdate(Command.java:230) at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:156) at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:142) at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:186) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2] ... 94 more
我试图在互联网上寻找解决方案,但没有成功。我尝试更改超时时间,增加线程池大小,增加 standalone.xml.If 中各处的线程大小有人可以给我一个想法或给我一些相关的文章,这将非常有帮助。
这似乎与 H2 DB 有关,而不直接与 JBoss 本身有关。
异常:
18:45:09,146 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 141) SQL Error: 50200, SQLState: HYT00 18:45:09,147 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 138) SQL Error: 50200, SQLState: HYT00 18:45:09,163 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 141)
如社交 MSDN 中所述,问题可能与 SQL 服务器混合身份验证模式或 DNS 通信有关。
但特别是在您的情况下,以下几行表明该语句无法提交给 table "SESSIONINFO",因此它抛出了超时异常:
Could not commit session: javax.persistence.PessimisticLockException: could not execute statement at
在使用 JBPM 时,h2 数据库的某处被配置为我们应用程序中的数据源 (standalone.xml),因此当许多请求同时到来时,h2 数据库无法处理并给出 悲观锁异常
The solution was to add MVCC=true in the url which is mutliversion concurrency control and you can read more about it.