当前位置: 代码迷 >> Web前端 >> [转帖]WebSphere Portal 6.0 针对一个大库运作refreshAllItems任务会导致事务超时
  详细解决方案

[转帖]WebSphere Portal 6.0 针对一个大库运作refreshAllItems任务会导致事务超时

热度:496   发布时间:2012-11-10 10:48:50.0
[转帖]WebSphere Portal 6.0 针对一个大库运行refreshAllItems任务会导致事务超时

[标题]
针对一个大库运行refreshAllItems任务会导致事务超时?

环境:(产品,平台,机型,软件版本,等)
产品:Workplace Web Content Management
平台:AIX, HP-UX, Linux, Linux iSeries, Linux Red Hat - iSeries, Linux SUSE - iSeries, Solaris, Windows?
软件版本:6.0.1, 6.0.0.2, 6.0.0.1, 6.0?

问题描述:
当您针对一个大的库运行refreshAllItems任务时,您可能会碰到事务处理超时,并且在日志中报这样的错误:

[12:14:13:061 CDT] 00000055 ServletWrappe E SRVE0068E: Could not invoke the service() method on servlet WCM Framework. Exception thrown : java.lang.IllegalStateException:?
Session Object Internals:?
id : ZjPjtHUzlRSKcDMniJrpeP3
hashCode : 29826728
create time : 12:00:19 CDT 2007
last access : 12:00:23 CDT 2007
max inactive interval : 600
user name : anonymous
valid session : false
new session : false

overflowed : false

app name : default_host/wps/wcm

non-serializable app specific session data : null
serializable app specific session data : []

at com.ibm.ws.webcontainer.httpsession.SessionData.getValueGuts(SessionData.java:825)
at com.ibm.ws.webcontainer.httpsession.SessionData.getValue(SessionData.java:1251)
at com.ibm.ws.webcontainer.httpsession.SessionData.getAttribute(SessionData.java:1131)
at com.ibm.ws.webcontainer.httpsession.HttpSessionFacade.getAttribute(HttpSessionFacade.java:104)
at com.presence.connect.wmmcomms.UserManagementUtils.getUser(UserManagementUtils.java:96)
at com.presence.connect.Connect.initialiseRequest(Connect.java:377)
at com.presence.connect.ConnectServlet.process(ConnectServlet.java:242)
at com.presence.connect.ConnectServlet.doGet(ConnectServlet.java:120)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1572)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:762)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:89)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1924)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:98)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:288)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:950)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:582)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext.handleAsyncComplete(SSLReadServiceContext.java:506)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext.read(SSLReadServiceContext.java:468)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext.read(SSLReadServiceContext.java:306)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.readyInboundPostHandshake(SSLConnectionLink.java:655)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyHandshakeCompletedCallback.complete(SSLConnectionLink.java:364)
at com.ibm.ws.ssl.channel.impl.SSLUtils.handleHandshake(SSLUtils.java:760)
at com.ibm.ws.ssl.channel.impl.SSLHandshakeIOCallback.complete(SSLHandshakeIOCallback.java:70)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1471)

接下来还会报很多有关JCR文本搜索的异常信息,如下:
[12:29:34:735 CDT] 0000002f JCRCFLLoggerI E com.ibm.icm.ts.tss.JCRCFLLoggerImpl com.ibm.icm.ts.tss.app.IndexMaintainer.handleError [java.lang.ThreadGroup[name=icmciWorkManager: icmjcrear,maxpri=10]]: error processing pending event name: ' (node not currently found in workspace) ' event: Event: action='Delete_Node(2)', timestamp='2007-04-24 17:00:45.29769', document id=<workspace: 1, itemid: AB001001N07D23C21100235554>', parentID: <workspace: 1, itemid: AB001001N07B25B437000C1C71> com.ibm.icm.ts.tss.ls.DatabaseException: com.ibm.icm.ts.path.StorageException: java.lang.IllegalArgumentException
at com.ibm.icm.ts.tss.app.IndexMaintainer.reindexWorkspace(IndexMaintainer.java:344)
at com.ibm.icm.ts.tss.app.IndexMaintainer.processPendingUpdates(IndexMaintainer.java:202)
at com.ibm.icm.ts.tss.app.IndexMaintainer.runIndexMaintenance(IndexMaintainer.java:137)
at com.ibm.icm.ts.tss.app.IndexMaintainer.checkForUpdates(IndexMaintainer.java:105)
at com.ibm.icm.ts.tss.app.IndexMaintenanceService.checkForUpdates(IndexMaintenanceService.java:65)
at com.ibm.icm.ts.tss.app.IndexMaintenanceService.access$000(IndexMaintenanceService.java:27)
at com.ibm.icm.ts.tss.app.IndexMaintenanceService$Notifiee.onEvent(IndexMaintenanceService.java:114)
at com.ibm.icm.ts.act.ActivityImpl$ManagerImpl$ActivityRunner.runActivity(ActivityImpl.java:333)
at com.ibm.icm.ts.act.ActivityImpl$ManagerImpl$ActivityRunner.run(ActivityImpl.java:303)
at com.ibm.hrl.workmanager.RunnableWrapper.run(RunnableWrapper.java:44)
at com.ibm.hrl.workmanager.impl.was.WasWork.run(WasWork.java:75)
at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:258)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:320)
at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:118)
at com.ibm.ws.asynchbeans.J2EEContext$DoAsProxy.run(J2EEContext.java:325)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:709)
at com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:218)
at com.ibm.ws.asynchbeans.ABWorkItemImpl.run(ABWorkItemImpl.java:154)
at java.lang.Thread.run(Thread.java:534)
Caused by: com.ibm.icm.ts.path.StorageException: java.lang.IllegalArgumentException
at com.ibm.icm.ts.tss.JCRDocumentImpl$Manager.lookupChildren(JCRDocumentImpl.java:323)
at com.ibm.icm.ts.tss.JCRDocumentImpl$Manager.access$000(JCRDocumentImpl.java:246)
at com.ibm.icm.ts.tss.JCRDocumentImpl.children(JCRDocumentImpl.java:83)
at com.ibm.icm.ts.tss.JCRIndexerImpl.indexSubtreeRecursive(JCRIndexerImpl.java:72)
at com.ibm.icm.ts.tss.JCRIndexerImpl.indexSubtreeRecursive(JCRIndexerImpl.java:74)
at com.ibm.icm.ts.tss.JCRIndexerImpl.indexSubtreeRecursive(JCRIndexerImpl.java:74)
at com.ibm.icm.ts.tss.JCRIndexerImpl.indexSubtree(JCRIndexerImpl.java:57)
at com.ibm.icm.ts.util.ReindexWorkspace.addEventsForAllNodes(ReindexWorkspace.java:142)
at com.ibm.icm.ts.util.ReindexWorkspace.addEventsForAllNodes(ReindexWorkspace.java:127)
at com.ibm.icm.ts.util.ReindexWorkspace.reindexWorkspace(ReindexWorkspace.java:65)
at com.ibm.icm.ts.tss.app.IndexMaintainer.reindexWorkspace(IndexMaintainer.java:342)

问题分析:
当refreshAllItems任务运行的同时,JCR 搜索也在尝试重建索引,这便导致refreshAllItems任务超时,在浏览器端也报挂起的错误。JCR在此期间重建索引的对象是在任务运行这段时间被重新保存了的文档。结果便是当事务超时之后浏览器报挂起的错误。

解答:
请暂时禁用文本搜索,再运行refreshAllItems任务。 编辑以下文档:

WebSphere\PortalServer\jcr\lib\com\ibm\icm\icm.properties
修改以下属性:
jcr.textsearch.enabled=
把这个值改成false,直到任务运行完。
当refreshAllItems任务成功运行完毕,您可以重新启用这个设置,再重建文本索引,具体请参考以下步骤:
1. 停止PortalServer
2. 备份 <wp_home>/jcr/search 目录
3. 删除<wp_home>/jcr/search 目录
4. 重启PortalServer

注: 重建索引需要一些时间,取决于需要更新多少文档。

  相关解决方案