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
NOT IN cypher query with parameter of type List<>...
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
  3 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 May 21 2012, 8:43 am
From: kiteflo <kite...@gmail.com>
Date: Mon, 21 May 2012 05:43:27 -0700 (PDT)
Local: Mon, May 21 2012 8:43 am
Subject: NOT IN cypher query with parameter of type List<>...
Hi,

it seems there is an issue creating a NOT IN query in combination with
passed in params...this where condition works like charm:

WHERE (NOT (similar.id IN ['1','2','3'])) AND (similar.__type__ =
'Offer')

while this one will fail with a scala MatchError complaining about
some ArrayList stuff (exception is appended):

...
WHERE (NOT (similar.id IN {offerIds})) AND (similar.__type__ =
'Offer')
...

We pass in offerIds as a parameter list of strings (datatype is
correct, this is our own unique ID field): @Param("offerIds")
List<String> offerIds

We have tried several things, such as putting the param in [] for
example -> [{offerIds}] -> this one runs through smoothly but does not
take any effect in the query results, just like the filter being
ignored.

Any help is appreciated as usual, please find the exception below,
we've tried nearly anything and my guess ist that this is an issue
somewhere in the depth of neo - if so, would be great to know as well
as we will do a filtering on Java base (ugly) in this case.

Thanx, Florian;

Exception

21.05.2012 14:34:57 org.apache.catalina.core.StandardWrapperValve
invoke
SCHWERWIEGEND: Servlet.service() for servlet [dispatcher] in context
with path [/helios] threw exception [Request processing failed; nested
exception is scala.MatchError: [d053da06-e312-4633-baa9-86ee17455d8c,
b9221ac2-e578-498c-afea-53db5d50e072] (of class java.util.ArrayList)]
with root cause
scala.MatchError: [d053da06-e312-4633-baa9-86ee17455d8c, b9221ac2-
e578-498c-afea-53db5d50e072] (of class java.util.ArrayList)
        at
org.neo4j.cypher.internal.commands.InIterable.isMatch(InIterable.scala:
30)
        at org.neo4j.cypher.internal.commands.Not.isMatch(Predicate.scala:94)
        at
org.neo4j.cypher.internal.pipes.matching.SimplePatternMatcherBuilder$
$anonfun$getMatches$1$$anonfun$apply
$3.apply(SimplePatternMatcherBuilder.scala:86)
        at
org.neo4j.cypher.internal.pipes.matching.SimplePatternMatcherBuilder$
$anonfun$getMatches$1$$anonfun$apply
$3.apply(SimplePatternMatcherBuilder.scala:86)
        at scala.collection.LinearSeqOptimized
$class.forall(LinearSeqOptimized.scala:69)
        at scala.collection.immutable.List.forall(List.scala:45)
        at
org.neo4j.cypher.internal.pipes.matching.SimplePatternMatcherBuilder$
$anonfun$getMatches$1.apply(SimplePatternMatcherBuilder.scala:86)
        at
org.neo4j.cypher.internal.pipes.matching.SimplePatternMatcherBuilder$
$anonfun$getMatches$1.apply(SimplePatternMatcherBuilder.scala:78)
        at scala.collection.TraversableLike$$anonfun$flatMap
$1.apply(TraversableLike.scala:200)
        at scala.collection.TraversableLike$$anonfun$flatMap
$1.apply(TraversableLike.scala:200)
        at scala.collection.Iterator$class.foreach(Iterator.scala:652)
        at scala.collection.JavaConversions
$JIteratorWrapper.foreach(JavaConversions.scala:573)
        at scala.collection.IterableLike$class.foreach(IterableLike.scala:73)
        at scala.collection.JavaConversions
$JIterableWrapper.foreach(JavaConversions.scala:587)
        at scala.collection.TraversableLike
$class.flatMap(TraversableLike.scala:200)
        at scala.collection.JavaConversions
$JIterableWrapper.flatMap(JavaConversions.scala:587)
        at
org.neo4j.cypher.internal.pipes.matching.SimplePatternMatcherBuilder.getMat ches(SimplePatternMatcherBuilder.scala:
78)
        at
org.neo4j.cypher.internal.pipes.matching.MatchingContext.getMatches(Matchin gContext.scala:
52)
        at org.neo4j.cypher.internal.pipes.MatchPipe$$anonfun$createResults
$1.apply(MatchPipe.scala:33)
        at org.neo4j.cypher.internal.pipes.MatchPipe$$anonfun$createResults
$1.apply(MatchPipe.scala:32)
        at scala.collection.TraversableLike$$anonfun$flatMap
$1.apply(TraversableLike.scala:200)
        at scala.collection.TraversableLike$$anonfun$flatMap
$1.apply(TraversableLike.scala: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.MatchPipe.createResults(MatchPipe.scala:
32)
        at
org.neo4j.cypher.internal.pipes.FilterPipe.createResults(FilterPipe.scala:
30)
        at
org.neo4j.cypher.internal.pipes.EagerAggregationPipe.createResults(EagerAgg regationPipe.scala:
48)
        at
org.neo4j.cypher.internal.pipes.ExtractPipe.createResults(ExtractPipe.scala :
38)
        at
org.neo4j.cypher.internal.pipes.SortPipe.createResults(SortPipe.scala:
33)
        at
org.neo4j.cypher.internal.pipes.SlicePipe.createResults(SlicePipe.scala:
32)
        at
org.neo4j.cypher.internal.pipes.ColumnFilterPipe.createResults(ColumnFilter Pipe.scala:
37)
        at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun
$3$$anonfun$apply$1.apply(ExecutionPlanImpl.scala:62)
        at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun
$3$$anonfun$apply$1.apply(ExecutionPlanImpl.scala:62)
        at
org.neo4j.cypher.PipeExecutionResult.immutableResult(PipeExecutionResult.sc ala:
36)
        at
org.neo4j.cypher.PipeExecutionResult.iterator(PipeExecutionResult.scala:
138)
        at
org.neo4j.cypher.PipeExecutionResult.hasNext(PipeExecutionResult.scala:
140)
        at scala.collection.Iterator$$anon$19.hasNext(Iterator.scala:334)
        at scala.collection.JavaConversions
$IteratorWrapper.hasNext(JavaConversions.scala:562)
        at
org.neo4j.helpers.collection.IteratorWrapper.hasNext(IteratorWrapper.java:
42)
        at
org.neo4j.helpers.collection.IteratorUtil.addToCollection(IteratorUtil.java :
322)
        at
org.neo4j.helpers.collection.IteratorUtil.addToCollection(IteratorUtil.java :
341)
        at
org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.create Page(GraphRepositoryQuery.java:
107)
        at
org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.dispat chQuery(GraphRepositoryQuery.java:
88)
        at
org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.execut e(GraphRepositoryQuery.java:
70)
        at
org.springframework.data.repository.core.support.RepositoryFactorySupport
$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:
313)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec tiveMethodInvocation.java:
171)
        at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(T ransactionInterceptor.java:
110)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec tiveMethodInvocation.java:
171)
        at
org.springframework.dao.support.PersistenceExceptionTranslationInterceptor. invoke(PersistenceExceptionTranslationInterceptor.java:
155)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec tiveMethodInvocation.java:
171)
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPr oxy.java:
204)
        at $Proxy83.findRelatedOffersForOfferWithinRadiusExcluding(Unknown
Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:
25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(Aop Utils.java:
307)
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPr oxy.java:
198)
        at $Proxy84.findRelatedOffersForOfferWithinRadiusExcluding(Unknown
Source)
        at
com.helios.service.plain.OfferService.findOffersSimilarExceptVisited(OfferS ervice.java:
678)
        at
com.helios.web.controller.OfferController.detail(OfferController.java:
364)
        at com.helios.web.controller.OfferController$$FastClassByCGLIB$
$a1c74a23.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
        at org.springframework.aop.framework.Cglib2AopProxy
$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:628)
        at com.helios.web.controller.OfferController$$EnhancerByCGLIB$
$6d4a6e3b.detail(<generated>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:
25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springframework.web.method.support.InvocableHandlerMethod.invoke(Invoca bleHandlerMethod.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(DispatcherServ let.java:
900)
        at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServl et.java:
827)
        at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkSe rvlet.java:
882)
        at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.jav a:
778)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio nFilterChain.java:
305)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java:
210)
        at
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:
155)
        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.
Andres Taylor  
View profile  
 More options May 22 2012, 3:33 am
From: Andres Taylor <andres.tay...@neotechnology.com>
Date: Tue, 22 May 2012 09:33:12 +0200
Local: Tues, May 22 2012 3:33 am
Subject: Re: [Neo4j] NOT IN cypher query with parameter of type List<>...

Hi Florian,

This is a bug that has been fixed in 1.8. Is it possible for you to upgrade
to a milestone version of 1.8?

Andrés

...

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 May 22 2012, 7:36 am
From: kiteflo <kite...@gmail.com>
Date: Tue, 22 May 2012 04:36:01 -0700 (PDT)
Local: Tues, May 22 2012 7:36 am
Subject: Re: NOT IN cypher query with parameter of type List<>...
Hi Andres,

well we tried:

https://groups.google.com/group/neo4j/browse_thread/thread/478b3ed2d9...

Do you know which Logback dependencies need to be set?

Thanx, FLorian;

On 22 Mai, 09:33, Andres Taylor <andres.tay...@neotechnology.com>
wrote:

...

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 »