4 Replies Latest reply on Dec 9, 2013 12:59 PM by Deepak Angeswar

    deadlock while using modshape with MS SQLServer

    Deepak Angeswar Newbie

      All,

       

      I am using modeshape-jcr, version :2.7.0

       

      My application works fine with Oracle.

      But with SQL Server I am getting a Deadlock exception when I try to upload data to the JCR repository (and persisting to the SQL Server).

      I am using the jtds-1.2.jar for the JDBC connectivity.

       

      Exception I see is

      javax.persistence.PersistenceException: org.hibernate.exception.LockAcquisitionException: could not execute update query

        at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)

        at org.hibernate.ejb.QueryImpl.executeUpdate(QueryImpl.java:60)


      (1) I noticed the following points:

      In table: MODESHAPE_LARGEVALUE_USAGES

      Column ID is primary key and is also a join of the 2 tables "MODE_SIMPLE_NODE" and "MODE_SIMPLE_LARGE_VALUES"

      i.e. there appears to a many to many relationshiop between SimpleNode of LargeValue entities.

      As per: http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.modeshape/modeshape-connector-store-jpa/2.7.0.Final/org/modeshape/connector/store/jpa/model/simple/NodeEntity.java?av=f


      Following are the SQL Scripts to create the Table:


      --------------------------------------------------------

      --  DDL for Table MODESHAPE_LARGEVALUE_USAGES

      --------------------------------------------------------

      CREATE TABLE "MODESHAPE_LARGEVALUE_USAGES"

         ("ID" numeric(19,0) NOT NULL,

          "LARGEVALUES_SHA1" VARCHAR(40) NOT NULL,

         ) ;

       

      ALTER TABLE "MODESHAPE_LARGEVALUE_USAGES" ADD PRIMARY KEY ("ID", "LARGEVALUES_SHA1");

       

      --  CREATE INDEX

      CREATE INDEX IDX_MODELVALUEUSAGES_SHA1 ON MODESHAPE_LARGEVALUE_USAGES (LARGEVALUES_SHA1);

       

       


      Can some one point out how to fix this issue?

       

      regards

      D


        • 1. Re: deadlock while using modshape with MS SQLServer
          Randall Hauch Master

          Can you share the Oracle DDL scripts you tried?

          • 2. Re: deadlock while using modshape with MS SQLServer
            Deepak Angeswar Newbie

            Hi,

             

            Following are the Oracle DDL Scripts

             

            --------------------------------------------------------
            --  DDL for Table DNA_NAMESPACES
            --------------------------------------------------------
            CREATE TABLE "DNA_NAMESPACES"
               ("ID" NUMBER(19,0),
              "URI" VARCHAR2(512 CHAR)
               ) ;
            
            ALTER TABLE "DNA_NAMESPACES" MODIFY ("ID" NOT NULL ENABLE);
            
            ALTER TABLE "DNA_NAMESPACES" ADD PRIMARY KEY ("ID") ENABLE;
            
            
            --------------------------------------------------------
            --  DDL for Table DNA_WORKSPACES
            --------------------------------------------------------
            CREATE TABLE "DNA_WORKSPACES"
               ("ID" NUMBER(19,0),
              "NAME" VARCHAR2(128 CHAR)
               ) ;
            ALTER TABLE "DNA_WORKSPACES" MODIFY ("ID" NOT NULL ENABLE);
            
            ALTER TABLE "DNA_WORKSPACES" MODIFY ("NAME" NOT NULL ENABLE);
            
            ALTER TABLE "DNA_WORKSPACES" ADD PRIMARY KEY ("ID") ENABLE;
            
            --------------------------------------------------------
            --  DDL for Table MODESHAPE_LARGEVALUE_USAGES
            --------------------------------------------------------
            CREATE TABLE "MODESHAPE_LARGEVALUE_USAGES"
               ("ID" NUMBER(19,0),
              "LARGEVALUES_SHA1" VARCHAR2(40 CHAR)
               ) ;
              
            ALTER TABLE "MODESHAPE_LARGEVALUE_USAGES" MODIFY ("ID" NOT NULL ENABLE);
            
            ALTER TABLE "MODESHAPE_LARGEVALUE_USAGES" MODIFY ("LARGEVALUES_SHA1" NOT NULL ENABLE);
            
            ALTER TABLE "MODESHAPE_LARGEVALUE_USAGES" ADD PRIMARY KEY ("ID", "LARGEVALUES_SHA1") ENABLE;
            
            --  CREATE INDEX
            CREATE INDEX IDX_MODELVALUEUSAGES_SHA1 ON MODESHAPE_LARGEVALUE_USAGES (LARGEVALUES_SHA1);
            
            --------------------------------------------------------
            --  DDL for Table MODE_OPTIONS
            --------------------------------------------------------
            CREATE TABLE "MODE_OPTIONS"
               ("NAME" VARCHAR2(128 CHAR),
              "VALUE" VARCHAR2(512 CHAR)
               ) ;
            
            ALTER TABLE "MODE_OPTIONS" MODIFY ("NAME" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_OPTIONS" MODIFY ("VALUE" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_OPTIONS" ADD PRIMARY KEY ("NAME") ENABLE;
            
            --------------------------------------------------------
            --  DDL for Table MODE_SIMPLE_LARGE_VALUES
            --------------------------------------------------------
            CREATE TABLE "MODE_SIMPLE_LARGE_VALUES"
               ("SHA1" VARCHAR2(40 CHAR),
              "COMPRESSED" NUMBER(1,0),
              "DATA" BLOB,
              "LENGTH" NUMBER(19,0),
              "TYPE" VARCHAR2(255 CHAR)
               ) ;
            
            ALTER TABLE "MODE_SIMPLE_LARGE_VALUES" MODIFY ("SHA1" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SIMPLE_LARGE_VALUES" MODIFY ("DATA" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SIMPLE_LARGE_VALUES" MODIFY ("LENGTH" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SIMPLE_LARGE_VALUES" MODIFY ("TYPE" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SIMPLE_LARGE_VALUES" ADD PRIMARY KEY ("SHA1") ENABLE;
            
            --------------------------------------------------------
            --  DDL for Table MODE_SIMPLE_NODE
            --------------------------------------------------------
            CREATE TABLE "MODE_SIMPLE_NODE"
               ("ID" NUMBER(19,0),
              "ALLOWS_SNS" NUMBER(1,0),
              "CHILD_NAME_LOCAL" VARCHAR2(512 CHAR),
              "COMPRESSED" NUMBER(1,0),
              "DATA" BLOB,
              "CHILD_INDEX" NUMBER(10,0),
              "NODE_UUID" VARCHAR2(36 CHAR),
              "NUM_PROPS" NUMBER(10,0),
              "ENFORCEREFINTEG" NUMBER(1,0),
              "SNS_INDEX" NUMBER(10,0),
              "WORKSPACE_ID" NUMBER(19,0),
              "CHILD_NAME_NS_ID" NUMBER(19,0),
              "PARENT_ID" NUMBER(19,0)
               ) ;
              
            ALTER TABLE "MODE_SIMPLE_NODE" MODIFY ("ID" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SIMPLE_NODE" MODIFY ("ALLOWS_SNS" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SIMPLE_NODE" MODIFY ("CHILD_INDEX" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SIMPLE_NODE" MODIFY ("NODE_UUID" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SIMPLE_NODE" MODIFY ("NUM_PROPS" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SIMPLE_NODE" MODIFY ("ENFORCEREFINTEG" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SIMPLE_NODE" MODIFY ("SNS_INDEX" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SIMPLE_NODE" MODIFY ("WORKSPACE_ID" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SIMPLE_NODE" ADD PRIMARY KEY ("ID") ENABLE;
            
            -- CREATE INDEX
            CREATE INDEX IDX_MODESIMPLENODE_CHILDNSID ON MODE_SIMPLE_NODE (CHILD_NAME_NS_ID);
            CREATE INDEX IDX_MODESIMPLENODE_PARENTEID ON MODE_SIMPLE_NODE (PARENT_ID);
            
            --------------------------------------------------------
            --  DDL for Table MODE_SUBGRAPH_NODES
            --------------------------------------------------------
            CREATE TABLE "MODE_SUBGRAPH_NODES"
               ("ID" NUMBER(19,0),
              "DEPTH" NUMBER(10,0),
              "CHILD_NUM" NUMBER(10,0),
              "UUID" VARCHAR2(36 CHAR),
              "PARENT_NUM" NUMBER(10,0),
              "QUERY_ID" NUMBER(19,0)
               ) ;
            ALTER TABLE "MODE_SUBGRAPH_NODES" MODIFY ("ID" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SUBGRAPH_NODES" MODIFY ("DEPTH" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SUBGRAPH_NODES" MODIFY ("CHILD_NUM" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SUBGRAPH_NODES" MODIFY ("UUID" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SUBGRAPH_NODES" MODIFY ("PARENT_NUM" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SUBGRAPH_NODES" MODIFY ("QUERY_ID" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SUBGRAPH_NODES" ADD PRIMARY KEY ("ID") ENABLE;
            
            --------------------------------------------------------
            --  DDL for Table MODE_SUBGRAPH_QUERIES
            --------------------------------------------------------
            CREATE TABLE "MODE_SUBGRAPH_QUERIES"
               ("ID" NUMBER(19,0),
              "ROOT_UUID" VARCHAR2(36 CHAR),
              "WORKSPACE_ID" NUMBER(19,0)
               ) ;
            
            ALTER TABLE "MODE_SUBGRAPH_QUERIES" MODIFY ("ID" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SUBGRAPH_QUERIES" MODIFY ("ROOT_UUID" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SUBGRAPH_QUERIES" MODIFY ("WORKSPACE_ID" NOT NULL ENABLE);
            
            ALTER TABLE "MODE_SUBGRAPH_QUERIES" ADD PRIMARY KEY ("ID") ENABLE;
            
            
            --------------------------------------------------------
            --  DDL for Index NS_URI_INX
            --------------------------------------------------------
            CREATE INDEX "NS_URI_INX" ON "DNA_NAMESPACES" ("URI");
            
            --------------------------------------------------------
            --  DDL for Index CHILDINDEX_INX
            --------------------------------------------------------
            CREATE INDEX "CHILDINDEX_INX" ON "MODE_SIMPLE_NODE" ("WORKSPACE_ID", "PARENT_ID", "CHILD_INDEX");
            
            --------------------------------------------------------
            --  DDL for Index CHILDNAME_INX
            --------------------------------------------------------
            CREATE INDEX "CHILDNAME_INX" ON "MODE_SIMPLE_NODE" ("WORKSPACE_ID", "PARENT_ID", "CHILD_NAME_NS_ID", "CHILD_NAME_LOCAL", "SNS_INDEX");
            
            --------------------------------------------------------
            --  DDL for Index QUERYID_INX
            --------------------------------------------------------
            CREATE INDEX "QUERYID_INX" ON "MODE_SUBGRAPH_NODES" ("QUERY_ID", "UUID", "DEPTH");
            
            --------------------------------------------------------
            --  DDL for Index NODEUUID_INX
            --------------------------------------------------------
            CREATE INDEX "NODEUUID_INX" ON "MODE_SIMPLE_NODE" ("WORKSPACE_ID", "NODE_UUID");
            
            --------------------------------------------------------
            --  DDL for Index WS_NAME_INX
            --------------------------------------------------------
            CREATE INDEX "WS_NAME_INX" ON "DNA_WORKSPACES" ("NAME");
            
            ALTER TABLE "MODESHAPE_LARGEVALUE_USAGES" ADD CONSTRAINT "FK4B54E5DA1B6FBC1C" FOREIGN KEY ("LARGEVALUES_SHA1")
              REFERENCES "MODE_SIMPLE_LARGE_VALUES" ("SHA1") ENABLE;
            
            ALTER TABLE "MODESHAPE_LARGEVALUE_USAGES" ADD CONSTRAINT "FK4B54E5DAE58CEC5C" FOREIGN KEY ("ID")
              REFERENCES "MODE_SIMPLE_NODE" ("ID") ENABLE;
            --------------------------------------------------------
            --  Ref Constraints for Table MODE_SIMPLE_NODE
            --------------------------------------------------------
            
            ALTER TABLE "MODE_SIMPLE_NODE" ADD CONSTRAINT "FKE43E2BD346EF783F" FOREIGN KEY ("CHILD_NAME_NS_ID")
              REFERENCES "DNA_NAMESPACES" ("ID") ENABLE;
            
            ALTER TABLE "MODE_SIMPLE_NODE" ADD CONSTRAINT "FKE43E2BD360F39011" FOREIGN KEY ("PARENT_ID")
              REFERENCES "MODE_SIMPLE_NODE" ("ID") ENABLE;  
            

            Following are SQL Serevr DDL Scripts

             

            --------------------------------------------------------
            --  DDL for Table DNA_NAMESPACES
            --------------------------------------------------------
            CREATE TABLE "DNA_NAMESPACES" (
               "ID" numeric(19,0) identity(1,1) NOT NULL,
               "URI" VARCHAR(512) NULL,
               ) ;
            
            ALTER TABLE "DNA_NAMESPACES" ADD PRIMARY KEY ("ID");
            
            
            --------------------------------------------------------
            --  DDL for Table DNA_WORKSPACES
            --------------------------------------------------------
            CREATE TABLE "DNA_WORKSPACES"
               ("ID" numeric(19,0) identity(1,1) NOT NULL,
               "NAME" VARCHAR(128) NOT NULL,
               ) ;
            
            ALTER TABLE "DNA_WORKSPACES" ADD PRIMARY KEY ("ID");
            
            --------------------------------------------------------
            --  DDL for Table MODESHAPE_LARGEVALUE_USAGES
            --------------------------------------------------------
            CREATE TABLE "MODESHAPE_LARGEVALUE_USAGES"
               ("ID" numeric(19,0) NOT NULL,
                "LARGEVALUES_SHA1" VARCHAR(40) NOT NULL,
               ) ;
            
            ALTER TABLE "MODESHAPE_LARGEVALUE_USAGES" ADD PRIMARY KEY ("ID", "LARGEVALUES_SHA1");
            
            --  CREATE INDEX
            CREATE INDEX IDX_MODELVALUEUSAGES_SHA1 ON MODESHAPE_LARGEVALUE_USAGES (LARGEVALUES_SHA1);
            
            --------------------------------------------------------
            --  DDL for Table MODE_OPTIONS
            --------------------------------------------------------
            CREATE TABLE "MODE_OPTIONS"
               ("NAME" VARCHAR(128) NOT NULL,
              "VALUE" VARCHAR(512) NOT NULL,
               ) ;
            
            ALTER TABLE "MODE_OPTIONS" ADD PRIMARY KEY ("NAME") ;
            
            --------------------------------------------------------
            --  DDL for Table MODE_SIMPLE_LARGE_VALUES
            --------------------------------------------------------
            CREATE TABLE "MODE_SIMPLE_LARGE_VALUES"
               ("SHA1" VARCHAR(40 ) NOT NULL,
              "COMPRESSED" tinyint NULL,
              "DATA" image NOT NULL,
              "LENGTH" numeric(19,0) NOT NULL,
              "TYPE" VARCHAR(255) NOT NULL,
               ) ;
            
            ALTER TABLE "MODE_SIMPLE_LARGE_VALUES" ADD PRIMARY KEY ("SHA1");
            
            --------------------------------------------------------
            --  DDL for Table MODE_SIMPLE_NODE
            --------------------------------------------------------
            CREATE TABLE "MODE_SIMPLE_NODE"
               ("ID" numeric(19,0)  identity(1,1) NOT NULL,
              "ALLOWS_SNS" tinyint NOT NULL,
              "CHILD_NAME_LOCAL" VARCHAR(512) NULL,
              "COMPRESSED" tinyint NULL,
              "DATA" image NULL,
              "CHILD_INDEX" int NOT NULL,
              "NODE_UUID" VARCHAR(36) NOT NULL,
              "NUM_PROPS" int NOT NULL,
              "ENFORCEREFINTEG" tinyint NOT NULL,
              "SNS_INDEX" int NOT NULL,
              "WORKSPACE_ID" numeric(19,0) NOT NULL,
              "CHILD_NAME_NS_ID" numeric(19,0) NULL,
              "PARENT_ID" numeric(19,0) NULL,
               ) ;
            
            ALTER TABLE "MODE_SIMPLE_NODE" ADD PRIMARY KEY ("ID");
            
            -- CREATE INDEX
            CREATE INDEX IDX_MODESIMPLENODE_CHILDNSID ON MODE_SIMPLE_NODE (CHILD_NAME_NS_ID);
            CREATE INDEX IDX_MODESIMPLENODE_PARENTEID ON MODE_SIMPLE_NODE (PARENT_ID);
            
            --------------------------------------------------------
            --  DDL for Table MODE_SUBGRAPH_NODES
            --------------------------------------------------------
            CREATE TABLE "MODE_SUBGRAPH_NODES"
               ("ID" numeric(19,0)  identity(1,1) NOT NULL,
              "DEPTH" int NOT NULL,
              "CHILD_NUM" int NOT NULL,
              "UUID" VARCHAR(36) NOT NULL,
              "PARENT_NUM" int NOT NULL,
              "QUERY_ID" numeric(19,0) NOT NULL,
               ) ;
            
            ALTER TABLE "MODE_SUBGRAPH_NODES" ADD PRIMARY KEY ("ID");
            
            --------------------------------------------------------
            --  DDL for Table MODE_SUBGRAPH_QUERIES
            --------------------------------------------------------
            CREATE TABLE "MODE_SUBGRAPH_QUERIES"
               ("ID" numeric(19,0) identity(1,1) NOT NULL,
              "ROOT_UUID" VARCHAR(36) NOT NULL,
              "WORKSPACE_ID" numeric(19,0) NOT NULL,
               ) ;
            
            ALTER TABLE "MODE_SUBGRAPH_QUERIES" ADD PRIMARY KEY ("ID");
              
            --------------------------------------------------------
            --  DDL for Index NS_URI_INX
            --------------------------------------------------------
            CREATE INDEX "NS_URI_INX" ON "DNA_NAMESPACES" ("URI");
            
            --------------------------------------------------------
            --  DDL for Index CHILDINDEX_INX
            --------------------------------------------------------
            CREATE INDEX "CHILDINDEX_INX" ON "MODE_SIMPLE_NODE" ("WORKSPACE_ID", "PARENT_ID", "CHILD_INDEX");
            
            --------------------------------------------------------
            --  DDL for Index CHILDNAME_INX
            --------------------------------------------------------
            CREATE INDEX "CHILDNAME_INX" ON "MODE_SIMPLE_NODE" ("WORKSPACE_ID", "PARENT_ID", "CHILD_NAME_NS_ID", "CHILD_NAME_LOCAL", "SNS_INDEX");
            
            --------------------------------------------------------
            --  DDL for Index QUERYID_INX
            --------------------------------------------------------
            CREATE INDEX "QUERYID_INX" ON "MODE_SUBGRAPH_NODES" ("QUERY_ID", "UUID", "DEPTH");
            
            --------------------------------------------------------
            --  DDL for Index NODEUUID_INX
            --------------------------------------------------------
            CREATE INDEX "NODEUUID_INX" ON "MODE_SIMPLE_NODE" ("WORKSPACE_ID", "NODE_UUID");
            
            --------------------------------------------------------
            --  DDL for Index WS_NAME_INX
            --------------------------------------------------------
            CREATE INDEX "WS_NAME_INX" ON "DNA_WORKSPACES" ("NAME");
            
            ALTER TABLE "MODESHAPE_LARGEVALUE_USAGES" ADD CONSTRAINT "FK4B54E5DA1B6FBC1C" FOREIGN KEY ("LARGEVALUES_SHA1")
              REFERENCES "MODE_SIMPLE_LARGE_VALUES" ("SHA1");
            
            ALTER TABLE "MODESHAPE_LARGEVALUE_USAGES" ADD CONSTRAINT "FK4B54E5DAE58CEC5C" FOREIGN KEY ("ID")
              REFERENCES "MODE_SIMPLE_NODE" ("ID");
            --------------------------------------------------------
            --  Ref Constraints for Table MODE_SIMPLE_NODE
            --------------------------------------------------------
            
            ALTER TABLE "MODE_SIMPLE_NODE" ADD CONSTRAINT "FKE43E2BD346EF783F" FOREIGN KEY ("CHILD_NAME_NS_ID")
              REFERENCES "DNA_NAMESPACES" ("ID");
            
            ALTER TABLE "MODE_SIMPLE_NODE" ADD CONSTRAINT "FKE43E2BD360F39011" FOREIGN KEY ("PARENT_ID")
              REFERENCES "MODE_SIMPLE_NODE" ("ID");  
            
            • 3. Re: deadlock while using modshape with MS SQLServer
              Randall Hauch Master

              Thanks for the DDL. There doesn't appear to be any differences. From what I've found online, the LockAcquisitionException from Hibernate appears to be exhibit this problem with some environments that use SQLServer, and signals that multiple connections are competing for a lock and at least one eventually times out. Some people have suggested a workaround (with apps that don't use ModeShape) is to use SQLServer's snapshot isolation level, though I've never used that myself.

               

              When you say that you're getting this when uploading data, is that process uploading lots of data? Are you using a single session or multiple sessions? Does the error happen in a consistent spot, or does it vary? What are the stack traces (specifically that involve the ModeShape and Hibernate codebase)?

               

              (Also, to be honest, we've not issued any ModeShape 2.x releases for about 2 years, since we've all switched to the 3.x codebase and will soon be switching to 4.0.)

              • 4. Re: deadlock while using modshape with MS SQLServer
                Deepak Angeswar Newbie

                Hi,

                 

                Thanks for the reply.

                The process does upload lots of data but its a single process with one session - which is why its confusing for me on how a deadlock can occur.

                 

                The error seems to be quite consistent. I have attached a snippet of the log. It happens right after an insert into MODE_SUBGRAPH_NODES and before a delete from the same table.

                 

                 

                2013-12-09 15:10:12,738 INFO  [STDOUT] (pool-8-thread-1) Hibernate:

                    /* insert org.modeshape.connector.store.jpa.model.simple.SubgraphNodeEntity

                        */ insert

                        into

                            MODE_SUBGRAPH_NODES

                            (DEPTH, CHILD_NUM, UUID, PARENT_NUM, QUERY_ID)

                        values

                            (?, ?, ?, ?, ?)

                 

                 

                2013-12-09 15:10:12,749 INFO  [STDOUT] (pool-8-thread-1) Hibernate:

                    insert

                    into

                        MODE_SUBGRAPH_NODES

                        ( QUERY_ID, UUID, DEPTH, PARENT_NUM, CHILD_NUM ) select

                            subgraphno1_.QUERY_ID as col_0_0_,

                            nodeentity0_.NODE_UUID as col_1_0_,

                            subgraphno1_.DEPTH+1 as col_2_0_,

                            subgraphno1_.CHILD_NUM as col_3_0_,

                            nodeentity0_.CHILD_INDEX as col_4_0_

                        from

                            MODE_SIMPLE_NODE nodeentity0_,

                            MODE_SUBGRAPH_NODES subgraphno1_,

                            MODE_SIMPLE_NODE nodeentity2_

                        where

                            nodeentity0_.PARENT_ID=nodeentity2_.ID

                            and nodeentity0_.WORKSPACE_ID=?

                            and nodeentity2_.NODE_UUID=subgraphno1_.UUID

                            and subgraphno1_.QUERY_ID=?

                            and subgraphno1_.DEPTH=?

                2013-12-09 15:10:16,233 WARN  [org.hibernate.util.JDBCExceptionReporter] (pool-8-thread-1) SQL Error: 1205, SQLState: 40001

                2013-12-09 15:10:16,234 ERROR [org.hibernate.util.JDBCExceptionReporter] (pool-8-thread-1) Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

                2013-12-09 15:10:16,235 INFO  [STDOUT] (pool-8-thread-1) Hibernate:

                    delete

                    from

                        MODE_SUBGRAPH_NODES

                    where

                        QUERY_ID=?

                 

                2013-12-09 15:10:16,238 ERROR [org.modeshape.repository.ModeShapeEngine] (pool-8-thread-1) Error while cleaning up locks for JCR repository "store"

                javax.persistence.PersistenceException: org.hibernate.exception.LockAcquisitionException: could not execute update query

                  at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)

                  at org.hibernate.ejb.QueryImpl.executeUpdate(QueryImpl.java:60)

                  at org.modeshape.connector.store.jpa.model.simple.SubgraphQuery.create(SubgraphQuery.java:86)

                  at org.modeshape.connector.store.jpa.model.simple.SimpleJpaRepository$Workspace.getBranch(SimpleJpaRepository.java:502)

                  at org.modeshape.connector.store.jpa.model.simple.SimpleRequestProcessor.process(SimpleRequestProcessor.java:63)

                  at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:291)

                  at org.modeshape.connector.store.jpa.model.simple.SimpleJpaConnection.execute(SimpleJpaConnection.java:133)

                  at org.modeshape.graph.connector.RepositoryConnectionPool$ConnectionWrapper.execute(RepositoryConnectionPool.java:1124)

                  at org.modeshape.graph.Graph.execute(Graph.java:288)

                  at org.modeshape.graph.Graph$5.process(Graph.java:231)

                  at org.modeshape.graph.request.RequestBuilder.readBranch(RequestBuilder.java:214)

                  at org.modeshape.graph.Graph$27.at(Graph.java:2557)

                  at org.modeshape.graph.Graph$27.at(Graph.java:2565)

                  at org.modeshape.graph.Graph$27.at(Graph.java:2555)

                  at org.modeshape.jcr.RepositoryLockManager.cleanUpLocks(RepositoryLockManager.java:113)

                  at org.modeshape.jcr.JcrEngine$JcrRepositoryHolder.cleanUpLocks(JcrEngine.java:865)

                  at org.modeshape.jcr.JcrEngine.cleanUpLocks(JcrEngine.java:141)

                  at org.modeshape.jcr.JcrEngine$1.run(JcrEngine.java:229)

                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)

                  at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)

                  at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                  at java.lang.Thread.run(Thread.java:662)

                Caused by: org.hibernate.exception.LockAcquisitionException: could not execute update query

                  at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:105)

                  at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)

                  at org.hibernate.hql.ast.exec.BasicExecutor.execute(BasicExecutor.java:107)

                  at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:419)

                  at org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:283)

                  at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:1168)

                  at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:117)

                  at org.hibernate.ejb.QueryImpl.executeUpdate(QueryImpl.java:51)

                  ... 25 more

                Caused by: java.sql.SQLException: Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

                  at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365)

                  at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)

                  at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)

                  at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)

                  at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:525)

                  at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:487)

                  at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:421)

                  at net.sourceforge.jtds.jdbcx.proxy.PreparedStatementProxy.executeUpdate(PreparedStatementProxy.java:75)

                  at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:365)

                  at org.hibernate.hql.ast.exec.BasicExecutor.execute(BasicExecutor.java:98)

                  ... 30 more

                 

                 

                2013-12-09 15:10:42,656 INFO  [STDOUT] (pool-8-thread-1) Hibernate:

                    /* named HQL query WorkspaceEntity.findByName */ select

                        top 2 workspacee0_.id as id2_,

                        workspacee0_.NAME as NAME2_

                    from

                        DNA_WORKSPACES workspacee0_

                    where

                        workspacee0_.NAME=?

                 

                 

                2013-12-09 15:10:42,660 INFO  [STDOUT] (pool-8-thread-1) Hibernate:

                    /* named HQL query WorkspaceEntity.findByName */ select

                        top 2 workspacee0_.id as id2_,

                        workspacee0_.NAME as NAME2_

                    from

                        DNA_WORKSPACES workspacee0_

                    where

                        workspacee0_.NAME=?

                 

                 

                Is there way I can attach the log file for your peruse?