Hi, > it is still bad if I use LOCK_MODE=0 for this?
It is a potential problem, so I wouldn't use it unless it is really necessary (due to performance problems). See the FAQ. Regards, Thomas On Thu, Oct 18, 2012 at 9:22 AM, kais haddadin <[email protected]>wrote: > Hi, > > Thanks for the quick response. I will upgrade the database as suggested. > Using LOCK_MODE=0 should be faster though than the other Modes,right? that > is why am using it. In my use case, table locking is done in the program > directly. > > Do you think, it is still bad if I use LOCK_MODE=0 for this? > > Thanks, > > Kais > > On Wednesday, October 17, 2012 8:06:43 PM UTC+2, Thomas Mueller wrote: > >> Hi, >> >> The database was created with H2 version 1.3.158 (the CREATE_BUILD is >> 158). There was a known bug in this version, which was fixed in >> version 1.3.166 (2012-04-08), see also the change log. Possibly this was >> the reason for the problem, but I'm not sure. This problem could also be >> related to the usage of SET LOCK_MODE 0 (see the FAQ), or class loader >> issues listed in the .trace.db file (for example ClassNotFoundException: >> org.h2.store.PageStreamTrunk$**Iterator when closing the database). >> >> I suggest to upgrade to version 1.3.166 or newer, and not use LOCK_MODE 0 >> if possible (you need to explicitly set it to 3 to use the default setting). >> >> To recover / migrate the existing data, you can use the Recover tool (see >> the docs). >> >> Regards, >> Thomas >> >> >> >> >> On Wed, Oct 17, 2012 at 12:09 PM, kais haddadin <[email protected]>wrote: >> >>> I noticed that running a select statment only works when it is limited >>> to a number, There are some corropted records, >>> >>> SELECT count(*) FROM BIKER_ETL.ORDERS2 where "#id"<'70212' //this works >>> >>> SELECT count(*) FROM BIKER_ETL.ORDERS2 where "#id"<'70213' //this gives >>> an error >>> >>> >>> >>> On Wednesday, October 17, 2012 10:46:29 AM UTC+2, kais haddadin wrote: >>>> >>>> Hello! >>>> >>>> I am trying to run a simple delete on a table. This error comes up: >>>> >>>> Allgemeiner Fehler: "java.lang.**ArrayIndexOutOfBoun**dsException**" >>>> General error: "java.lang.**ArrayIndexOutOfBoun**dsException**"; SQL >>>> statement: >>>> delete from "BIKER_ETL"."ORDERS2" >>>> [50000-169]<http://192.168.2.89:8082/query.do?jsessionid=f1beeeb39e09125c1e98283c70fef629#>HY000/50000 >>>> (Hilfe)<http://h2database.com/javadoc/org/h2/constant/ErrorCode.html#c50000> >>>> org.h2.jdbc.JdbcSQLException: Allgemeiner Fehler: "java.lang.** >>>> ArrayIndexOutOfBoun**dsException**" >>>> General error: "java.lang.**ArrayIndexOutOfBoun**dsException**"; SQL >>>> statement: >>>> delete from "BIKER_ETL"."ORDERS2" [50000-169] >>>> at org.h2.message.DbException.**get**JdbcSQLException(** >>>> DbException.**java:329<http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=329&build=169>) >>>> >>>> at >>>> org.h2.message.DbException.**get**(DbException.java:158<http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=158&build=169>) >>>> >>>> at >>>> org.h2.message.DbException.**con**vert(DbException.java:281<http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=281&build=169>) >>>> >>>> at >>>> org.h2.command.Command.**execute**Update(Command.java:234<http://h2database.com/html/source.html?file=org/h2/command/Command.java&line=234&build=169> >>>> **) >>>> at org.h2.jdbc.JdbcStatement.**exec**uteInternal(JdbcStatement.** >>>> java**:177<http://h2database.com/html/source.html?file=org/h2/jdbc/JdbcStatement.java&line=177&build=169>) >>>> >>>> at >>>> org.h2.jdbc.JdbcStatement.**exec**ute(JdbcStatement.java:152<http://h2database.com/html/source.html?file=org/h2/jdbc/JdbcStatement.java&line=152&build=169> >>>> **) >>>> at >>>> org.h2.server.web.WebApp.**getRe**sult(WebApp.java:1311<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=1311&build=169>) >>>> >>>> at >>>> org.h2.server.web.WebApp.**query**(WebApp.java:1001<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=1001&build=169>) >>>> >>>> at >>>> org.h2.server.web.WebApp$1.**nex**t(WebApp.java:964<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=964&build=169>) >>>> >>>> at >>>> org.h2.server.web.WebApp$1.**nex**t(WebApp.java:953<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=953&build=169>) >>>> >>>> at >>>> org.h2.server.web.WebThread.**pr**ocess(WebThread.java:166<http://h2database.com/html/source.html?file=org/h2/server/web/WebThread.java&line=166&build=169>) >>>> >>>> at >>>> org.h2.server.web.WebThread.**ru**n(WebThread.java:93<http://h2database.com/html/source.html?file=org/h2/server/web/WebThread.java&line=93&build=169>) >>>> >>>> at java.lang.Thread.run(Unknown Source) >>>> Caused by: java.lang.**ArrayIndexOutOfBound**sException >>>> >>>> I can not make any query after that. Then I disconnect,connect again, >>>> run the simple select query, and it works. Delete does not work though. >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "H2 Database" group. >>> To view this discussion on the web visit https://groups.google.com/d/** >>> msg/h2-database/-/lpoP8VGlrl4J<https://groups.google.com/d/msg/h2-database/-/lpoP8VGlrl4J> >>> **. >>> >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to h2-database...@** >>> googlegroups.com. >>> >>> For more options, visit this group at http://groups.google.com/** >>> group/h2-database?hl=en<http://groups.google.com/group/h2-database?hl=en> >>> . >>> >> >> -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
