public interface BoutiqueRepository extends GraphRepository<Boutique>{
Boutique findByboutiqueName(String boutiqueName);
}
From service code, where am calling deleteall function,
@Autowired BoutiqueRepository boutiqueRepo;
public ResultStatus deleteAll() {
boutiqueRepo.deleteAll();
return ResultStatus.SUCCESS;
public ResultStatus deleteAll() {
//boutiqueRepo.deleteAll();
Map<String, Object> temp = new HashMap<String, Object>();
Result<Map<String, Object>> result = neo4jTemplate.query("START n = node(*) DELETE n", temp);
return ResultStatus.SUCCESS;
}
Here is the error,
Exception in thread "main" org.neo4j.rest.graphdb.RestResultException: Unable to begin transaction at
org.neo4j.graphdb.TransactionFailureException: Unable to begin transaction
org.neo4j.kernel.AbstractGraphDatabase.beginTx(AbstractGraphDatabase.java:771)
org.neo4j.kernel.TransactionBuilderImpl.begin(TransactionBuilderImpl.java:39)
org.neo4j.kernel.AbstractGraphDatabase.beginTx(AbstractGraphDatabase.java:749)
org.neo4j.cypher.internal.pipes.TransactionStartPipe.createResults(TransactionStartPipe.scala:26)
org.neo4j.cypher.internal.pipes.ExecuteUpdateCommandsPipe.createResults(ExecuteUpdateCommandsPipe.scala:35)
org.neo4j.cypher.internal.pipes.EmptyResultPipe.createResults(EmptyResultPipe.scala:28)
org.neo4j.cypher.internal.pipes.EmptyResultPipe.createResults(EmptyResultPipe.scala:24)
org.neo4j.cypher.internal.pipes.CommitPipe.createResults(CommitPipe.scala:30)
org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun$5$$anonfun$apply$3.apply(ExecutionPlanImpl.scala:104)
org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun$5$$anonfun$apply$3.apply(ExecutionPlanImpl.scala:104)
org.neo4j.cypher.PipeExecutionResult.immutableResult(PipeExecutionResult.scala:36)
org.neo4j.cypher.EagerPipeExecutionResult.<init>(PipeExecutionResult.scala:171)
org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun$5.apply(ExecutionPlanImpl.scala:104)
org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun$5.apply(ExecutionPlanImpl.scala:102)
org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl.execute(ExecutionPlanImpl.scala:34)
org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:55)
org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:58)
org.neo4j.cypher.javacompat.ExecutionEngine.execute(ExecutionEngine.java:86)
org.neo4j.server.rest.web.CypherService.cypher(CypherService.java:67)
java.lang.reflect.Method.invoke(Method.java:597)
org.neo4j.server.statistic.StatisticFilter.doFilter(StatisticFilter.java:62)
at org.neo4j.rest.graphdb.query.RestCypherQueryEngine.query(RestCypherQueryEngine.java:60)
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.support.Neo4jTemplate.query(Neo4jTemplate.java:519)
at org.tieup.server.neo4japi.service.BoutiqueServiceImpl.deleteAll(BoutiqueServiceImpl.java:60)
at org.tieup.server.neo4japi.core.start.main(start.java:37)
Could anyone me throw me some pointers to resolve these two issues?
Thanks,
Abdul