Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
NPE using Cypher query & WITH construct...
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
kiteflo  
View profile  
 More options Nov 15 2012, 7:15 am
From: kiteflo <kite...@gmail.com>
Date: Thu, 15 Nov 2012 04:15:53 -0800 (PST)
Local: Thurs, Nov 15 2012 7:15 am
Subject: NPE using Cypher query & WITH construct...

Hi guys,

we're just in progress of refactoring our whole application in order to use
the great piped query feature, currently we are facing a NullPointer
Exception when firung down the following Cypher query:

START  spat=node:GEO_INDEX('withinDistance:[49.87497,8.826425,10.0]') MATCH
spat-[r1:MANUAL_SPATIAL_CONNECT]->loc-[r2:GEOFIES]->offer WITH offer START
keyword=node:SKW_NAMEKEY_SEARCH('Kartbahn') MATCH
offer<-[rkw:OCCURS_IN_OFFER]-keyword WITH offer,count(rkw) as count_rkw
MATCH offer<-[rr?:REVIEW]-review WHERE (offer.nodeState = 'ACTIVE') RETURN
offer, avg(review.rating) as average_review, count(review) as
no_of_reviews, count_rkw ORDER BY count_rkw DESC

See the exception below, from my point of view the query looks ok but maybe
we're doing something wrong?

Any help is highly appreciated...

Cheers, Florian

Exception rised:

SCHWERWIEGEND: Servlet.service() for servlet [dispatcher] in context with
path [/helios] threw exception [Request processing failed; nested exception
is java.lang.NullPointerException] with root cause

java.lang.NullPointerException

at org.apache.lucene.util.SimpleStringInterner.intern(
SimpleStringInterner.java:54)

at org.apache.lucene.util.StringHelper.intern(StringHelper.java:39)

at org.apache.lucene.index.Term.<init>(Term.java:38)

at org.apache.lucene.queryParser.QueryParser.getFieldQuery(
QueryParser.java:643)

at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1421)

at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1309)

at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1237)

at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(
QueryParser.java:1226)

at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:206)

at org.neo4j.index.impl.lucene.IndexType.query(IndexType.java:300)

at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:227)

at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:238)

at
org.neo4j.cypher.internal.executionplan.builders.IndexQueryBuilder$$anonfun $createStartPipe$3.apply(IndexQueryBuilder.scala:83)

at
org.neo4j.cypher.internal.executionplan.builders.IndexQueryBuilder$$anonfun $createStartPipe$3.apply(IndexQueryBuilder.scala:81)

at
org.neo4j.cypher.internal.pipes.StartPipe$$anonfun$1.apply(StartPipe.scala: 38)

at
org.neo4j.cypher.internal.pipes.StartPipe$$anonfun$1.apply(StartPipe.scala: 37)

at
scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.s cala:200)

at
scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.s cala:200)

at
scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala: 59)

at scala.collection.immutable.List.foreach(List.scala:45)

at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:200)

at scala.collection.immutable.List.flatMap(List.scala:45)

at
org.neo4j.cypher.internal.pipes.StartPipe.createResults(StartPipe.scala:37)

at
org.neo4j.cypher.internal.pipes.MatchPipe.createResults(MatchPipe.scala:31)

at
org.neo4j.cypher.internal.pipes.EagerAggregationPipe.createResults(EagerAgg regationPipe.scala:49)

at
org.neo4j.cypher.internal.pipes.ExtractPipe.createResults(ExtractPipe.scala :37)

at
org.neo4j.cypher.internal.pipes.ColumnFilterPipe.createResults(ColumnFilter Pipe.scala:39)

at
org.neo4j.cypher.internal.pipes.FilterPipe.createResults(FilterPipe.scala:2 8)

at
org.neo4j.cypher.internal.pipes.MatchPipe.createResults(MatchPipe.scala:31)

at
org.neo4j.cypher.internal.pipes.EagerAggregationPipe.createResults(EagerAgg regationPipe.scala:49)

at
org.neo4j.cypher.internal.pipes.ExtractPipe.createResults(ExtractPipe.scala :37)

at org.neo4j.cypher.internal.pipes.SortPipe.createResults(SortPipe.scala:33)

at org.neo4j.cypher.internal.pipes.SortPipe.createResults(SortPipe.scala:28)

at
org.neo4j.cypher.internal.pipes.ColumnFilterPipe.createResults(ColumnFilter Pipe.scala:39)

at
org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun$4$$anonf un$apply$2.apply(ExecutionPlanImpl.scala:95)

at
org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun$4$$anonf un$apply$2.apply(ExecutionPlanImpl.scala:95)

at
org.neo4j.cypher.PipeExecutionResult.immutableResult(PipeExecutionResult.sc ala:37)

at
org.neo4j.cypher.PipeExecutionResult.iterator(PipeExecutionResult.scala:153 )

at
org.neo4j.cypher.PipeExecutionResult.hasNext(PipeExecutionResult.scala:155)

at scala.collection.Iterator$$anon$19.hasNext(Iterator.scala:334)

at
scala.collection.JavaConversions$IteratorWrapper.hasNext(JavaConversions.sc ala:562)

at org.neo4j.helpers.collection.IteratorWrapper.hasNext(
IteratorWrapper.java:42)

at com.helios.service.plain.OfferService.queryOffers(OfferService.java:1076)

at com.helios.service.plain.OfferService.queryOffers(OfferService.java:1287)

at com.helios.web.controller.RecommendationController.newRecommendation(
RecommendationController.java:188)

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:597)

at org.springframework.web.method.support.InvocableHandlerMethod.invoke(
InvocableHandlerMethod.java:212)

at
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequ est(
InvocableHandlerMethod.java:126)

at
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandl erMethod.invokeAndHandle(
ServletInvocableHandlerMethod.java:96)

at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandler Adapter.invokeHandlerMethod(
RequestMappingHandlerAdapter.java:617)

at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandler Adapter.handleInternal(
RequestMappingHandlerAdapter.java:578)

at
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.han dle(
AbstractHandlerMethodAdapter.java:80)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(
DispatcherServlet.java:900)

at org.springframework.web.servlet.DispatcherServlet.doService(
DispatcherServlet.java:827)

at org.springframework.web.servlet.FrameworkServlet.processRequest(
FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doPost(
FrameworkServlet.java:789)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:305)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:210)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilt er(
FilterChainProxy.java:311)

at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor .invoke(
FilterSecurityInterceptor.java:116)

at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor .doFilter(
FilterSecurityInterceptor.java:83)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilt er(
FilterChainProxy.java:323)

at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter (
ExceptionTranslationFilter.java:113)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilt er(
FilterChainProxy.java:323)

at
org.springframework.security.web.session.SessionManagementFilter.doFilter(
SessionManagementFilter.java:101)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilt er(
FilterChainProxy.java:323)

at
org.springframework.security.web.authentication.AnonymousAuthenticationFilt er.doFilter(
AnonymousAuthenticationFilter.java:113)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilt er(
FilterChainProxy.java:323)

at
org.springframework.security.web.authentication.rememberme.RememberMeAuthen ticationFilter.doFilter(
RememberMeAuthenticationFilter.java:146)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilt er(
FilterChainProxy.java:323)

at
org.springframework.security.web.servletapi.SecurityContextHolderAwareReque stFilter.doFilter(
SecurityContextHolderAwareRequestFilter.java:54)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilt er(
FilterChainProxy.java:323)

at
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFil ter(
RequestCacheAwareFilter.java:45)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilt er(
FilterChainProxy.java:323)

at
org.springframework.security.web.authentication.AbstractAuthenticationProce ssingFilter.doFilter(
AbstractAuthenticationProcessingFilter.java:182)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilt er(
FilterChainProxy.java:323)

at
org.springframework.security.web.authentication.logout.LogoutFilter.doFilte r(
LogoutFilter.java:105)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilt er(
FilterChainProxy.java:323)

at
org.springframework.security.web.context.SecurityContextPersistenceFilter.d oFilter(
SecurityContextPersistenceFilter.java:87)

at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilt er(
FilterChainProxy.java:323)

at org.springframework.security.web.FilterChainProxy.doFilter(
FilterChainProxy.java:173)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(
DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(
DelegatingFilterProxy.java:259)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:243)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:210)

at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(
CharacterEncodingFilter.java:88)

at ...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Nov 15 2012, 7:38 am
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Thu, 15 Nov 2012 13:38:04 +0100
Local: Thurs, Nov 15 2012 7:38 am
Subject: Re: [Neo4j] NPE using Cypher query & WITH construct...

this search misses a field:

node:SKW_NAMEKEY_SEARCH('Kartbahn')

like 'type:Kartbahn'

and please make sure to use parameters everywhere !

Michael

Am 15.11.2012 um 13:15 schrieb kiteflo:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kiteflo  
View profile  
 More options Nov 15 2012, 9:30 am
From: kiteflo <kite...@gmail.com>
Date: Thu, 15 Nov 2012 06:30:14 -0800 (PST)
Local: Thurs, Nov 15 2012 9:30 am
Subject: Re: NPE using Cypher query & WITH construct...

Hi Michael,

thanx for the quick reply...but still cant get it working, you mean sth.
like this?

...WITH offer START keyword=node:SKW_NAMEKEY_SEARCH(like 'type:Kartbahn')...

We are using Lucene Indexes quite long and usually the way we used them
worked perfectly - did there change anything as an extra filed need to be
specified? Would be great to have the "like" part integrated into our query
as I'm not sure where to append - srry;

Thanx for your help, Florian;

P.S.: yes, we are migrating everything to parameters right now ;-)

Am Donnerstag, 15. November 2012 13:15:53 UTC+1 schrieb kiteflo:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Nov 15 2012, 9:37 am
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Thu, 15 Nov 2012 15:36:54 +0100
Local: Thurs, Nov 15 2012 9:36 am
Subject: Re: [Neo4j] Re: NPE using Cypher query & WITH construct...

???

this is already a like search query, you can use wildcards like *

> START keyword=node:SKW_NAMEKEY_SEARCH('type:Kartbahn')...

Michael

Am 15.11.2012 um 15:30 schrieb kiteflo:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kiteflo  
View profile  
 More options Nov 15 2012, 9:52 am
From: kiteflo <kite...@gmail.com>
Date: Thu, 15 Nov 2012 06:52:36 -0800 (PST)
Local: Thurs, Nov 15 2012 9:52 am
Subject: Re: NPE using Cypher query & WITH construct...

damn...sorry, got what you mean...that's the problem using query generation
- written once your Cypher querries will decrease...but now we're up to
fluent Cypher again ;-)

Thank you, Florian;

Am Donnerstag, 15. November 2012 13:15:53 UTC+1 schrieb kiteflo:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »