Bug 1308654 - NPE parsing query
Summary: NPE parsing query
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan, Library
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Adrian Nistor
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On:
Blocks: 1308655
TreeView+ depends on / blocked
 
Reported: 2016-02-15 17:03 UTC by Van Halbert
Modified: 2016-02-18 15:47 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-18 15:47:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Comment 2 Van Halbert 2016-02-15 17:12:43 UTC
I'm also seeing similar NPE when issuing query that the Query object resolves to:

DelegatingQuery{jpaQuery=FROM com.client.quickstart.pojo.Stock _gen0, namedParameters=null, projection=null, startOffset=0, maxResults=100}


11:08:17,131 ERROR [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue8) TEIID30019 Unexpected exception for request fqVh1J7q9E0s.1: java.lang.NullPointerException
	at org.infinispan.query.dsl.embedded.impl.QueryEngine.parse(QueryEngine.java:623)
	at org.infinispan.query.dsl.embedded.impl.QueryEngine.buildQuery(QueryEngine.java:93)

Comment 3 Van Halbert 2016-02-15 21:09:31 UTC
If it helps, I confirmed this is only a library mode issue.  Did not see this when using the hot rod client to access remote cache.

Comment 4 Van Halbert 2016-02-15 21:09:31 UTC
If it helps, I confirmed this is only a library mode issue.  Did not see this when using the hot rod client to access remote cache.

Comment 5 Martin Gencur 2016-02-16 08:23:15 UTC
Hi,
this is a very basic use case and there are tests, e.g. here: https://github.com/infinispan/infinispan/blob/master/query/src/test/java/org/infinispan/query/dsl/embedded/QueryDslConditionsTest.java#L209

Can you please provide trace logs, and possibly a reproducer? I'm not able to reproduce this. Thanks

Comment 8 Van Halbert 2016-02-16 20:05:19 UTC
Thru debug, I'm seeing that in QueryEngine, the call to method:

  protected BaseMatcher getFirstPhaseMatcher() {
      return SecurityActions.getCacheComponentRegistry(cache).getComponent(ReflectionMatcher.class);
   }

is returning null;

Attached is the server.log with TRACE logging.

Comment 10 Adrian Nistor 2016-02-18 09:38:51 UTC
Hi Van,

since ReflectionMatcher was not found in Infinispan's component registry I suspect infinispan-query.jar module was not loaded. Is it in the classpath? This module is needed even if you plan to do indexless query.

If it is in CP and your cache is indexed it should log "INFO Registering Query interceptor" right after registering ReflectionMatcher, but I cannot see this in the log. So is the cache indexed?

Adrian


Note You need to log in before you can comment on or make changes to this bug.