This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1308654 - NPE parsing query
NPE parsing query
Status: CLOSED NOTABUG
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan, Library (Show other bugs)
6.6.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Adrian Nistor
Martin Gencur
:
Depends On:
Blocks: 1308655
  Show dependency treegraph
 
Reported: 2016-02-15 12:03 EST by Van Halbert
Modified: 2016-02-18 10:47 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-18 10:47:08 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 2 Van Halbert 2016-02-15 12:12:43 EST
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 16:09:31 EST
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 16:09:31 EST
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 03:23:15 EST
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 15:05:19 EST
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 04:38:51 EST
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.