Hi Guys,

I guess that maybe I should be posting this on the Compass forum, but thought
I'd ask here first.

Been looking at a MySQL installation, again...

I've taken my very recent HEAD build of Nuxeo to use MySQL as its data-store for
all of its services, but seem to have a problem with Compass. The best I can get
is that the indexing 'appears' to work, but the console is littered with
MySQLIntegrityConstraintViolationExceptions:

23:07:05,072 ERROR [StdServerSession] failed to commit/rollback
org.jboss.tm.JBossRollbackException: Unable to commit,
tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=tibia/513,
BranchQual=, localId=513] status=STATUS_NO_TRANSACTION; - nested
throwable: (org.compass.core.engine.SearchEngineException: Failed in
first phase commit from sub-index [nxdocs]; nested exception is
org.apache.lucene.store.jdbc.JdbcStoreException: Failed to execute sql
[insert into index_nxdocs (name_, value_, size_, lf_, deleted_) values (
?, ?, ?, current_timestamp, ? )]; nested exception is
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException:
Duplicate entry '_1q.fnm' for key 1)
        at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:372)
        at org.jboss.tm.TxManager.commit(TxManager.java:240)
        at
org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:351)
...
Caused by: org.apache.lucene.store.jdbc.JdbcStoreException: Failed to
execute sql [insert into index_nxdocs (name_, value_, size_, lf_,
deleted_) values ( ?, ?, ?, current_timestamp, ? )]; nested exception is
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException:
Duplicate entry '_1q.fnm' for key 1
        at
org.apache.lucene.store.jdbc.support.JdbcTemplate.executeUpdate(JdbcTemplate.java:163)
        at
org.apache.lucene.store.jdbc.index.AbstractJdbcIndexOutput.close(AbstractJdbcIndexOutput.java:47)
...
Caused by:
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException:
Duplicate entry '_1q.fnm' for key 1
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2934)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3255)
        at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1293)
        at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1566)


My set-up:

1. MySQL 5 with default-storage-engine=innodb
2. Set config/sql.properties to MySQL
3. Have tried with all cases of emulateLocators and relaxAutoCommit on the
datasource configuration.
4. My compass config:

<compass-core-config
xmlns="http://www.opensymphony.com/compass/schema/core-config";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://www.opensymphony.com/compass/schema/core-config

http://www.opensymphony.com/compass/schema/compass-core-config.xsd";>

    <compass name="default">

      <connection>
        <jdbc managed="true"
dialectClass="org.apache.lucene.store.jdbc.dialect.MySQLInnoDBDialect"
          deleteMarkDeletedDelta="3600000">
          <dataSourceProvider>
            <jndi lookup="java:/nxsearch-compass" autoCommit="false"/>
          </dataSourceProvider>
        </jdbc>
      </connection>

      <transaction commitBeforeCompletion="true"
        factory="org.compass.core.transaction.JTASyncTransactionFactory">
        <batchInsertSettings maxBufferedDocs="100"/>
      </transaction>

      <converters>
        <converter name="date"
type="org.compass.core.converter.basic.CalendarConverter"/>
        <converter name="int"
type="org.compass.core.converter.basic.IntConverter">
          <setting name="format" value="#0000000000"/>
        </converter>
        <converter name="long"
type="org.compass.core.converter.basic.LongConverter">
          <setting name="format" value="#00000000000000000000"/>
        </converter>
      </converters>

      <mappings>
        <resource location="nxdocument.cpm.xml"/>
      </mappings>

    </compass>
</compass-core-config>


(I have also tried with lock="org.apache.lucene.store.jdbc.lock.PhantomReadLock"
on the jdbc element).

(I have tried versions 3 and 5 of the MySQL Connector too)


Any ideas? Have people who have got MySQL to work, were you using InnoDB?

Thanks and regards,

Sean


--
Dr. Sean Radford, MBBS MSc
http://www.tacola.com
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to