brikteknologier / seraph-model

thin model layer for seraph/neo4j (node.js)
MIT License
111 stars 28 forks source link

Save (when updating) throws an error #127

Open Stono opened 7 years ago

Stono commented 7 years ago

Hey, I'm relatively new to neo4j and learning about it by using your ORM; so apologies if I have done something stupid here - however it seems on a simple update using seraph-model, i get a neo4j error.

I can't see any way from your documentation to get more verbose logging.

I am using neo4j:3.2.0, and 0.10.1 of this library.

I create a simple model like this

{ name: 'the name' }

Which returns something like this:

{ name: 'the name', id: 506 }

And then I run a .save with something like this:

{ name: 'the name updated', id: 506 }

And I get this:

{"code":"Neo.DatabaseError.Statement.ExecutionFailed","message":"Internal error - should have used fall back to execute query, but something went horribly wrong","stackTrace":"org.neo4j.cypher.in
ternal.ir.v3_2.exception.CantHandleQueryException: Internal error - should have used fall back to execute query, but something went horribly wrong\n\tat org.neo4j.cypher.internal.compiler.v3_2.ast.convert.plannerQuery.ClauseConverters$$an
onfun$addStartToLogicalPlanInput$1.apply(ClauseConverters.scala:471)\n\tat org.neo4j.cypher.internal.compiler.v3_2.ast.convert.plannerQuery.ClauseConverters$$anonfun$addStartToLogicalPlanInput$1.apply(ClauseConverters.scala:460)\n\tat org
.neo4j.cypher.internal.ir.v3_2.PlannerQuery$class.amendQueryGraph(PlannerQuery.scala:66)\n\tat org.neo4j.cypher.internal.ir.v3_2.RegularPlannerQuery.amendQueryGraph(PlannerQuery.scala:179)\n\tat org.neo4j.cypher.internal.compiler.v3_2.ast
.convert.plannerQuery.PlannerQueryBuilder$$anonfun$amendQueryGraph$1.apply(PlannerQueryBuilder.scala:34)\n\tat org.neo4j.cypher.internal.compiler.v3_2.ast.convert.plannerQuery.PlannerQueryBuilder$$anonfun$amendQueryGraph$1.apply(PlannerQu
eryBuilder.scala:34)\n\tat org.neo4j.cypher.internal.ir.v3_2.PlannerQuery$class.updateTailOrSelf(PlannerQuery.scala:81)\n\tat org.neo4j.cypher.internal.ir.v3_2.RegularPlannerQuery.updateTailOrSelf(PlannerQuery.scala:179)\n\tat org.neo4j.c
ypher.internal.compiler.v3_2.ast.convert.plannerQuery.PlannerQueryBuilder.amendQueryGraph(PlannerQueryBuilder.scala:34)\n\tat org.neo4j.cypher.internal.compiler.v3_2.ast.convert.plannerQuery.ClauseConverters$.addStartToLogicalPlanInput(Cl
auseConverters.scala:460)\n\tat org.neo4j.cypher.internal.compiler.v3_2.ast.convert.plannerQuery.ClauseConverters$.addToLogicalPlanInput(ClauseConverters.scala:41)\n\tat org.neo4j.cypher.internal.compiler.v3_2.ast.convert.plannerQuery.Sta
tementConverters$$anonfun$toPlannerQueryBuilder$1.apply(StatementConverters.scala:34)\n\tat org.neo4j.cypher.internal.compiler.v3_2.ast.convert.plannerQuery.StatementConverters$$anonfun$toPlannerQueryBuilder$1.apply(StatementConverters.sc
ala:33)\n\tat scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)\n\tat scala.collection.immutable.List.foldLeft(List.scala:84)\n\tat org.neo4j.cypher.internal.compiler.v3_2.ast.convert.plannerQuery.StatementC
onverters$.toPlannerQueryBuilder(StatementConverters.scala:33)\n\tat org.neo4j.cypher.internal.compiler.v3_2.ast.convert.plannerQuery.StatementConverters$.toUnionQuery(StatementConverters.scala:58)\n\tat org.neo4j.cypher.internal.compiler
.v3_2.phases.CreatePlannerQuery$.process(CreatePlannerQuery.scala:38)\n\tat org.neo4j.cypher.internal.compiler.v3_2.phases.CreatePlannerQuery$.process(CreatePlannerQuery.scala:29)\n\tat org.neo4j.cypher.internal.frontend.v3_2.phases.Phase
$$anonfun$transform$1.apply(Phase.scala:39)\n\tat org.neo4j.cypher.internal.frontend.v3_2.helpers.package$$anonfun$closing$1.apply(package.scala:27)\n\tat org.neo4j.cypher.internal.frontend.v3_2.helpers.package$$anonfun$closing$1.apply(pa
ckage.scala:27)\n\tat org.neo4j.cypher.internal.frontend.v3_2.helpers.package$.using(package.scala:35)\n\tat org.neo4j.cypher.internal.frontend.v3_2.helpers.package$.closing(package.scala:27)\n\tat org.neo4j.cypher.internal.frontend.v3_2.
phases.Phase$class.transform(Phase.scala:38)\n\tat org.neo4j.cypher.internal.compiler.v3_2.phases.CreatePlannerQuery$.transform(CreatePlannerQuery.scala:29)\n\tat org.neo4j.cypher.internal.frontend.v3_2.phases.PipeLine.transform(Transform
er.scala:48)\n\tat org.neo4j.cypher.internal.frontend.v3_2.phases.PipeLine.transform(Transformer.scala:52)\n\tat org.neo4j.cypher.internal.frontend.v3_2.phases.PipeLine.transform(Transformer.scala:48)\n\tat org.neo4j.cypher.internal.front
end.v3_2.phases.PipeLine.transform(Transformer.scala:52)\n\tat org.neo4j.cypher.internal.frontend.v3_2.phases.PipeLine.transform(Transformer.scala:48)\n\tat org.neo4j.cypher.internal.frontend.v3_2.phases.PipeLine.transform(Transformer.sca
la:48)\n\tat org.neo4j.cypher.internal.frontend.v3_2.phases.If.transform(Transformer.scala:83)\n\tat org.neo4j.cypher.internal.frontend.v3_2.phases.PipeLine.transform(Transformer.scala:52)\n\tat org.neo4j.cypher.internal.compiler.v3_2.Cyp
herCompiler.org$neo4j$cypher$internal$compiler$v3_2$CypherCompiler$$createPlan$1(CypherCompiler.scala:80)\n\tat org.neo4j.cypher.internal.compiler.v3_2.CypherCompiler$$anonfun$2.apply(CypherCompiler.scala:85)\n\tat org.neo4j.cypher.intern
al.compiler.v3_2.CypherCompiler$$anonfun$2.apply(CypherCompiler.scala:85)\n\tat org.neo4j.cypher.internal.compiler.v3_2.QueryCache$$anonfun$getOrElseUpdate$1$$anonfun$apply$1.apply(CacheAccessor.scala:36)\n\tat org.neo4j.cypher.internal.c
ompiler.v3_2.MonitoringCacheAccessor$$anonfun$1.apply(CacheAccessor.scala:57)\n\tat org.neo4j.cypher.internal.compiler.v3_2.LFUCache$$anon$1.apply(LFUCache.scala:31)\n\tat com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComp
uteIfAbsent$16(BoundedLocalCache.java:1973)\n\tat java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1892)\n\tat com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:1971)\n\tat
com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:1954)\n\tat com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:113)\n\tat com.github.benmanes.caffeine.cache.LocalManua
lCache.get(LocalManualCache.java:54)\n\tat org.neo4j.cypher.internal.compiler.v3_2.LFUCache.getOrElseUpdate(LFUCache.scala:30)\n\tat org.neo4j.cypher.internal.compiler.v3_2.LFUCache.apply(LFUCache.scala:48)\n\tat org.neo4j.cypher.internal
.compiler.v3_2.MonitoringCacheAccessor.getOrElseUpdate(CacheAccessor.scala:55)\n\tat org.neo4j.cypher.internal.compiler.v3_2.QueryCache$$anonfun$getOrElseUpdate$1.apply(CacheAccessor.scala:34)\n\tat scala.collection.Iterator$$anon$9.next(
Iterator.scala:162)\n\tat scala.collection.Iterator$$anon$12.nextCur(Iterator.scala:434)\n\tat scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:440)\n\tat scala.collection.Iterator$$anon$12.next(Iterator.scala:444)\n\tat org.neo4
j.cypher.internal.compiler.v3_2.QueryCache.getOrElseUpdate(CacheAccessor.scala:46)\n\tat org.neo4j.cypher.internal.compiler.v3_2.CypherCompiler.planPreparedQuery(CypherCompiler.scala:85)\n\tat org.neo4j.cypher.internal.compatibility.v3_2.
Compatibility$$anon$1$$anonfun$plan$1.apply(Compatibility.scala:72)\n\tat org.neo4j.cypher.internal.compatibility.v3_2.Compatibility$$anon$1$$anonfun$plan$1.apply(Compatibility.scala:69)\n\tat org.neo4j.cypher.internal.compatibility.v3_2.
exceptionHandler$runSafely$.apply(exceptionHandler.scala:90)\n\tat org.neo4j.cypher.internal.compatibility.v3_2.Compatibility$$anon$1.plan(Compatibility.scala:69)\n\tat org.neo4j.cypher.internal.ExecutionEngine.org$neo4j$cypher$internal$E
xecutionEngine$$producePlan$1(ExecutionEngine.scala:167)\n\tat org.neo4j.cypher.internal.ExecutionEngine$$anonfun$liftedTree1$1$1.apply(ExecutionEngine.scala:170)\n\tat org.neo4j.cypher.internal.ExecutionEngine$$anonfun$liftedTree1$1$1.ap
ply(ExecutionEngine.scala:170)\n\tat org.neo4j.cypher.internal.compiler.v3_2.QueryCache$$anonfun$getOrElseUpdate$1$$anonfun$apply$1.apply(CacheAccessor.scala:36)\n\tat org.neo4j.cypher.internal.compiler.v3_2.MonitoringCacheAccessor$$anonf
un$1.apply(CacheAccessor.scala:57)\n\tat org.neo4j.cypher.internal.compiler.v3_2.LFUCache$$anon$1.apply(LFUCache.scala:31)\n\tat com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$16(BoundedLocalCache.java:1973)
\n\tat java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1853)\n\tat com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:1971)\n\tat com.github.benmanes.caffeine.cache.BoundedL
ocalCache.computeIfAbsent(BoundedLocalCache.java:1954)\n\tat com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:113)\n\tat com.github.benmanes.caffeine.cache.LocalManualCache.get(LocalManualCache.java:54)\n\tat
org.neo4j.cypher.internal.compiler.v3_2.LFUCache.getOrElseUpdate(LFUCache.scala:30)\n\tat org.neo4j.cypher.internal.compiler.v3_2.LFUCache.apply(LFUCache.scala:48)\n\tat org.neo4j.cypher.internal.compiler.v3_2.MonitoringCacheAccessor.getO
rElseUpdate(CacheAccessor.scala:55)\n\tat org.neo4j.cypher.internal.compiler.v3_2.QueryCache$$anonfun$getOrElseUpdate$1.apply(CacheAccessor.scala:34)\n\tat scala.collection.Iterator$$anon$9.next(Iterator.scala:162)\n\tat scala.collection.
Iterator$$anon$12.nextCur(Iterator.scala:434)\n\tat scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:440)\n\tat scala.collection.Iterator$$anon$12.next(Iterator.scala:444)\n\tat org.neo4j.cypher.internal.compiler.v3_2.QueryCache.
getOrElseUpdate(CacheAccessor.scala:46)\n\tat org.neo4j.cypher.internal.ExecutionEngine.liftedTree1$1(ExecutionEngine.scala:170)\n\tat org.neo4j.cypher.internal.ExecutionEngine.planQuery(ExecutionEngine.scala:156)\n\tat org.neo4j.cypher.i
nternal.ExecutionEngine.execute(ExecutionEngine.scala:106)\n\tat org.neo4j.cypher.internal.javacompat.ExecutionEngine.executeQuery(ExecutionEngine.java:61)\n\tat org.neo4j.server.rest.transactional.TransactionHandle.safelyExecute(Transact
ionHandle.java:371)\n\tat org.neo4j.server.rest.transactional.TransactionHandle.executeStatements(TransactionHandle.java:323)\n\tat org.neo4j.server.rest.transactional.TransactionHandle.commit(TransactionHandle.java:157)\n\tat org.neo4j.s
erver.rest.web.TransactionalService.lambda$executeStatementsAndCommit$1(TransactionalService.java:217)\n\tat com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)\n\tat com.sun.jersey.co
re.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)\n\tat com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:302)\n\tat com.sun.jersey.server.impl.application.WebApplicationImp
l._handleRequest(WebApplicationImpl.java:1510)\n\tat com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)\n\tat com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebAp
plicationImpl.java:1409)\n\tat com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)\n\tat com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)\n\tat com.sun.jersey.spi.contai
ner.servlet.ServletContainer.service(ServletContainer.java:733)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\n\tat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)\n\tat org.eclipse.jetty.servle
t.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)\n\tat org.neo4j.server.rest.dbms.AuthorizationEnabledFilter.doFilter(AuthorizationEnabledFilter.java:122)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(
ServletHandler.java:1652)\n\tat org.neo4j.server.rest.web.CollectUserAgentFilter.doFilter(CollectUserAgentFilter.java:69)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\n\tat org.eclipse.jett
y.servlet.ServletHandler.doHandle(ServletHandler.java:585)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)\n\
tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHand
ler.java:1061)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle
(HandlerWrapper.java:97)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:497)\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:25
7)\n\tat org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedTh
readPool.java:555)\n\tat java.lang.Thread.run(Thread.java:745)\n"}
skbolton commented 7 years ago

I am actually running into the same problem. Did you figure it out @Stono?