org.compass.core.engine.SearchEngineException: Failed to rename index [target/test-index/index/user] to [target\test-index\index\user-copy0]

AppFuse JIRA | J. Garcia | 5 years ago
  1. 0

    In modular archetype, Struts2 framework: mvn clean test produces errors related to compass. ------------------------------------------------------------------------------- Test set: com.mycompany.webapp.listener.StartupListenerTest ------------------------------------------------------------------------------- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.042 sec <<< FAILURE! testContextInitialized(com.mycompany.webapp.listener.StartupListenerTest) Time elapsed: 6.037 sec <<< ERROR! org.compass.core.engine.SearchEngineException: Failed to rename index [target/test-index/index/user] to [target\test-index\index\user-copy0] at org.compass.core.lucene.engine.store.FSDirectoryStore.beforeCopyFrom(FSDirectoryStore.java:157) at org.compass.core.lucene.engine.store.DefaultLuceneSearchEngineStore.copyFrom(DefaultLuceneSearchEngineStore.java:616) at org.compass.core.lucene.engine.store.DefaultLuceneSearchEngineStore.copyFrom(DefaultLuceneSearchEngineStore.java:602) at org.compass.core.lucene.engine.manager.DefaultLuceneSearchEngineIndexManager$ReplaceIndexOperationCallback$1$1.run(DefaultLuceneSearchEngineIndexManager.java:298) at org.compass.core.lucene.engine.manager.IndexHoldersCache.doUnderCacheLock(IndexHoldersCache.java:126) etc... My solution: 1. moved all compass-related beans from WEB-INF/applicationContext.xml to applicationContext-dao.xml from core module:compass, compassPostProcessor, compassTemplate, compassSearchHelper, compassGps, with: <bean id="compass" class="org.compass.spring.LocalCompassBean"> <property name="mappingScan" value="es.isigma.promotions"/> <property name="postProcessor" ref="compassPostProcessor"/> <property name="transactionManager" ref="transactionManager" /> <property name="settings"> <map> <entry key="compass.engine.connection" value="${compass.storage.dir}" /> </map> </property> </bean> and in pom.xml: <properties> <compass.storage.dir>ram://index</compass.storage.dir> 2. Set the real storage in packaged application: 2.1: Add this in web's pom.xml: <plugin> + <artifactId>maven-war-plugin</artifactId> + <version>2.1.1</version> + <configuration> + <filters> + <filter>target/classes/compass-filter.properties</filter> + </filters> + <webResources> + <resource> + <directory>../core/src/main/resources</directory> + <targetPath>WEB-INF/classes</targetPath> + <filtering>true</filtering> + <includes> + <include>applicationContext-dao.xml</include> + </includes> + </resource> + </webResources> + <archive> + <manifest> + <addDefaultImplementationEntries>true</addDefaultImplementationEntries> + </manifest> + <manifestEntries> + <Implementation-Version>${project.version}</Implementation-Version> + </manifestEntries> + </archive> + </configuration> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>war</goal> + </goals> + </execution> + </executions> + </plugin> 2.2. Add the filter file: web/src/main/resources/compass-filter.properties: compass.storage.dir=/home/portasigma/${db.name}/index

    AppFuse JIRA | 5 years ago | J. Garcia
    org.compass.core.engine.SearchEngineException: Failed to rename index [target/test-index/index/user] to [target\test-index\index\user-copy0]
  2. 0

    In modular archetype, Struts2 framework: mvn clean test produces errors related to compass. ------------------------------------------------------------------------------- Test set: com.mycompany.webapp.listener.StartupListenerTest ------------------------------------------------------------------------------- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.042 sec <<< FAILURE! testContextInitialized(com.mycompany.webapp.listener.StartupListenerTest) Time elapsed: 6.037 sec <<< ERROR! org.compass.core.engine.SearchEngineException: Failed to rename index [target/test-index/index/user] to [target\test-index\index\user-copy0] at org.compass.core.lucene.engine.store.FSDirectoryStore.beforeCopyFrom(FSDirectoryStore.java:157) at org.compass.core.lucene.engine.store.DefaultLuceneSearchEngineStore.copyFrom(DefaultLuceneSearchEngineStore.java:616) at org.compass.core.lucene.engine.store.DefaultLuceneSearchEngineStore.copyFrom(DefaultLuceneSearchEngineStore.java:602) at org.compass.core.lucene.engine.manager.DefaultLuceneSearchEngineIndexManager$ReplaceIndexOperationCallback$1$1.run(DefaultLuceneSearchEngineIndexManager.java:298) at org.compass.core.lucene.engine.manager.IndexHoldersCache.doUnderCacheLock(IndexHoldersCache.java:126) etc... My solution: 1. moved all compass-related beans from WEB-INF/applicationContext.xml to applicationContext-dao.xml from core module:compass, compassPostProcessor, compassTemplate, compassSearchHelper, compassGps, with: <bean id="compass" class="org.compass.spring.LocalCompassBean"> <property name="mappingScan" value="es.isigma.promotions"/> <property name="postProcessor" ref="compassPostProcessor"/> <property name="transactionManager" ref="transactionManager" /> <property name="settings"> <map> <entry key="compass.engine.connection" value="${compass.storage.dir}" /> </map> </property> </bean> and in pom.xml: <properties> <compass.storage.dir>ram://index</compass.storage.dir> 2. Set the real storage in packaged application: 2.1: Add this in web's pom.xml: <plugin> + <artifactId>maven-war-plugin</artifactId> + <version>2.1.1</version> + <configuration> + <filters> + <filter>target/classes/compass-filter.properties</filter> + </filters> + <webResources> + <resource> + <directory>../core/src/main/resources</directory> + <targetPath>WEB-INF/classes</targetPath> + <filtering>true</filtering> + <includes> + <include>applicationContext-dao.xml</include> + </includes> + </resource> + </webResources> + <archive> + <manifest> + <addDefaultImplementationEntries>true</addDefaultImplementationEntries> + </manifest> + <manifestEntries> + <Implementation-Version>${project.version}</Implementation-Version> + </manifestEntries> + </archive> + </configuration> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>war</goal> + </goals> + </execution> + </executions> + </plugin> 2.2. Add the filter file: web/src/main/resources/compass-filter.properties: compass.storage.dir=/home/portasigma/${db.name}/index

    AppFuse JIRA | 5 years ago | J. Garcia
    org.compass.core.engine.SearchEngineException: Failed to rename index [target/test-index/index/user] to [target\test-index\index\user-copy0]
  3. 0

    Grails hibernate/Searchable stops server to start by giving the exception below

    Stack Overflow | 4 years ago | Shashank.gupta40
    org.compass.core.engine.SearchEngineException: Processor [4]: Failed to add job [Job Create [alias [Organizations] uid [Organizations#456#]] Resource [{Organizations} [stored/uncompressed,indexed,omitNorms&lt;alias:Organizations&gt;],[stored/uncompressed,indexed,omitNorms,omitTf&lt;$/Organizations/id:456&gt;],[stored/uncompressed,indexed&lt;active:true&gt;],[stored/uncompressed,indexed&lt;dateCreated:2013-02-28-14-03-05-0-PM&gt;],[stored/uncompressed,indexed,tokenized&lt;aaa:109122482450911&gt;],[stored/uncompressed,indexed&lt;lastUpdated:2013-02-28-14-03-05-0-PM&gt;],[stored/uncompressed,indexed,tokenized&lt;name:Asc&gt;],[stored/uncompressed,indexed&lt;version:0&gt;],[stored/uncompressed,indexed,omitNorms,omitTf&lt;$/uid:Bs#456#&gt;]]] after [10000ms] and backlog size [100]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Compass Support Forums : Compass@EJB3: No active JTA transaction ...

    compass-project.org | 1 year ago
    org.compass.core.engine.SearchEngineException: Rollback operation not supported for batch insert transaction

    Root Cause Analysis

    1. org.compass.core.engine.SearchEngineException

      Failed to rename index [target/test-index/index/user] to [target\test-index\index\user-copy0]

      at org.compass.core.lucene.engine.store.FSDirectoryStore.beforeCopyFrom()
    2. Compass
      IndexHoldersCache.doUnderCacheLock
      1. org.compass.core.lucene.engine.store.FSDirectoryStore.beforeCopyFrom(FSDirectoryStore.java:157)
      2. org.compass.core.lucene.engine.store.DefaultLuceneSearchEngineStore.copyFrom(DefaultLuceneSearchEngineStore.java:616)
      3. org.compass.core.lucene.engine.store.DefaultLuceneSearchEngineStore.copyFrom(DefaultLuceneSearchEngineStore.java:602)
      4. org.compass.core.lucene.engine.manager.DefaultLuceneSearchEngineIndexManager$ReplaceIndexOperationCallback$1$1.run(DefaultLuceneSearchEngineIndexManager.java:298)
      5. org.compass.core.lucene.engine.manager.IndexHoldersCache.doUnderCacheLock(IndexHoldersCache.java:126)
      5 frames