如何解决Neo4j查询在本地主机上运行,但是当我转到服务器时
package com.lance.db.oracle; import java.math.BigDecimal; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Query; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.cache.annotation.Cacheable; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; import org.springframework.context.annotation.PropertySources; import org.springframework.core.env.Environment; import com.lance.db.oracle.entity.ForecastTypes; @Configuration @PropertySources({ @PropertySource("classpath:sql/query.properties") }) public class OracleImpl { private static Logger logger = LogManager.getLogger(OracleImpl.class); private static EntityManagerFactory emf; private static Environment env; public static void setMyConfig(EntityManagerFactory emf,Environment env) { OracleImpl.emf = emf; OracleImpl.env = env; } public static List<ForecastTypes> forecastIDList() { EntityManager em = emf.createEntityManager(); Query q = em.createNativeQuery(env.getProperty("isForecastIDValid"),ForecastTypes.class); List<ForecastTypes> res = q.getResultList(); em.clear(); em.close(); return res; } }
当我运行neo4j PHP客户端的函数run()时,我也会尝试调试,但是我会得到任何解决方案?
正在运行查询的行会生成错误,但是我能够运行neo4j浏览器界面的查询相同。
- Php版本7.2
- 服务器ubuntu 20
- graphaware / neo4j-php-client”: “ ^ 4.0”
$ result = $ this-> client-> run(“ MATCH(n:Person)-[:FOLLOWS]->(friend) 返回n.name,收集(成为朋友)“);
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。