jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Scheffler (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-214) NullPointerException in LuceneQueryBuilder
Date Mon, 12 Sep 2005 11:47:34 GMT
NullPointerException in LuceneQueryBuilder
------------------------------------------

         Key: JCR-214
         URL: http://issues.apache.org/jira/browse/JCR-214
     Project: Jackrabbit
        Type: Bug
  Components: core  
 Environment: Gentoo Linux, Java JDK 5 1.5.04, Xalan 2.7.0
    Reporter: Thomas Scheffler


after setting up the following query:

//mycoreclass[@ID= 'ArchNachl_class_003']//label[@* = 'A']

I get a NullPointerException:


java.lang.NullPointerException
        at org.apache.jackrabbit.core.query.lucene.LuceneQueryBuilder.visit(LuceneQueryBuilder.java:553)
        at org.apache.jackrabbit.core.query.RelationQueryNode.accept(RelationQueryNode.java:157)
        at org.apache.jackrabbit.core.query.NAryQueryNode.acceptOperands(NAryQueryNode.java:131)
        at org.apache.jackrabbit.core.query.lucene.LuceneQueryBuilder.visit(LuceneQueryBuilder.java:421)
        at org.apache.jackrabbit.core.query.LocationStepQueryNode.accept(LocationStepQueryNode.java:156)
        at org.apache.jackrabbit.core.query.lucene.LuceneQueryBuilder.visit(LuceneQueryBuilder.java:400)
        at org.apache.jackrabbit.core.query.PathQueryNode.accept(PathQueryNode.java:47)
        at org.apache.jackrabbit.core.query.lucene.LuceneQueryBuilder.visit(LuceneQueryBuilder.java:200)
        at org.apache.jackrabbit.core.query.QueryRootNode.accept(QueryRootNode.java:112)
        at org.apache.jackrabbit.core.query.lucene.LuceneQueryBuilder.createLuceneQuery(LuceneQueryBuilder.java:190)
        at org.apache.jackrabbit.core.query.lucene.LuceneQueryBuilder.createQuery(LuceneQueryBuilder.java:172)
        at org.apache.jackrabbit.core.query.lucene.QueryImpl.execute(QueryImpl.java:152)
        at org.apache.jackrabbit.core.query.QueryImpl.execute(QueryImpl.java:132)

I don't really know if it's a valid query. I should search for every label that has a property
value (what ever name the property may have) that is  somewhere under a specific "mycoreclass"
node. Either way Jackrabbit should of cause not exit with a NullPointerExeption here.

I'm using the very current svn snapshot of jackrabbit. For the records line 550-557 of LuceneQueryBuilder.java
look like this now:

        String field = "";
        try {
            field = node.getProperty().toJCRName(nsMappings);
        } catch (NoPrefixDeclaredException e) {
            // should never happen
            exceptions.add(e);
        }



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message