Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 95116 invoked from network); 13 Feb 2009 06:43:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Feb 2009 06:43:34 -0000 Received: (qmail 53131 invoked by uid 500); 13 Feb 2009 06:43:33 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 53096 invoked by uid 500); 13 Feb 2009 06:43:33 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 53087 invoked by uid 99); 13 Feb 2009 06:43:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Feb 2009 22:43:32 -0800 X-ASF-Spam-Status: No, hits=3.1 required=10.0 tests=FM_FRM_RN_L_BRACK,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [211.9.41.234] (HELO ns.brainsellers.com) (211.9.41.234) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Feb 2009 06:43:22 +0000 Received: from [127.0.0.1] ([192.168.0.131]) by ns.brainsellers.com (8.11.6/8.11.6) with ESMTP id n1D6gxI28682 for ; Fri, 13 Feb 2009 15:42:59 +0900 Message-ID: <499516A6.2040202@brainsellers.com> Date: Fri, 13 Feb 2009 15:43:50 +0900 From: =?ISO-2022-JP?B?GyRCPi5AbhsoQiAbJEI1Lk01GyhC?= User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: dev@jackrabbit.apache.org Subject: InvalidItemStateException on clustering jackrabbit Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Dear all, I'm a test engeneer in Japan. We deploy jackrabbit-webapp 1.4 for our application to store pdf documents. And I am reserching how to use jackrabbit on clustering servers. In our test on clustering jackrabbit with shared repository on MySQL5.1, An InvalidItemStateException occurs when registering documents simultaneously from 2 nodes. -- >Caused by: javax.jcr.InvalidItemStateException: > cafebabe-cafe-babe-cafe-babecafebabe has been modified externally > at org.apache.jackrabbit.rmi.server.ServerObject.getRepositoryException > (ServerObject.java:104) > at org.apache.jackrabbit.rmi.server.ServerSession.save(ServerSession.java:212) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) -- It seems very serious, but check SQL trace from MySQL, this failed connection issues only some select and gives up. -- > 5 Query SHOW WARNINGS > 5 Query /* mysql-connector-java-5.1.7 ( Revision: ${svn.Revision} ) */SELECT @@session.auto_increment_increment > 5 Query SHOW COLLATION > 5 Query SET character_set_results = NULL > 5 Query SET autocommit=1 > 5 Query select BUNDLE_DATA from PM_WS_BUNDLE where NODE_ID = x'CAFEBABECAFEBABECAFEBABECAFEBABE' > 5 Query select BUNDLE_DATA from PM_WS_BUNDLE where NODE_ID = x'C74FA522295945668895FDDFA07BDEF1' > 5 Query select BUNDLE_DATA from PM_WS_BUNDLE where NODE_ID = x'2F0E18E2B49343CDADE6B6A5A01F74FE' -- So, this connection does nothing harm to the repository, and after a few seconds, same API call succeeds and documents can be stored and read. I have tried transaction-isolation setting at my.ini, then, tried to use Oracle10, but same Exception occurs. Then, this should be jackrabbit problem, I think. I've tried FineGrainedISMLocking of jackrabbit, but nothing changed... It seemes to me that there are many users operating jackrabbit on clustering servers and no one have met this problem. So I think something is wrong with us( =repository.xml)... <<< Please help us. Any suggestion is appreciated. >>> But Yesterday, I found JCR-1940, it is still opened... > (JCR-1940) > Date: Jan 19, 2009 4:41:35 am > Reporter: Richa Khurana > Priority: Blocker > > We have a enabled jackrabbit clustering. In this mode following exception occurswhen 2 users simultaneouly add documents to Jack rabbit repository registeredwith node id 1 and 2 respectively- > > 14:59:55,312 ERROR [DocumentHelper] Exception occurred while adding a manuallyuploaded document to the jackrabbit: > javax.jcr.InvalidItemStateException: cafebabe-cafe-babe-cafe-babecafebabe hasbeen modified externally > at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1109) > at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:846) ...If there is no measure, we have to add some codes to catch this Exception and retry after a few random seconds. But I think it should be the last measure. Thank you for reading long question. ---- Takahiro OGAWA ----an extract from our repository.xml----