[Topic] Error With 8d

Hello,

After ugrading from 8b to 8d saving issues take forever, and I am getting a lot of the following errors on the console:

org.apache.lucene.store.jdbc.JdbcStoreException: Failed to execute sql [insert into lucene_index (name_, value_, size_, lf_, deleted_) values ( ?, ?, ?, current_timestamp, ? )]; nested exception is com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '_d4.tmp' for key 1
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '_d4.tmp' for key 1

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665) at com.mysql.jdbc.Connection.execSQL(Connection.java:3176) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1153)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1404) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1318) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1303) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101) at org.apache.lucene.store.jdbc.support.JdbcTemplate.executeUpdate(JdbcTemplate.java:159) at org.apache.lucene.store.jdbc.index.AbstractJdbcIndexOutput.close(AbstractJdbcIndexOutput.java:47) at org.apache.lucene.store.jdbc.index.RAMAndFileJdbcIndexOutput.close(RAMAndFileJdbcIndexOutput.java:81) at org.apache.lucene.util.BitVector.write(BitVector.java:117) at org.apache.lucene.index.SegmentReader.doCommit(SegmentReader.java:172) at org.apache.lucene.index.IndexReader$2.doBody(IndexReader.java:573) at org.apache.lucene.store.Lock$With.run(Lock.java:99) at org.apache.lucene.index.IndexReader.commit(IndexReader.java:570) at org.apache.lucene.index.IndexReader.close(IndexReader.java:599) at agiletrack.server.persistence.GenericFullTextIndexer.closeReader(GenericFullTextIndexer.java:57) at agiletrack.server.persistence.GenericFullTextIndexer.getWriter(GenericFullTextIndexer.java:78) at agiletrack.server.persistence.GenericFullTextIndexer.updateIndex(GenericFullTextIndexer.java:325) at agiletrack.server.persistence.GenericFullTextIndexer.access$300(GenericFullTextIndexer.java:36) at agiletrack.server.persistence.GenericFullTextIndexer$1.run(GenericFullTextIndexer.java:99) at java.lang.Thread.run(Thread.java:595)
—Posted by James on Jan 2, 2007

Looks like you've encountered a problem with the indexer. Since it's pretty new, I've been of expecting some problems but had so far not seen or heard of any. I guess it experienced some sort of corruption. I'll need to put a catch in for that exception and trigger it to rebuild the index or something.

For now, here's what you can try.

Download http://agiletrack.net/downloads/agiletrack-mysql.jar and replace the agiletrack-mysql.jar in your lib directory.

Then connect to your AgileTrack MySQL database and "DROP TABLE lucene_index;".

The next time you restart, the Lucene index should be recreated and the errors should be gone. Hopefully that will take care of the slow save speed as well.

Let me know if that worked. Thanks for the stack trace. In the future it'll be handled gracefully.

—Posted by Adam Lane on Jan 2, 2007 at 2:25:32 PM

Sorry, that didn't work. After replacing the jar and dropping the table I got an error when logging in something like the automatic database update failed. I don't have the console log because then it spewed out a LOT of errors and it scrolled off. The table was gone and the client wasn't very happy about it, so I tried creating a virgin database on another machine and using mysqldump to get the schema. After (hopefully) recreating the table I am now getting the following (a lot):

1 [main] INFO : controller.LocalSettings – Check profile 'default'.
3 [main] INFO : controller.LocalSettings – Check profile 'demo'.
19439 [Thread-4] INFO : persistence.GenericFullTextIndexer – Beginning full text indexer thread…
20117 [Thread-5] INFO : controller.TrackerServerBridge – Begin background cache management thread…
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:49: Engine "clearlooks" is unsupported, ignoring
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:49: Engine "clearlooks" is unsupported, ignoring
Could not load hot keys library. Global hot keys unavailble.
org.apache.lucene.store.jdbc.JdbcStoreException: No entry for [segments] table lucene_index

at org.apache.lucene.store.jdbc.index.FetchOnOpenJdbcIndexInput$1.execute(FetchOnOpenJdbcIndexInput.java:59) at org.apache.lucene.store.jdbc.support.JdbcTemplate.executeSelect(JdbcTemplate.java:108) at org.apache.lucene.store.jdbc.index.FetchOnOpenJdbcIndexInput.configure(FetchOnOpenJdbcIndexInput.java:50) at org.apache.lucene.store.jdbc.handler.AbstractFileEntryHandler.openInput(AbstractFileEntryHandler.java:137) at org.apache.lucene.store.jdbc.JdbcDirectory.openInput(JdbcDirectory.java:370) at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:45) at org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:146) at org.apache.lucene.store.Lock$With.run(Lock.java:99) at org.apache.lucene.index.IndexReader.open(IndexReader.java:141) at org.apache.lucene.index.IndexReader.open(IndexReader.java:136) at agiletrack.server.persistence.GenericFullTextIndexer.getReader(GenericFullTextIndexer.java:164) at agiletrack.server.persistence.GenericFullTextIndexer.updateIndex(GenericFullTextIndexer.java:324) at agiletrack.server.persistence.GenericFullTextIndexer.access$300(GenericFullTextIndexer.java:36) at agiletrack.server.persistence.GenericFullTextIndexer$1.run(GenericFullTextIndexer.java:99) at java.lang.Thread.run(Thread.java:595)
org.apache.lucene.store.jdbc.JdbcStoreException: No entry for [segments] table lucene_index at org.apache.lucene.store.jdbc.index.FetchOnOpenJdbcIndexInput$1.execute(FetchOnOpenJdbcIndexInput.java:59) at org.apache.lucene.store.jdbc.support.JdbcTemplate.executeSelect(JdbcTemplate.java:108) at org.apache.lucene.store.jdbc.index.FetchOnOpenJdbcIndexInput.configure(FetchOnOpenJdbcIndexInput.java:50) at org.apache.lucene.store.jdbc.handler.AbstractFileEntryHandler.openInput(AbstractFileEntryHandler.java:137) at org.apache.lucene.store.jdbc.JdbcDirectory.openInput(JdbcDirectory.java:370) at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:45) at org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:146) at org.apache.lucene.store.Lock$With.run(Lock.java:99) at org.apache.lucene.index.IndexReader.open(IndexReader.java:141) at org.apache.lucene.index.IndexReader.open(IndexReader.java:136) at agiletrack.server.persistence.GenericFullTextIndexer.getReader(GenericFullTextIndexer.java:164) at agiletrack.server.persistence.GenericFullTextIndexer.updateIndex(GenericFullTextIndexer.java:324) at agiletrack.server.persistence.GenericFullTextIndexer.access$300(GenericFullTextIndexer.java:36) at agiletrack.server.persistence.GenericFullTextIndexer$1.run(GenericFullTextIndexer.java:99) at java.lang.Thread.run(Thread.java:595)
—Posted by James on Jan 2, 2007 at 3:12:55 PM

I'm surprised that didn't work. I've created a patched package that attempts to automatically recreate the Lucene index when something appears to be going wrong. It also will log all console output to a file—"agiletrack-client.log". If it works correctly, it should detect the error that is occuring and automatically recreate the index. If it doesn't work, then it should at least log everything. Let me know if it works.

http://agiletrack.net/downloads/agiletrack-client-0.8d-patch.zip

—Posted by Adam Lane on Jan 3, 2007 at 7:36:11 AM

I'm still having problems. I will email you the log.

James

—Posted by James on Jan 3, 2007 at 9:27:47 AM

The emails helped identify the problem. The Lucene JDBC directory being used is apparently sending SQL which is causing MySQL to return a truncation warning. The MySQL JDBC connection is set to throw exception on truncation warnings. I updated the connection string to avoid the truncation errors. The agiletrack-mysql.jar works now.

—Posted by Adam Lane on Jan 3, 2007 at 2:30:39 PM


You may post a reply to this topic, but you must be logged in. If you already have an account, you may login now. If you need to create an account, you may also register now.