Error message is quite typical for cases where there is library incompatibility: your version of H2 was compiled using Lucene version different than what you have deployed. Usually your deployed version is older than what is needed, but could be other way around too. Sometimes it's caused by having multiple copies of library jar, and wrong version being chosen (choice of which one to use often being arbitrary).
-+ Tatu +- On Fri, Dec 25, 2009 at 11:49 PM, jeho <[email protected]> wrote: > I got the following message.I tried to find what is the problem.But no > error found > I was trying to create an Index for the table in a database already > exists.. > Can any body help? > > Exception in thread "Thread-3" java.lang.NoSuchMethodError: > org.apache.lucene.index.IndexReader.indexExists(Ljava/lang/String;)Z > at org.h2.fulltext.FullTextLucene.getIndexModifier > (FullTextLucene.java:261) > at org.h2.fulltext.FullTextLucene.init(FullTextLucene.java: > 102) > at database.database.createIndex(database.java:37) > > public void createIndex(String tbname) > { > try{ > loadDriver(); > Connection conn = null; > > > Properties props = new Properties(); > > > props.put("user", "user1"); > props.put("password", "user1"); > conn = DriverManager.getConnection(protocol + "database" > + ";create=true", props); > > conn.setAutoCommit(false); > org.h2.fulltext.FullTextLucene.init(conn); > org.h2.fulltext.FullTextLucene.createIndex > (conn,"public",tbname.toUpperCase(),null); > > System.out.println("success"); > > conn.commit(); > } > catch (SQLException sqle){ > printSQLException(sqle);} > } > > -- > > 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. > > > -- 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.
