You delete all and after that you look for the node?
userGraphService.deleteAll(); Sent from mobile device Am 22.12.2013 um 21:31 schrieb apprentice...@googlemail.com: > Can somebody give me some feedback in relation to the "RestResultException" > (see full trace below). > > Note: I deleted the following folder in my initial attempt to clear the > database. Could this be the reason for the cause of above Exception? > I did recreate the folder but I noticed it not repopulated (as it initially > was) after restarting server. > > Folder that was deleted and recreated (it is empty): > "neo4j/bin/http/localhost:7474/db/data" from > > User Class > > @NodeEntity > public class User implements Serializable { > private static final long serialVersionUID = 1L; > @GraphId private Long id; > @Indexed private int userId; > @Indexed(unique = true) private UserSymbolEnum symbol; > @Indexed private String name; > > public User(){} > > //Accessors > //... > > @Override > public String toString(){ > return "..."; > } > } > > > Tester Class > > @Test > public final void testFindById() { > User user = createUser(); > assertEquals(1, user.getUserId()); > userGraphService.deleteAll(); > User find = userGraphService.findById(user.getId()); > assertEquals(1, find.getUserId()); > } > > private User createUser(){ > User user = new User(); > user.setUserId(1); > user.setSymbol(UserSymbolEnum.valueOf("FOO")); > user.setName("Bill"); > User saved = userGraphService.save(user); > return saved; > } > > Full Stacktrace > > org.neo4j.rest.graphdb.RestResultException: Node 242 not found at > BadInputException > > org.neo4j.server.rest.repr.RepresentationExceptionHandlingIterable.exceptionOnHasNext(RepresentationExceptionHandlingIterable.java:50) > > org.neo4j.helpers.collection.ExceptionHandlingIterable$1.hasNext(ExceptionHandlingIterable.java:60) > > org.neo4j.helpers.collection.IteratorWrapper.hasNext(IteratorWrapper.java:42) > > 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(CypherResultRepresentation.java:57) > > org.neo4j.server.rest.repr.MappingRepresentation.serialize(MappingRepresentation.java:41) > org.neo4j.server.rest.repr.OutputFormat$1.write(OutputFormat.java:145) > > org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112) > > at > org.neo4j.rest.graphdb.ExecutingRestAPI.query(ExecutingRestAPI.java:496) > at org.neo4j.rest.graphdb.RestAPIFacade.query(RestAPIFacade.java:233) > at > org.neo4j.rest.graphdb.query.RestCypherQueryEngine.query(RestCypherQueryEngine.java:50) > at > org.springframework.data.neo4j.rest.SpringRestCypherQueryEngine.query(SpringRestCypherQueryEngine.java:41) > at > org.springframework.data.neo4j.rest.SpringRestCypherQueryEngine.query(SpringRestCypherQueryEngine.java:27) > at > org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.dispatchQuery(GraphRepositoryQuery.java:108) > at > org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.execute(GraphRepositoryQuery.java:81) > at > org.springframework.data.neo4j.repository.query.DerivedCypherRepositoryQuery.execute(DerivedCypherRepositoryQuery.java:39) > at > org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:323) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > at > org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) > at > org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) > at > org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > at > org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > at > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) > at com.sun.proxy.$Proxy46.findById(Unknown Source) > at com.impl.UserImpl.findById(UserImpl.java:53) > at com.impl.UserImplTester.testFindById(UserImplTester.java:35) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:601) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) > at > org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) > at > org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) > at > org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) > at > org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) > at > org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) > at > org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) > at > org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) > at > org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) > at > org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) > at org.junit.runners.ParentRunner.run(ParentRunner.java:309) > at > org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) > at > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) > at > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to neo4j+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.