1 2 Previous Next 16 Replies Latest reply on Jun 28, 2012 11:08 AM by badr

    [JCR Query] java.lang.IllegalArgumentException: The optimizationNanos argument value may not be negative

    badr

      Hi,

       

      We have triyed to follow this example http://docs.jboss.org/modeshape/latest/manuals/reference/html/jcr-query-and-search.html with the version 3.0.0.Alpha5. BUT we get this exception :

       

      java.lang.IllegalArgumentException: The optimizationNanos argument value, -110669015, may not be negative

            at org.modeshape.common.util.CheckArg.isNonNegative(CheckArg.java:225)

            at org.modeshape.jcr.query.QueryResults$Statistics.withOptimizationTime(QueryResults.java:498)

            at org.modeshape.jcr.query.process.QueryEngine.execute(QueryEngine.java:114)

            at org.modeshape.jcr.query.lucene.LuceneQueryEngine.query(LuceneQueryEngine.java:131)

            at org.modeshape.jcr.RepositoryQueryManager.query(RepositoryQueryManager.java:101)

            at org.modeshape.jcr.JcrQueryManager$SessionQueryContext.execute(JcrQueryManager.java:281)Shutting down engine ...

       

            at org.modeshape.jcr.query.JcrQuery.execute(JcrQuery.java:109)

            at org.modeshape.example.sequencing.TestQueryLanguageJcrSql2.main(TestQueryLanguageJcrSql2.java:113)

       

       

      The line 113 in our code is exactly javax.jcr.query.QueryResult result1 = query.execute(); (executing this query :

      javax.jcr.query.Query query = mgr.createQuery("select * from [nt:unstructured]", Query.JCR_SQL2);)

       

      The problem is really strange because sometimes our code works fine and get the results sometimes we get this exception... Moreover in 2 different machines it's not the same behaviour (For example in mine it work everytime but in my colleague's one sometimes it works sometimes we get the exception as I said before !!)

       

      Anybody have some explanation?

       

       

        1 2 Previous Next