当前位置: 动力学知识库 > 问答 > 编程问答 >

spring-neo4j throws exception when saves entity - Neo.ClientError.Statement.InvalidSyntax

问题描述:

i have a simple spring-neo4j project and only saves an entity. It works in windows 7 that neo4j server is started in localhost. But when i tried in another two machine(neo4j is started in localhost again) it fails with "Caused by: org.neo4j.ogm.exception.CypherException: Error executing Cypher "Neo.ClientError.Statement.InvalidSyntax". First machine is an English Windows 7 64 bit and others are Turkish Windows 7 64 bit(one is windows server). Does machine language cause that ?

DemoApplication:

@Configuration

@SpringBootApplication

@EnableNeo4jRepositories("com.rest.repository")

@EnableTransactionManagement

@ComponentScan("com")

public class DemoApplication extends Neo4jConfiguration implements CommandLineRunner {

public static void main(String[] args) {

SpringApplication.run(DemoApplication.class, args);

}

@Override

public SessionFactory getSessionFactory() {

return new SessionFactory("com.rest.model");

}

@Override

@Bean

@Scope(value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS)

public Session getSession() throws Exception {

return super.getSession();

}

@Override

public void run(String... args) throws Exception {

}

}

...and in spring controller...

@Autowired

private Session session;

..

session.save(object);

..

分享给朋友:
您可能感兴趣的文章:
随机阅读: