Regarding Cyper query exception

Showing 1-6 of 6 messages
Regarding Cyper query exception gokulakanna balakrishnan 5/17/12 6:08 AM
Hi All,

I am getting below exception when i added cyber query in my
repository.

Please find the exceptin below.

Caused by: java.lang.IllegalArgumentException: No property get found
for type class com.letzplay.domain.Tournament
        at
org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:
73)
        at
org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:
92)
        at
org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:
312)
        at
org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:
326)
        at
org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:
326)
        at
org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:
294)
        at
org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:
258)
        at
org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:
239)
        at
org.springframework.data.repository.query.parser.Part.<init>(Part.java:
69)
        at org.springframework.data.repository.query.parser.PartTree
$OrPart.<init>(PartTree.java:180)
        at org.springframework.data.repository.query.parser.PartTree
$Predicate.buildTree(PartTree.java:260)
        at org.springframework.data.repository.query.parser.PartTree
$Predicate.<init>(PartTree.java:240)
        at
org.springframework.data.repository.query.parser.PartTree.<init>(PartTree.java:
68)
        at
org.springframework.data.neo4j.repository.query.DerivedCypherRepositoryQuery.<init>(DerivedCypherRepositoryQuery.java:
51)
        at
org.springframework.data.neo4j.repository.query.GraphQueryMethod.createQuery(GraphQueryMethod.java:
121)
        at org.springframework.data.neo4j.repository.GraphRepositoryFactory
$1.resolveQuery(GraphRepositoryFactory.java:113)
        at
org.springframework.data.repository.core.support.RepositoryFactorySupport
$QueryExecutorMethodInterceptor.<init>(RepositoryFactorySupport.java:
268)
        at
org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:
142)
        at
org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:
114)
        at
org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:
38)
        at
org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:
142)public interface TournamentRepository extends

GraphRepository<Tournament>,RelationshipOperationsRepository<Tournament>
{

        //start
tournament=node:__types__(className="com.letzplay.domain.Tournament")
where tournament.status = {0} return tournament
        public Iterable<Tournament> getAllTournament(String status);


}

Thanks & Regards,
Gokul
Re: [Neo4j] Regarding Cyper query exception Michael Hunger 5/17/12 6:50 AM
it should look like for automatic derived queries.
> Iterable<Tournament> findByStatus(String status);
or if you want to use a manual query:

@Query("tournament=node:__types__(className="com.letzplay.domain.Tournament") where tournament.status = {0} return tournament")
> Iterable<Tournament> getAllTournament(String status);


Might make sense to index status if that is an important query.

Michael

Am 17.05.2012 um 15:08 schrieb gokulakanna balakrishnan:
Re: [Neo4j] Regarding Cyper query exception gokulakanna balakrishnan 5/17/12 7:13 AM
Hi Michael,

    I am getting compile time exception.  I have attached screen shot.
Please find the attachment.

Thanks & Regards,
Gokul
Re: [Neo4j] Regarding Cyper query exception gokulakanna balakrishnan 5/17/12 7:38 AM
Hi Michael,

      I have to select the tournament based status and
tournamentStartDate. That is why I used manual query

      @Query("start
tournament=node:__types__(className="com.letzplay.domain.Tournament")
where tournament.status = {0} and tourmanet.startDate={1} return
tournament")

      This is giving compite time exception.

      I have modified query like below. Its giving run time exception.
Please find the attachement.

      @Query("start
tournament=node:__types__(className=com.letzplay.domain.Tournament)
where tournament.status = {0} return tournament") - Its not giving
compile time exception but its giving runtime exception

Thanks & Regards,
Gokul

On Thu, May 17, 2012 at 7:20 PM, Michael Hunger
<michael...@neotechnology.com> wrote:
Re: [Neo4j] Regarding Cyper query exception Michael Hunger 5/17/12 7:55 AM
Escape your quotes.

Am 17.05.2012 um 16:38 schrieb gokulakanna balakrishnan:
> <cyperquery_run_time_exception.png>

Re: [Neo4j] Regarding Cyper query exception gokulakanna balakrishnan 5/17/12 8:25 AM
Its working fine Michael. Thanks a lot Michael.

On Thu, May 17, 2012 at 8:25 PM, Michael Hunger