Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Spring Data Neo4j 2.1.0.M1 Released

  1. #11
    Join Date
    Sep 2012
    Posts
    2

    Default

    Sorry, I should have stated that I was using RC3. I wanted to post this question in a thread related to that release but couldn't find one.

    I'm not sure I'm following. I can use the latest version of Gremlin and the Gremlin console to issue queries against Neo4j v. 1.8.M07 (using some features introduced in 2.x) without problem so Neo4j seems to support it.

    Also, what I want to do is to issue queries using Gremlin from within SDN in order to get domain objects back which I assume will be a lot more complicated if I have to do it without the query support of SDN.

    In any case, thanks for the response. I will look into alternative ways to solve my problem now that I know that Gremlin 2.x won't be supported in the near future.

  2. #12

    Default

    Maybe just a little bit more clarification about dependencies with TinkerPop Gremlin:
    When I try to issue this Gremlin query:

    @Query(value = "g.v(0).out('knows')", type = QueryType.Gremlin)
    Iterable<User> findAllFriendsByName(@Param("fullName") String name);

    I get this error message:
    java.lang.IllegalStateException: Gremlin is not available, please add it to your dependencies to execute: g.v(0).out('knows')
    at org.springframework.data.neo4j.support.DelegatingG raphDatabase$FailingQueryEngine.query(DelegatingGr aphDatabase.java:255)
    at org.springframework.data.neo4j.repository.query.Gr aphRepositoryQuery.dispatchQuery(GraphRepositoryQu ery.java:91)
    at org.springframework.data.neo4j.repository.query.Gr aphRepositoryQuery.execute(GraphRepositoryQuery.ja va:70)
    at org.springframework.data.repository.core.support.R epositoryFactorySupport$QueryExecutorMethodInterce ptor.invoke(RepositoryFactorySupport.java:302)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
    at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:110)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
    at org.springframework.dao.support.PersistenceExcepti onTranslationInterceptor.invoke(PersistenceExcepti onTranslationInterceptor.java:155)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:202)
    at $Proxy32.findAllFriendsByName(Unknown Source)
    at test.Tester.shouldRetrieveAUserKnownFriends(Tester .java:75)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.junit.runners.model.FrameworkMethod$1.runRefle ctiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallabl e.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExpl osively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod .evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.e valuate(RunBefores.java:28)
    at org.springframework.test.context.junit4.statements .RunBeforeTestMethodCallbacks.evaluate(RunBeforeTe stMethodCallbacks.java:74)
    at org.junit.internal.runners.statements.RunAfters.ev aluate(RunAfters.java:31)
    at org.springframework.test.context.junit4.statements .RunAfterTestMethodCallbacks.evaluate(RunAfterTest MethodCallbacks.java:82)
    at org.springframework.test.context.junit4.statements .SpringRepeat.evaluate(SpringRepeat.java:72)
    at org.springframework.test.context.junit4.SpringJUni t4ClassRunner.runChild(SpringJUnit4ClassRunner.jav a:231)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild( BlockJUnit4ClassRunner.java:49)
    at org.junit.runners.ParentRunner$3.run(ParentRunner. java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRu nner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentR unner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRu nner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRu nner.java:184)
    at org.springframework.test.context.junit4.statements .RunBeforeTestClassCallbacks.evaluate(RunBeforeTes tClassCallbacks.java:61)
    at org.springframework.test.context.junit4.statements .RunAfterTestClassCallbacks.evaluate(RunAfterTestC lassCallbacks.java:70)
    at org.junit.runners.ParentRunner.run(ParentRunner.ja va:236)
    at org.springframework.test.context.junit4.SpringJUni t4ClassRunner.run(SpringJUnit4ClassRunner.java:174 )
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestR eference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecutio n.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:197)


    This is my (probably messed up) pom.xml:

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>MyProject</groupId>
    <artifactId>MyProject</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <dependencies>
    <dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-neo4j</artifactId>
    <version>2.0.1.RELEASE</version>
    </dependency>
    <dependency>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j-cypher</artifactId>
    <version>1.6.M02</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-test</artifactId>
    <version>3.0.6.RELEASE</version>
    <scope>test</scope>
    </dependency>
    <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.8.2</version>
    <scope>test</scope>
    </dependency>
    <dependency>
    <groupId>org.codehaus.groovy</groupId>
    <artifactId>groovy-all</artifactId>
    <version>2.0.1</version>
    </dependency>
    <dependency>
    <groupId>com.tinkerpop.gremlin</groupId>
    <artifactId>gremlin-groovy</artifactId>
    <version>2.1.0</version>
    </dependency>
    <dependency>
    <groupId>com.tinkerpop.blueprints</groupId>
    <artifactId>blueprints</artifactId>
    <version>2.1.0</version>
    <type>pom</type>
    </dependency>
    <dependency>
    <groupId>com.tinkerpop.blueprints</groupId>
    <artifactId>blueprints-core</artifactId>
    <version>2.1.0</version>
    <type>zip</type>
    </dependency>
    <dependency>
    <groupId>com.tinkerpop.blueprints</groupId>
    <artifactId>blueprints-neo4j-graph</artifactId>
    <version>2.1.0</version>
    </dependency>
    <dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-neo4j-rest</artifactId>
    <version>2.0.1.RELEASE</version>
    </dependency>
    </dependencies>
    <build>
    ...
    </build>
    </project>

  3. #13
    Join Date
    Jan 2011
    Location
    Dresden, Germany
    Posts
    525

    Default

    Can you please post this in a separate thread.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •