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
SDN finder method throws EXCEPTION when params have white spaces
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
  11 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
 
Abdul Azeez Shaik  
View profile  
 More options Sep 1 2012, 12:22 pm
From: Abdul Azeez Shaik <azeeztechni...@gmail.com>
Date: Sat, 1 Sep 2012 21:52:34 +0530
Local: Sat, Sep 1 2012 12:22 pm
Subject: SDN finder method throws EXCEPTION when params have white spaces

Hi,

SDN finder method is failing with REstResultException whenever spaces are
there in parameters.
Here is my use case,
@NodeEntiry
Class User{

*@Indexed(indexName="username", indexType=IndexType.FULLTEXT)*

* String username;*}
Here is my finder function in repository

*User findByusername(String username);*
Here is my finder call,

User user =  userRepo.findByusername("Spring data"); This call throws below
exception...

However, everything works file, when param is just "Spring"

Kindly let me know your suggestions to resolve this.

Exception:

21:01:47,670 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/netvog ueweb].[dispatcher]]
(http--127.0.0.1-8080-6) Servlet.service() for servlet dispatcher threw
exception: org.neo4j.rest.graphdb.RestResultException: null at

BadInputException

 org.neo4j.server.rest.repr.RepresentationExceptionHandlingIterable.exceptio nOnHasNext(RepresentationExceptionHandlingIterable.java:51)

 org.neo4j.helpers.collection.ExceptionHandlingIterable$1.hasNext(ExceptionH andlingIterable.java:61)

 org.neo4j.helpers.collection.IteratorWrapper.hasNext(IteratorWrapper.java:4 2)

 org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation. java:58)

   org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:75)

 org.neo4j.server.rest.repr.MappingSerializer.putList(MappingSerializer.java :61)

 org.neo4j.server.rest.repr.CypherResultRepresentation.serialize(CypherResul tRepresentation.java:50)

 org.neo4j.server.rest.repr.MappingRepresentation.serialize(MappingRepresent ation.java:42)

   org.neo4j.server.rest.repr.OutputFormat$1.write(OutputFormat.java:133)

 org.neo4j.server.statistic.StatisticFilter.doFilter(StatisticFilter.java:62 )

at org.neo4j.rest.graphdb.ExecutingRestAPI.query(ExecutingRestAPI.java:488)
[neo4j-rest-graphdb-1.8.RC1.jar:1.8.RC1]

at org.neo4j.rest.graphdb.RestAPIFacade.query(RestAPIFacade.java:231)
[neo4j-rest-graphdb-1.8.RC1.jar:1.8.RC1]

at
org.neo4j.rest.graphdb.query.RestCypherQueryEngine.query(RestCypherQueryEng ine.java:50)
[neo4j-rest-graphdb-1.8.RC1.jar:1.8.RC1]

 at
org.springframework.data.neo4j.rest.SpringRestCypherQueryEngine.query(Sprin gRestCypherQueryEngine.java:41)
[spring-data-neo4j-rest-2.1.0.RC3.jar:]

 at
org.springframework.data.neo4j.rest.SpringRestCypherQueryEngine.query(Sprin gRestCypherQueryEngine.java:27)
[spring-data-neo4j-rest-2.1.0.RC3.jar:]

 at
org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.dispat chQuery(GraphRepositoryQuery.java:96)
[spring-data-neo4j-2.1.0.RC3.jar:]

 at
org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.execut e(GraphRepositoryQuery.java:70)
[spring-data-neo4j-2.1.0.RC3.jar:]

 at
org.springframework.data.neo4j.repository.query.DerivedCypherRepositoryQuer y.execute(DerivedCypherRepositoryQuery.java:36)
[spring-data-neo4j-2.1.0.RC3.jar:]

at
org.springframework.data.repository.core.support.RepositoryFactorySupport$Q ueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:313)
[spring-data-commons-core-1.4.0.RC1.jar:]

at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec tiveMethodInvocation.java:172)
[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]

at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(T ransactionInterceptor.java:110)
[spring-tx-3.0.7.RELEASE.jar:3.0.7.RELEASE]

at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec tiveMethodInvocation.java:172)
[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]

at
org.springframework.dao.support.PersistenceExceptionTranslationInterceptor. invoke(PersistenceExceptionTranslationInterceptor.java:155)
[spring-tx-3.0.7.RELEASE.jar:3.0.7.RELEASE]

at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec tiveMethodInvocation.java:172)
[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]

at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPr oxy.java:202)
[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]

 at $Proxy290.findByusername(Unknown Source) at
org.netvogue.server.neo4japi.service.BoutiqueServiceImpl.GetOrCreateUser(Bo utiqueServiceImpl.java:83)
[netvogue-database-api-1.0-SNAPSHOT.jar:]

at
org.netvogue.server.webmvc.converters.UserConverterFactory$UserConverter.co nvert(UserConverterFactory.java:70)
[classes:]

Thanks,

Abdul


 
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 Sep 1 2012, 3:19 pm
From: Michael Hunger <michael.hun...@neopersistence.com>
Date: Sat, 1 Sep 2012 21:19:27 +0200
Local: Sat, Sep 1 2012 3:19 pm
Subject: Re: [Neo4j] SDN finder method throws EXCEPTION when params have white spaces

You have to quote it. With \"

Sent from mobile device

Am 01.09.2012 um 18:22 schrieb Abdul Azeez Shaik <azeeztechni...@gmail.com>:


 
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.
Abdul Azeez Shaik  
View profile  
 More options Sep 2 2012, 6:25 pm
From: Abdul Azeez Shaik <azeeztechni...@gmail.com>
Date: Mon, 3 Sep 2012 03:54:48 +0530
Local: Sun, Sep 2 2012 6:24 pm
Subject: Re: [Neo4j] SDN finder method throws EXCEPTION when params have white spaces

Thanks for the information Michael.
Have another issue with executing Cypher query from SDN.
It works fine, when i executed on neo4j console. Issue is with passing
parameter. Can you please correct me?

@Query( "START n=node:search(\"name:*{brandname}*\") RETURN n")

Iterable<Brand> findBynameSearch(@Param("brandname") String brandname);
Exception is:
exception: org.neo4j.rest.graphdb.RestResultException:
org.apache.lucene.queryParser.ParseException: Cannot parse
'name:*{brandname}*': Encountered " "}" "} "" at line 1, column 16.
Was expecting one of:
    "TO" ...
    <RANGEEX_QUOTED> ...
    <RANGEEX_GOOP> ...
     at

On Sun, Sep 2, 2012 at 12:49 AM, Michael Hunger <


 
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 Sep 2 2012, 7:02 pm
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Mon, 3 Sep 2012 01:04:39 +0200
Local: Sun, Sep 2 2012 7:04 pm
Subject: Re: [Neo4j] SDN finder method throws EXCEPTION when params have white spaces

You have to pass in the whole index-query string:

> @Query( "START n=node:search({query}) RETURN n")

> Iterable<Brand> findBynameSearch(@Param("query") String query);

String query = \"name:*"+brandname+"*\"

Am 03.09.2012 um 00:24 schrieb Abdul Azeez Shaik:


 
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.
Abdul Azeez Shaik  
View profile  
 More options Sep 2 2012, 7:28 pm
From: Abdul Azeez Shaik <azeeztechni...@gmail.com>
Date: Mon, 3 Sep 2012 04:58:35 +0530
Local: Sun, Sep 2 2012 7:28 pm
Subject: Re: [Neo4j] SDN finder method throws EXCEPTION when params have white spaces

It worked in first trail itself. Thanks for the quick response.

On Mon, Sep 3, 2012 at 4:34 AM, Michael Hunger <


 
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.
Abdul Azeez Shaik  
View profile  
 More options Sep 3 2012, 12:37 am
From: Abdul Azeez Shaik <azeeztechni...@gmail.com>
Date: Mon, 3 Sep 2012 10:06:53 +0530
Local: Mon, Sep 3 2012 12:36 am
Subject: Re: [Neo4j] SDN finder method throws EXCEPTION when params have white spaces

Hi Michael,

This one is not working with pattern matching.
for example,
START n=node:search("name:\"abdul azeez\"") RETURN n; -- WORKING
START n=node:search("name:*abdul*") RETURN n; -- WORKING
START n=node:search("name:\"*abdul*\"") RETURN n; -- NOT WORKING
START n=node:search("name:\"*abdul azeez*\"") RETURN n; -- NOT WORKING

Is there a way to work while spaces and pattern matching in same query
param?

Thanks,
Abdul

On Sun, Sep 2, 2012 at 12:49 AM, Michael Hunger <


 
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 Sep 3 2012, 1:08 am
From: Michael Hunger <michael.hun...@neopersistence.com>
Date: Mon, 3 Sep 2012 07:08:25 +0200
Local: Mon, Sep 3 2012 1:08 am
Subject: Re: [Neo4j] SDN finder method throws EXCEPTION when params have white spaces

Try to put the stars outside the quotes

Sent from mobile device

Am 03.09.2012 um 06:36 schrieb Abdul Azeez Shaik <azeeztechni...@gmail.com>:


 
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.
Abdul Azeez Shaik  
View profile  
 More options Sep 3 2012, 2:39 am
From: Abdul Azeez Shaik <azeeztechni...@gmail.com>
Date: Mon, 3 Sep 2012 12:09:15 +0530
Local: Mon, Sep 3 2012 2:39 am
Subject: Re: [Neo4j] SDN finder method throws EXCEPTION when params have white spaces

I tried that. Its not working.
I tried directly on neo4j console itself.

On Mon, Sep 3, 2012 at 10:38 AM, Michael Hunger <


 
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.
Peter Neubauer  
View profile  
 More options Sep 3 2012, 4:45 am
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Mon, 3 Sep 2012 10:44:59 +0200
Local: Mon, Sep 3 2012 4:44 am
Subject: Re: [Neo4j] SDN finder method throws EXCEPTION when params have white spaces
Abdul,
there are several layers of String processing going on, including
Lucene processing the String, try more escapes :)

start n=node:node_auto_index("name:Neo\\\"") return n

http://console.neo4j.org/r/jyrcyv

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Wanna learn something new? Come to @graphconnect.

On Mon, Sep 3, 2012 at 8:39 AM, Abdul Azeez Shaik


 
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.
Abdul Azeez Shaik  
View profile  
 More options Sep 3 2012, 9:28 am
From: Abdul Azeez Shaik <azeeztechni...@gmail.com>
Date: Mon, 3 Sep 2012 18:58:09 +0530
Local: Mon, Sep 3 2012 9:28 am
Subject: Re: [Neo4j] SDN finder method throws EXCEPTION when params have white spaces

I tried in below ways, it throws "Invalid escape sequence"
START n=node:search("name:\*\"abdul azeez\"\*") RETURN n; -- NOT WORKING
START n=node:search("name:\"\*abdul azeez\*\"") RETURN n; -- NOT WORKING

On Mon, Sep 3, 2012 at 2:14 PM, Peter Neubauer <


 
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.
Peter Neubauer  
View profile  
 More options Sep 3 2012, 9:34 am
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Mon, 3 Sep 2012 15:33:57 +0200
Local: Mon, Sep 3 2012 9:33 am
Subject: Re: [Neo4j] SDN finder method throws EXCEPTION when params have white spaces
Abdul,
I think you need three \\\ for every escape " and \\ for *, see

START n=node:node_auto_index("name:\\\"\\*abdul azeez\\*\\\"") RETURN n;

http://console.neo4j.org/r/n5ndyp

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Wanna learn something new? Come to @graphconnect.

On Mon, Sep 3, 2012 at 3:28 PM, Abdul Azeez Shaik


 
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 »