db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Zeckoski" <aar...@vt.edu>
Subject Lock failure when attemtpting to create index
Date Fri, 31 Oct 2008 19:02:59 GMT
I cannot seem to get derby to allow me to create indexes on my tables.
I am probably doing something silly so I hope someone can look at this
and will realize what is going wrong here. If I remove the CREATE
INDEX stuff then it all seems to work fine. This is an embedded derby
database so that might be having an effect.
Any ideas?

Here is my DDL:
CREATE TABLE USER_ID_EID (
    ID            INT GENERATED ALWAYS AS IDENTITY NOT NULL PRIMARY KEY,
    USER_ID         VARCHAR(255) NOT NULL,
    USER_EID        VARCHAR(255) NOT NULL,
    CREATED_ON      TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX USER_ID_EID_UID ON USER_ID_EID(USER_ID);
CREATE INDEX USER_ID_EID_UEID ON USER_ID_EID(USER_EID);

Here is the output from derby:
Failed while executing ddl: StatementCallback; SQL [ CREATE INDEX
USER_ID_EID_UID ON USER_ID_EID(USER_ID)]; A lock could not be obtained
within the time requested.  The lockTable dump is:
2008-10-31 19:00:17.766 GMT
XID       |TYPE         |MODE|LOCKCOUNT|LOCKNAME
                                                 |STATE|TABLETYPE /
LOCKOBJ                   |INDEXNAME / CONTAINER_ID / (MODE for LATCH
only)  |TABLENAME / CONGLOM_ID                |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------
*** The following row is the victim ***
357       |ROW          |S   |0        |(2,17)
                                                 |WAIT |S
                       |NULL
   |SYS
TABLES                             |
*** The above row is the victim ***
348       |ROW          |X   |3        |(11,8)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |X   |2        |(1,16)
                                                 |GRANT|S
                       |NULL
   |SYS
KEYS                               |
357       |ROW          |S   |1        |(1,1)
                                                 |GRANT|S
                       |SYSTABLES_INDEX1
   |SYS
TABLES                             |
348       |TABLE        |IX  |2        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
KEYS                               |
348       |ROW          |S   |2        |(1,37)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |S   |2        |(2,8)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |ROW          |S   |2        |(1,38)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |TABLE        |IX  |4        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
CONSTRAINTS                        |
348       |ROW          |S   |2        |(1,12)
                                                 |GRANT|S
                       |NULL
   |SYS
TABLES                             |
348       |TABLE        |IX  |3        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |TABLE        |IS  |4        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |S   |2        |(2,11)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |TABLE        |IX  |8        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |TABLE        |IS  |6        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |ROW          |X   |3        |(2,17)
                                                 |GRANT|S
                       |NULL
   |SYS
TABLES                             |
348       |ROW          |S   |2        |(2,7)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |TABLE        |IX  |3        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
TABLES                             |
348       |TABLE        |IS  |4        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
TABLES                             |
357       |TABLE        |IS  |2        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
TABLES                             |
348       |ROW          |S   |2        |(1,35)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |S   |2        |(2,6)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |ROW          |S   |2        |(1,11)
                                                 |GRANT|S
                       |NULL
   |SYS
TABLES                             |
348       |ROW          |S   |2        |(1,33)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |X   |3        |(11,9)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |X   |1        |(4,40)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |S   |2        |(1,40)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |TABLE        |X   |2        |Tablelock
                                                 |GRANT|T
                       |NULL
   |USE
R_ID_EID                           |
348       |TABLE        |S   |4        |Tablelock
                                                 |GRANT|T
                       |NULL
   |USE
R_ID_EID                           |
348       |ROW          |S   |2        |(1,36)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |X   |4        |(8,6)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |ROW          |S   |2        |(2,9)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |ROW          |X   |4        |(6,23)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |ROW          |S   |2        |(2,10)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |ROW          |S   |6        |(1,18)
                                                 |GRANT|S
                       |NULL
   |SYS
SCHEMAS                            |
357       |ROW          |S   |4        |(1,18)
                                                 |GRANT|S
                       |NULL
   |SYS
SCHEMAS                            |
348       |ROW          |X   |3        |(11,6)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |X   |1        |(1,27)
                                                 |GRANT|S
                       |NULL
   |SYS
TABLES                             |
348       |ROW          |S   |2        |(1,34)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |X   |4        |(1,16)
                                                 |GRANT|S
                       |NULL
   |SYS
CONSTRAINTS                        |
348       |ROW          |S   |2        |(1,39)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |X   |3        |(11,7)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |TABLE        |IS  |6        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
SCHEMAS                            |
357       |TABLE        |IS  |4        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
SCHEMAS                            |
348       |ROW          |S   |2        |(1,32)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |X   |1        |(6,24)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |TABLE        |X   |1        |Tablelock
                                                 |GRANT|T
                       |SQL081031190011840
   |USE
R_ID_EID                           |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------
; nested exception is java.sql.SQLException: A lock could not be
obtained within the time requested.  The lockTable dump is:
2008-10-31 19:00:17.766 GMT
XID       |TYPE         |MODE|LOCKCOUNT|LOCKNAME
                                                 |STATE|TABLETYPE /
LOCKOBJ                   |INDEXNAME / CONTAINER_ID / (MODE for LATCH
only)  |TAB
LENAME / CONGLOM_ID                |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------
*** The following row is the victim ***
357       |ROW          |S   |0        |(2,17)
                                                 |WAIT |S
                       |NULL
   |SYS
TABLES                             |
*** The above row is the victim ***
348       |ROW          |X   |3        |(11,8)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |X   |2        |(1,16)
                                                 |GRANT|S
                       |NULL
   |SYS
KEYS                               |
357       |ROW          |S   |1        |(1,1)
                                                 |GRANT|S
                       |SYSTABLES_INDEX1
   |SYS
TABLES                             |
348       |TABLE        |IX  |2        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
KEYS                               |
348       |ROW          |S   |2        |(1,37)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |S   |2        |(2,8)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |ROW          |S   |2        |(1,38)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |TABLE        |IX  |4        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
CONSTRAINTS                        |
348       |ROW          |S   |2        |(1,12)
                                                 |GRANT|S
                       |NULL
   |SYS
TABLES                             |
348       |TABLE        |IX  |3        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |TABLE        |IS  |4        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |S   |2        |(2,11)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |TABLE        |IX  |8        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |TABLE        |IS  |6        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |ROW          |X   |3        |(2,17)
                                                 |GRANT|S
                       |NULL
   |SYS
TABLES                             |
348       |ROW          |S   |2        |(2,7)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |TABLE        |IX  |3        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
TABLES                             |
348       |TABLE        |IS  |4        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
TABLES                             |
357       |TABLE        |IS  |2        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
TABLES                             |
348       |ROW          |S   |2        |(1,35)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |S   |2        |(2,6)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |ROW          |S   |2        |(1,11)
                                                 |GRANT|S
                       |NULL
   |SYS
TABLES                             |
348       |ROW          |S   |2        |(1,33)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |X   |3        |(11,9)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |X   |1        |(4,40)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |S   |2        |(1,40)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |TABLE        |X   |2        |Tablelock
                                                 |GRANT|T
                       |NULL
   |USE
R_ID_EID                           |
348       |TABLE        |S   |4        |Tablelock
                                                 |GRANT|T
                       |NULL
   |USE
R_ID_EID                           |
348       |ROW          |S   |2        |(1,36)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |X   |4        |(8,6)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |ROW          |S   |2        |(2,9)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |ROW          |X   |4        |(6,23)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |ROW          |S   |2        |(2,10)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |ROW          |S   |6        |(1,18)
                                                 |GRANT|S
                       |NULL
   |SYS
SCHEMAS                            |
357       |ROW          |S   |4        |(1,18)
                                                 |GRANT|S
                       |NULL
   |SYS
SCHEMAS                            |
348       |ROW          |X   |3        |(11,6)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |X   |1        |(1,27)
                                                 |GRANT|S
                       |NULL
   |SYS
TABLES                             |
348       |ROW          |S   |2        |(1,34)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |X   |4        |(1,16)
                                                 |GRANT|S
                       |NULL
   |SYS
CONSTRAINTS                        |
348       |ROW          |S   |2        |(1,39)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |X   |3        |(11,7)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |TABLE        |IS  |6        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
SCHEMAS                            |
357       |TABLE        |IS  |4        |Tablelock
                                                 |GRANT|S
                       |NULL
   |SYS
SCHEMAS                            |
348       |ROW          |S   |2        |(1,32)
                                                 |GRANT|S
                       |NULL
   |SYS
COLUMNS                            |
348       |ROW          |X   |1        |(6,24)
                                                 |GRANT|S
                       |NULL
   |SYS
CONGLOMERATES                      |
348       |TABLE        |X   |1        |Tablelock
                                                 |GRANT|T
                       |SQL081031190011840
   |USE
R_ID_EID                           |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------
  [2008-10-31 19:00:18,087] (DSpaceServiceManager.java:251)


-- 
Aaron Zeckoski (aaronz@vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

Mime
View raw message