[jira] Commented: (JCR-778) Error on query initialization - intermittent

2007-04-27 Thread Michael Neale (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492424
 ] 

Michael Neale commented on JCR-778:
---

awesome work, nicely done. 

 Error on query initialization - intermittent
 

 Key: JCR-778
 URL: https://issues.apache.org/jira/browse/JCR-778
 Project: Jackrabbit
  Issue Type: Bug
  Components: indexing
Affects Versions: 1.1, 1.1.1, 1.2.1, 1.2.2, 1.2.3, 1.3
 Environment: Linux Fedora Core 5, ext2 filesystem, Java 1.5 (Sun)
Reporter: Michael Neale
 Fix For: 1.4

 Attachments: jackrabbit-JCR-778.zip


 About 1 in ten times, I get the error as shown in the stack trace below. This 
 happens when I run test, or when I start the app. The only way to resolve 
 (when testing) seems to be to blow away the repository. 
 It always happens at the point the query manager is accessed (triggering the 
 query subsystem to start up). It DOES NOT cause an exception to be thrown 
 back to the caller, I just noticed it in the logs. Basically the queries 
 return NO data at all (and show up as test failures of course). 
 In each case when I startup the system/test, if the repository exists I use 
 it, and (for tests) clean it by deleting the root node of the user content, 
 and then starting again, otherwise there is nothing that exciting.
 Please let me know if more info is needed.
 ERROR 05-03 15:54:39,386 (LazyQueryResultImpl.java:getResults:266)  
 -Exception while executing query:
 java.io.IOException : No such file or directory
 at java.io.UnixFileSystem.createFileExclusively(Native Method)
 at java.io.File.createNewFile(File.java:850)
 at org.apache.jackrabbit.core.query.lucene.FSDirectory$1.obtain( 
 FSDirectory.java:119)
 at org.apache.lucene.store.Lock.obtain(Lock.java:51)
 at org.apache.lucene.store.Lock$With.run(Lock.java:98)
 at org.apache.lucene.index.IndexReader.open(IndexReader.java:141)
 at org.apache.lucene.index.IndexReader.open(IndexReader.java:136)
 at 
 org.apache.jackrabbit.core.query.lucene.AbstractIndex.getReadOnlyIndexReader(AbstractIndex.java:191)
 at org.apache.jackrabbit.core.query.lucene.MultiIndex.getIndexReader 
 (MultiIndex.java:616)
 at 
 org.apache.jackrabbit.core.query.lucene.SearchIndex.executeQuery(SearchIndex.java:384)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.executeQuery(LazyQueryResultImpl.java
  :204)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.getResults(LazyQueryResultImpl.java:244)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.init(LazyQueryResultImpl.java
  :161)
 at 
 org.apache.jackrabbit.core.query.lucene.QueryImpl.execute(QueryImpl.java:164)
 at org.apache.jackrabbit.core.query.QueryImpl.execute(QueryImpl.java:142)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (JCR-778) Error on query initialization - intermittent

2007-04-25 Thread Marcel Reutegger (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491554
 ] 

Marcel Reutegger commented on JCR-778:
--

Does it also happen when you close the session? If not then this supports my 
assumption that the error is caused by a combination of repeated cycles of not 
shutting down jackrabbit and a bug in the index recovery code which is executed 
when jackrabbit is started up again.

 Error on query initialization - intermittent
 

 Key: JCR-778
 URL: https://issues.apache.org/jira/browse/JCR-778
 Project: Jackrabbit
  Issue Type: Bug
  Components: indexing
Affects Versions: 1.1, 1.2.2
 Environment: Linux Fedora Core 5, ext2 filesystem, Java 1.5 (Sun)
Reporter: Michael Neale
 Attachments: jackrabbit-JCR-778.zip


 About 1 in ten times, I get the error as shown in the stack trace below. This 
 happens when I run test, or when I start the app. The only way to resolve 
 (when testing) seems to be to blow away the repository. 
 It always happens at the point the query manager is accessed (triggering the 
 query subsystem to start up). It DOES NOT cause an exception to be thrown 
 back to the caller, I just noticed it in the logs. Basically the queries 
 return NO data at all (and show up as test failures of course). 
 In each case when I startup the system/test, if the repository exists I use 
 it, and (for tests) clean it by deleting the root node of the user content, 
 and then starting again, otherwise there is nothing that exciting.
 Please let me know if more info is needed.
 ERROR 05-03 15:54:39,386 (LazyQueryResultImpl.java:getResults:266)  
 -Exception while executing query:
 java.io.IOException : No such file or directory
 at java.io.UnixFileSystem.createFileExclusively(Native Method)
 at java.io.File.createNewFile(File.java:850)
 at org.apache.jackrabbit.core.query.lucene.FSDirectory$1.obtain( 
 FSDirectory.java:119)
 at org.apache.lucene.store.Lock.obtain(Lock.java:51)
 at org.apache.lucene.store.Lock$With.run(Lock.java:98)
 at org.apache.lucene.index.IndexReader.open(IndexReader.java:141)
 at org.apache.lucene.index.IndexReader.open(IndexReader.java:136)
 at 
 org.apache.jackrabbit.core.query.lucene.AbstractIndex.getReadOnlyIndexReader(AbstractIndex.java:191)
 at org.apache.jackrabbit.core.query.lucene.MultiIndex.getIndexReader 
 (MultiIndex.java:616)
 at 
 org.apache.jackrabbit.core.query.lucene.SearchIndex.executeQuery(SearchIndex.java:384)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.executeQuery(LazyQueryResultImpl.java
  :204)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.getResults(LazyQueryResultImpl.java:244)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.init(LazyQueryResultImpl.java
  :161)
 at 
 org.apache.jackrabbit.core.query.lucene.QueryImpl.execute(QueryImpl.java:164)
 at org.apache.jackrabbit.core.query.QueryImpl.execute(QueryImpl.java:142)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (JCR-778) Error on query initialization - intermittent

2007-04-24 Thread Michael Neale (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491216
 ] 

Michael Neale commented on JCR-778:
---

A simpler way to reproduce: 
public void testIt() throws Exception {
Repository repo = new TransientRepository();
Session sess = repo.login(new SimpleCredentials(foo, 
password.toCharArray()));
Node root = sess.getRootNode();

for (int i = 0; i  10; i++) {
root.addNode(  + i + System.currentTimeMillis(), 
nt:unstructured );
sess.save();
}


Query q = sess.getWorkspace().getQueryManager().createQuery( select * 
from nt:unstructured, Query.SQL);
QueryResult qr = q.execute();
NodeIterator ni = qr.getNodes();

assertTrue(ni.hasNext());
assertNotNull(ni.next());
assertNotNull(ni.next());
assertNotNull(ni.next());

//sess.logout();

}

I am just trying out to see if not closing the session can cause this. Take a 
lot of iterations to reproduce it.

 Error on query initialization - intermittent
 

 Key: JCR-778
 URL: https://issues.apache.org/jira/browse/JCR-778
 Project: Jackrabbit
  Issue Type: Bug
  Components: indexing
Affects Versions: 1.1, 1.2.2
 Environment: Linux Fedora Core 5, ext2 filesystem, Java 1.5 (Sun)
Reporter: Michael Neale
 Attachments: jackrabbit-JCR-778.zip


 About 1 in ten times, I get the error as shown in the stack trace below. This 
 happens when I run test, or when I start the app. The only way to resolve 
 (when testing) seems to be to blow away the repository. 
 It always happens at the point the query manager is accessed (triggering the 
 query subsystem to start up). It DOES NOT cause an exception to be thrown 
 back to the caller, I just noticed it in the logs. Basically the queries 
 return NO data at all (and show up as test failures of course). 
 In each case when I startup the system/test, if the repository exists I use 
 it, and (for tests) clean it by deleting the root node of the user content, 
 and then starting again, otherwise there is nothing that exciting.
 Please let me know if more info is needed.
 ERROR 05-03 15:54:39,386 (LazyQueryResultImpl.java:getResults:266)  
 -Exception while executing query:
 java.io.IOException : No such file or directory
 at java.io.UnixFileSystem.createFileExclusively(Native Method)
 at java.io.File.createNewFile(File.java:850)
 at org.apache.jackrabbit.core.query.lucene.FSDirectory$1.obtain( 
 FSDirectory.java:119)
 at org.apache.lucene.store.Lock.obtain(Lock.java:51)
 at org.apache.lucene.store.Lock$With.run(Lock.java:98)
 at org.apache.lucene.index.IndexReader.open(IndexReader.java:141)
 at org.apache.lucene.index.IndexReader.open(IndexReader.java:136)
 at 
 org.apache.jackrabbit.core.query.lucene.AbstractIndex.getReadOnlyIndexReader(AbstractIndex.java:191)
 at org.apache.jackrabbit.core.query.lucene.MultiIndex.getIndexReader 
 (MultiIndex.java:616)
 at 
 org.apache.jackrabbit.core.query.lucene.SearchIndex.executeQuery(SearchIndex.java:384)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.executeQuery(LazyQueryResultImpl.java
  :204)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.getResults(LazyQueryResultImpl.java:244)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.init(LazyQueryResultImpl.java
  :161)
 at 
 org.apache.jackrabbit.core.query.lucene.QueryImpl.execute(QueryImpl.java:164)
 at org.apache.jackrabbit.core.query.QueryImpl.execute(QueryImpl.java:142)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (JCR-778) Error on query initialization - intermittent

2007-04-23 Thread Michael Neale (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491103
 ] 

Michael Neale commented on JCR-778:
---

OK, another thing to try: download 
http://www.users.on.net/~michaelneale/work/jackrabbit-JCR-778.-corrupt-index-or-data.zip
and import into eclipse etc.. .run - it will fail immediately. It is a 
repository in the busted state *after* the index error occurs (you can see its 
the index subsystem failing every time).



 Error on query initialization - intermittent
 

 Key: JCR-778
 URL: https://issues.apache.org/jira/browse/JCR-778
 Project: Jackrabbit
  Issue Type: Bug
  Components: indexing
Affects Versions: 1.1, 1.2.2
 Environment: Linux Fedora Core 5, ext2 filesystem, Java 1.5 (Sun)
Reporter: Michael Neale
 Attachments: jackrabbit-JCR-778.zip


 About 1 in ten times, I get the error as shown in the stack trace below. This 
 happens when I run test, or when I start the app. The only way to resolve 
 (when testing) seems to be to blow away the repository. 
 It always happens at the point the query manager is accessed (triggering the 
 query subsystem to start up). It DOES NOT cause an exception to be thrown 
 back to the caller, I just noticed it in the logs. Basically the queries 
 return NO data at all (and show up as test failures of course). 
 In each case when I startup the system/test, if the repository exists I use 
 it, and (for tests) clean it by deleting the root node of the user content, 
 and then starting again, otherwise there is nothing that exciting.
 Please let me know if more info is needed.
 ERROR 05-03 15:54:39,386 (LazyQueryResultImpl.java:getResults:266)  
 -Exception while executing query:
 java.io.IOException : No such file or directory
 at java.io.UnixFileSystem.createFileExclusively(Native Method)
 at java.io.File.createNewFile(File.java:850)
 at org.apache.jackrabbit.core.query.lucene.FSDirectory$1.obtain( 
 FSDirectory.java:119)
 at org.apache.lucene.store.Lock.obtain(Lock.java:51)
 at org.apache.lucene.store.Lock$With.run(Lock.java:98)
 at org.apache.lucene.index.IndexReader.open(IndexReader.java:141)
 at org.apache.lucene.index.IndexReader.open(IndexReader.java:136)
 at 
 org.apache.jackrabbit.core.query.lucene.AbstractIndex.getReadOnlyIndexReader(AbstractIndex.java:191)
 at org.apache.jackrabbit.core.query.lucene.MultiIndex.getIndexReader 
 (MultiIndex.java:616)
 at 
 org.apache.jackrabbit.core.query.lucene.SearchIndex.executeQuery(SearchIndex.java:384)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.executeQuery(LazyQueryResultImpl.java
  :204)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.getResults(LazyQueryResultImpl.java:244)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.init(LazyQueryResultImpl.java
  :161)
 at 
 org.apache.jackrabbit.core.query.lucene.QueryImpl.execute(QueryImpl.java:164)
 at org.apache.jackrabbit.core.query.QueryImpl.execute(QueryImpl.java:142)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (JCR-778) Error on query initialization - intermittent

2007-04-23 Thread Michael Neale (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491140
 ] 

Michael Neale commented on JCR-778:
---

ok this also happens with 1.3 - only in 1.3 its not logging an exception (even 
worse)  - just not returning results on a query.

 Error on query initialization - intermittent
 

 Key: JCR-778
 URL: https://issues.apache.org/jira/browse/JCR-778
 Project: Jackrabbit
  Issue Type: Bug
  Components: indexing
Affects Versions: 1.1, 1.2.2
 Environment: Linux Fedora Core 5, ext2 filesystem, Java 1.5 (Sun)
Reporter: Michael Neale
 Attachments: jackrabbit-JCR-778.zip


 About 1 in ten times, I get the error as shown in the stack trace below. This 
 happens when I run test, or when I start the app. The only way to resolve 
 (when testing) seems to be to blow away the repository. 
 It always happens at the point the query manager is accessed (triggering the 
 query subsystem to start up). It DOES NOT cause an exception to be thrown 
 back to the caller, I just noticed it in the logs. Basically the queries 
 return NO data at all (and show up as test failures of course). 
 In each case when I startup the system/test, if the repository exists I use 
 it, and (for tests) clean it by deleting the root node of the user content, 
 and then starting again, otherwise there is nothing that exciting.
 Please let me know if more info is needed.
 ERROR 05-03 15:54:39,386 (LazyQueryResultImpl.java:getResults:266)  
 -Exception while executing query:
 java.io.IOException : No such file or directory
 at java.io.UnixFileSystem.createFileExclusively(Native Method)
 at java.io.File.createNewFile(File.java:850)
 at org.apache.jackrabbit.core.query.lucene.FSDirectory$1.obtain( 
 FSDirectory.java:119)
 at org.apache.lucene.store.Lock.obtain(Lock.java:51)
 at org.apache.lucene.store.Lock$With.run(Lock.java:98)
 at org.apache.lucene.index.IndexReader.open(IndexReader.java:141)
 at org.apache.lucene.index.IndexReader.open(IndexReader.java:136)
 at 
 org.apache.jackrabbit.core.query.lucene.AbstractIndex.getReadOnlyIndexReader(AbstractIndex.java:191)
 at org.apache.jackrabbit.core.query.lucene.MultiIndex.getIndexReader 
 (MultiIndex.java:616)
 at 
 org.apache.jackrabbit.core.query.lucene.SearchIndex.executeQuery(SearchIndex.java:384)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.executeQuery(LazyQueryResultImpl.java
  :204)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.getResults(LazyQueryResultImpl.java:244)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.init(LazyQueryResultImpl.java
  :161)
 at 
 org.apache.jackrabbit.core.query.lucene.QueryImpl.execute(QueryImpl.java:164)
 at org.apache.jackrabbit.core.query.QueryImpl.execute(QueryImpl.java:142)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (JCR-778) Error on query initialization - intermittent

2007-04-22 Thread Michael Neale (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490717
 ] 

Michael Neale commented on JCR-778:
---

OK looking a little deeper, the problem stems from:

public Lock makeLock(final String name) {
final File lockFile = new File(directory, name);
return new Lock() {
public boolean obtain() throws IOException {
if (DISABLE_LOCKS) {
return true;
}
return lockFile.createNewFile();
}

In FSDirectory in jackrabbit core. IT seems that it is using an empty file as a 
lock, yet when you look at JRE source for createNewFile, it EXPLICITLY says not 
to use this for file locking: 
 * Note: this method should inot/i be used for file-locking, as
 * the resulting protocol cannot be made to work reliably. The 
 * [EMAIL PROTECTED] java.nio.channels.FileLock FileLock}
 * facility should be used instead. 

So this is a problem I believe. 


 Error on query initialization - intermittent
 

 Key: JCR-778
 URL: https://issues.apache.org/jira/browse/JCR-778
 Project: Jackrabbit
  Issue Type: Bug
  Components: indexing
Affects Versions: 1.1, 1.2.2
 Environment: Linux Fedora Core 5, ext2 filesystem, Java 1.5 (Sun)
Reporter: Michael Neale

 About 1 in ten times, I get the error as shown in the stack trace below. This 
 happens when I run test, or when I start the app. The only way to resolve 
 (when testing) seems to be to blow away the repository. 
 It always happens at the point the query manager is accessed (triggering the 
 query subsystem to start up). It DOES NOT cause an exception to be thrown 
 back to the caller, I just noticed it in the logs. Basically the queries 
 return NO data at all (and show up as test failures of course). 
 In each case when I startup the system/test, if the repository exists I use 
 it, and (for tests) clean it by deleting the root node of the user content, 
 and then starting again, otherwise there is nothing that exciting.
 Please let me know if more info is needed.
 ERROR 05-03 15:54:39,386 (LazyQueryResultImpl.java:getResults:266)  
 -Exception while executing query:
 java.io.IOException : No such file or directory
 at java.io.UnixFileSystem.createFileExclusively(Native Method)
 at java.io.File.createNewFile(File.java:850)
 at org.apache.jackrabbit.core.query.lucene.FSDirectory$1.obtain( 
 FSDirectory.java:119)
 at org.apache.lucene.store.Lock.obtain(Lock.java:51)
 at org.apache.lucene.store.Lock$With.run(Lock.java:98)
 at org.apache.lucene.index.IndexReader.open(IndexReader.java:141)
 at org.apache.lucene.index.IndexReader.open(IndexReader.java:136)
 at 
 org.apache.jackrabbit.core.query.lucene.AbstractIndex.getReadOnlyIndexReader(AbstractIndex.java:191)
 at org.apache.jackrabbit.core.query.lucene.MultiIndex.getIndexReader 
 (MultiIndex.java:616)
 at 
 org.apache.jackrabbit.core.query.lucene.SearchIndex.executeQuery(SearchIndex.java:384)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.executeQuery(LazyQueryResultImpl.java
  :204)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.getResults(LazyQueryResultImpl.java:244)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.init(LazyQueryResultImpl.java
  :161)
 at 
 org.apache.jackrabbit.core.query.lucene.QueryImpl.execute(QueryImpl.java:164)
 at org.apache.jackrabbit.core.query.QueryImpl.execute(QueryImpl.java:142)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (JCR-778) Error on query initialization - intermittent

2007-04-22 Thread Michael Neale (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490722
 ] 

Michael Neale commented on JCR-778:
---

started reworking the locking to use NIO, but there is a problem:

repository/repository/index/_27/write.lock (No such file or directory)
stuff like that occurs when a lock is requested for a directory that does not 
exist.

 Error on query initialization - intermittent
 

 Key: JCR-778
 URL: https://issues.apache.org/jira/browse/JCR-778
 Project: Jackrabbit
  Issue Type: Bug
  Components: indexing
Affects Versions: 1.1, 1.2.2
 Environment: Linux Fedora Core 5, ext2 filesystem, Java 1.5 (Sun)
Reporter: Michael Neale

 About 1 in ten times, I get the error as shown in the stack trace below. This 
 happens when I run test, or when I start the app. The only way to resolve 
 (when testing) seems to be to blow away the repository. 
 It always happens at the point the query manager is accessed (triggering the 
 query subsystem to start up). It DOES NOT cause an exception to be thrown 
 back to the caller, I just noticed it in the logs. Basically the queries 
 return NO data at all (and show up as test failures of course). 
 In each case when I startup the system/test, if the repository exists I use 
 it, and (for tests) clean it by deleting the root node of the user content, 
 and then starting again, otherwise there is nothing that exciting.
 Please let me know if more info is needed.
 ERROR 05-03 15:54:39,386 (LazyQueryResultImpl.java:getResults:266)  
 -Exception while executing query:
 java.io.IOException : No such file or directory
 at java.io.UnixFileSystem.createFileExclusively(Native Method)
 at java.io.File.createNewFile(File.java:850)
 at org.apache.jackrabbit.core.query.lucene.FSDirectory$1.obtain( 
 FSDirectory.java:119)
 at org.apache.lucene.store.Lock.obtain(Lock.java:51)
 at org.apache.lucene.store.Lock$With.run(Lock.java:98)
 at org.apache.lucene.index.IndexReader.open(IndexReader.java:141)
 at org.apache.lucene.index.IndexReader.open(IndexReader.java:136)
 at 
 org.apache.jackrabbit.core.query.lucene.AbstractIndex.getReadOnlyIndexReader(AbstractIndex.java:191)
 at org.apache.jackrabbit.core.query.lucene.MultiIndex.getIndexReader 
 (MultiIndex.java:616)
 at 
 org.apache.jackrabbit.core.query.lucene.SearchIndex.executeQuery(SearchIndex.java:384)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.executeQuery(LazyQueryResultImpl.java
  :204)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.getResults(LazyQueryResultImpl.java:244)
 at 
 org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.init(LazyQueryResultImpl.java
  :161)
 at 
 org.apache.jackrabbit.core.query.lucene.QueryImpl.execute(QueryImpl.java:164)
 at org.apache.jackrabbit.core.query.QueryImpl.execute(QueryImpl.java:142)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (JCR-778) Error on query initialization - intermittent

2007-04-22 Thread Michael Neale (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490762
 ] 

Michael Neale commented on JCR-778:
---

ok the problem isn't just with locking Per-se - thats only part. 

Even when locking is disabled, the index reader tries to access stuff that just 
isn't there: 

java.io.FileNotFoundException: 
/home/michael/projects/jboss-rules/drools-repository/repository/repository/index/_42/segments
 (No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.init(RandomAccessFile.java:212)
at 
org.apache.lucene.store.FSIndexInput$Descriptor.init(FSDirectory.java:430)
at org.apache.lucene.store.FSIndexInput.init(FSDirectory.java:439)
at org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:329)
at 
org.apache.jackrabbit.core.query.lucene.FSDirectory.openInput(FSDirectory.java:209)
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 
org.apache.jackrabbit.core.query.lucene.AbstractIndex.getReadOnlyIndexReader(AbstractIndex.java:191)
at 
org.apache.jackrabbit.core.query.lucene.MultiIndex.getIndexReader(MultiIndex.java:616)
at 
org.apache.jackrabbit.core.query.lucene.SearchIndex.executeQuery(SearchIndex.java:384)
at 
org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.executeQuery(LazyQueryResultImpl.java:204)
at 
org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.getResults(LazyQueryResultImpl.java:244)
at 
org.apache.jackrabbit.core.query.lucene.LazyQueryResultImpl.init(LazyQueryResultImpl.java:161)
at 
org.apache.jackrabbit.core.query.lucene.QueryImpl.execute(QueryImpl.java:164)
at 
org.apache.jackrabbit.core.query.QueryImpl.execute(QueryImpl.java:142)
at 
org.drools.repository.RulesRepository.findAssetsByName(RulesRepository.java:968)
at 
org.drools.repository.RulesRepository.findAssetsByName(RulesRepository.java:980)
at 
org.drools.repository.RulesRepositoryTest.testFindRulesByName(RulesRepositoryTest.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at 
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

 Error on query initialization - intermittent
 

 Key: JCR-778
 URL: https://issues.apache.org/jira/browse/JCR-778
 Project: Jackrabbit
  Issue Type: Bug
  Components: indexing
Affects Versions: 1.1, 1.2.2
 Environment: Linux Fedora Core 5, ext2 filesystem, Java 1.5 (Sun)
Reporter: Michael Neale

 About 1 in ten times, I get the error as shown in the stack trace below. This 
 happens when I run test, or when I start the app. The only way to resolve 
 (when testing) seems to be to blow away the repository. 
 It always happens at the point the query manager is accessed (triggering the 
 query subsystem to start up). It DOES NOT cause an exception to be thrown 
 back to the caller, I just noticed it in the logs. Basically the queries 
 return NO data at all (and show up as test failures of course). 
 In each case when I startup the system/test, if the repository exists I use 
 it, and (for tests) clean it by deleting the root node of the user content, 
 and then starting again, otherwise there is nothing that exciting.
 Please let me know if more info is needed.
 ERROR