2

我在安装应用程序时遇到以下问题:
使用 Worklight Console 我正在上传 .wlapp 文件,删除已部署的应用程序并尝试再次上传相同的 .wlapp。
Worklight 控制台随后被卡住,甚至通常的服务器停止也无法完成。
在残酷地杀死服务器进程并重新启动它之后,可以上传 .wlapp。

安装的 Worklight Server 是带有 Derby/Liberty 的 v5.0.6 / v5.0.6.1 CE。

这是来自服务器的错误日志:

从 ID = 的 GADGET_APPLICATIONS 中删除 授予 XID : {422, S} , {429, S} 。选择的受害者是 XID : 429. [java.lang.String]".; 嵌套异常是 org.apache.openjpa.persistence.OptimisticLockException: Unable to get an object lock on "A lock could not be getting due to a deadlock,锁和服务员的循环是: Lock : ROW, GADGET_APPLICATIONS, (2,7) Waiting XID : {429, S} , WORKLIGHT, SELECT t0.ID, t0.ENFORCE_AUTHENTICITY, t0.ENVIRONMENT_ID, t1.ID, t1.DISP_IN_GALLERY, t1.LAST_UPDATE_TIME, t1.NAME, t0.SERVER_VERSION, t0.VERSION, t0.VERSION_LOCKED FROM GADGET_APPLICATIONS t0 INNER JOIN GADGETS t1 ON t0.GADGET_ID = t1.ID Granted XID: {422, S} Lock: ROW, GADGET_APPLICATIONS, (2 ,6) 等待 XID : {422, X} , WORKLIGHT, DELETE FROM GADGET_APPLICATIONS WHERE ID = ? 授予 XID : {422, S} , {429, } 。选定的受害者是 XID : 429. [java.lang.String]". at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:285) at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect .java:120)在 org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:212) 在 org.springframework.orm.jpa.JpaAccessor.translateIfNecessary(JpaAccessor.java:152) 在 org.springframework.orm。 jpa.JpaTemplate.execute(JpaTemplate.java:189) at org.springframework.orm.jpa.JpaTemplate.executeFind(JpaTemplate.java:151) at org.springframework.orm.jpa.JpaTemplate.findByNamedQuery(JpaTemplate.java:343)在 com.worklight.server.database.api.JpaDaoHelper.executeQuery(JpaDaoHelper.java: ID,t1.DISP_IN_GALLERY,t1.LAST_UPDATE_TIME,t1.NAME,t0.SERVER_VERSION,t0.VERSION,t0.VERSION_LOCKED 从 GADGET_APPLICATIONS t0 INNER JOIN GADGETS t1 ON t0.GADGET_ID = t1.ID 授予 XID:{422,S} 锁定: ROW, GADGET_APPLICATIONS, (2,6) 等待 XID : {422, X} , WORKLIGHT, DELETE FROM GADGET_APPLICATIONS WHERE ID = ? 授予 XID : {422, S} , {429, S} 。选定的受害者是 XID : 429. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(未知来源)的 org.apache.derby.impl.jdbc.EmbedConnection 中的 .impl.jdbc.TransactionResourceImpl.wrapInSQLException(未知来源)。SelectResultObjectProvider.next(SelectResultObjectProvider.java:99) at org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:35) ... 22 更多原因:java.sql.SQLException:无法获得锁由于死锁,锁和等待者的循环为: Lock : ROW, GADGET_APPLICATIONS, (2,7) Waiting XID : {429, S} , WORKLIGHT, SELECT t0.ID, t0.ENFORCE_AUTHENTICITY, t0.ENVIRONMENT_ID, t1.ID , t1.DISP_IN_GALLERY, t1.LAST_UPDATE_TIME, t1.NAME, t0.SERVER_VERSION, t0.VERSION, t0.VERSION_LOCKED FROM GADGET_APPLICATIONS t0 INNER JOIN GADGETS t1 ON t0.GADGET_ID = t1.ID Granted XID: {422, S} Lock: ROW , GADGET_APPLICATIONS, (2,6) 等待 XID : {422, X} , WORKLIGHT, DELETE FROM GADGET_APPLICATIONS WHERE ID = ? 授予 XID : {422, S} , {429, S} 。选定的受害者是 XID : 429. at org.apache.derby.impl。jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) ... 38 更多原因:错误 40001:由于死锁,无法获得锁,循环锁和服务员是:锁:ROW,GADGET_APPLICATIONS,(2,7)等待 XID:{429,S},WORKLIGHT,SELECT t0.ID,t0.ENFORCE_AUTHENTICITY,t0.ENVIRONMENT_ID,t1.ID,t1.DISP_IN_GALLERY,t1 .LAST_UPDATE_TIME, t1.NAME, t0.SERVER_VERSION, t0.VERSION, t0.VERSION_LOCKED FROM GADGET_APPLICATIONS t0 INNER JOIN GADGETS t1 ON t0.GADGET_ID = t1.ID 授予 XID : {422, S} Lock : ROW, GADGET_APPLICATIONS, (2, 6) 等待 XID : {422, X} , WORKLIGHT, DELETE FROM GADGET_APPLICATIONS WHERE ID = ? 授予 XID : {422, S} , {429, S} 。选定的受害者是 XID : 429. at org.apache。

4

1 回答 1

0

这可以通过将以下属性添加到 server.xml 中的 WorklightDS dataSource 元素来解决:

isolationLevel="TRANSACTION_READ_COMMITTED"
于 2013-05-24T05:32:47.990 回答