spring-data-neo4j

Neo4j Embedded database hangs after abnormal application termination

左心房为你撑大大i 提交于 2019-12-02 01:14:41
I'm going to make my first application based on Neo4j Embedded database public and ran into a serious blocking issue - This my previous question with database deleting where I'm faced this issue Effectively clear Neo4j database I use: OS: Windows 8.1 jdk1.8.0_51 neo4j version 2.2.3 lucene version 3.6.2 spring-data-neo4j version 3.4.0.M1 I noticed that everything works properly if I use graphDatabaseService.shutdown(); method before terminating of my application.. Otherwise database is destroyed(not only my application but even Neo4j server also hangs on this corrupted db when I try to load my

Spring Data Neo4j - How to get WrappingNeoServerBootstrapper to listen on 0.0.0.0

别等时光非礼了梦想. 提交于 2019-12-02 00:17:48
问题 Been trying to get the WrappingNeoServerBootstrapper to start the Neo4j WebAdmin interface on 0.0.0.0 instead of localhost. Tried everything form specifying JAVA_OPTS (E.g., -Dorg.neo4j.server.webserver.address=0.0.0.0), to passing my own Config in the second constructor argument of WrappingNeoServerBootstrapper - but it always listens on localhost. Hoping someone has a solutions or an example. Here is my Spring config - back to basics. Thanks in advance. <bean id="graphDatabaseService" class

Spring Data Neo4j - How to get WrappingNeoServerBootstrapper to listen on 0.0.0.0

余生长醉 提交于 2019-12-01 23:41:35
Been trying to get the WrappingNeoServerBootstrapper to start the Neo4j WebAdmin interface on 0.0.0.0 instead of localhost. Tried everything form specifying JAVA_OPTS (E.g., -Dorg.neo4j.server.webserver.address=0.0.0.0), to passing my own Config in the second constructor argument of WrappingNeoServerBootstrapper - but it always listens on localhost. Hoping someone has a solutions or an example. Here is my Spring config - back to basics. Thanks in advance. <bean id="graphDatabaseService" class="org.neo4j.kernel.EmbeddedGraphDatabase" destroy-method="shutdown"> <constructor-arg index="0" value="

Error in creating spatial Index using Spring Data neo4j

眉间皱痕 提交于 2019-12-01 22:08:07
问题 I'm working on Neo4j Spring Data project and wants to perform some spatial related operation on nodes. Entity Class @NodeEntity public class User { @GraphId Long id; private String fname; private String lname; private String uname; private String pwd; private Double latitude, longitude; @Indexed(indexType = IndexType.POINT, indexName = "geom") private String wkt; public void setLocation(Double lon, Double lat) { this.wkt = String.format("POINT( %.2f %.2f )", lon, lat); } @RelatedTo(type =

Error in creating spatial Index using Spring Data neo4j

喜欢而已 提交于 2019-12-01 21:23:37
I'm working on Neo4j Spring Data project and wants to perform some spatial related operation on nodes. Entity Class @NodeEntity public class User { @GraphId Long id; private String fname; private String lname; private String uname; private String pwd; private Double latitude, longitude; @Indexed(indexType = IndexType.POINT, indexName = "geom") private String wkt; public void setLocation(Double lon, Double lat) { this.wkt = String.format("POINT( %.2f %.2f )", lon, lat); } @RelatedTo(type = "KNOWS", direction = Direction.OUTGOING) public Set<User> knows; //getter and setter methods Controller

How to get Spring Data Neo4j and Spring Data JPA to work together?

岁酱吖の 提交于 2019-12-01 20:48:36
I have an application that does some batch jobs using MySQL and, via REST, Neo4j server version. I can't figure out how to make them to work together correctly: I can get to make work both of them, but not at the same time. The posts I've found around are not specific to the server version of Neo4j, and maybe that's where the problem is, since everything else seems ok to me. My configuration: JpaConfig @Configuration @EnableTransactionManagement(order=Ordered.HIGHEST_PRECEDENCE) @PropertySource("META-INF/database.properties") @ImportResource("classpath*:META-INF/repository.xml") public class

Neo4j how to avoid supernodes

帅比萌擦擦* 提交于 2019-12-01 20:21:05
问题 In my Neo4j project I have Role and Permission entities which represent user roles and permissions. Each User in the system has relationships to appropriate sets of roles and permissions. I think Role and Permission are some kind of supernodes that can become a major headache from a performance point of view in future. What is the best practice for this case ? How to reimplement Role and Permission in order to avoid possible issues with supernodes ? 回答1: Do you plan to make some aggregate

Spring Data Neo4J @Indexed(unique = true) not working

允我心安 提交于 2019-12-01 17:54:02
问题 I'm new to Neo4J and I have, probably an easy question. There're NodeEntitys in my application, a property (name) is annotated with @Indexed(unique = true) to achieve the uniqueness like I do in JPA with @Column(unique = true). My problem is, that when I persist an entity with a name that already exists in my graph, it works fine anyway. But I expected some kind of exception here...?! Here' s an overview over basic my code: @NodeEntity public abstract class BaseEntity implements Identifiable

Spring Data Neo4J @Indexed(unique = true) not working

梦想的初衷 提交于 2019-12-01 17:31:16
I'm new to Neo4J and I have, probably an easy question. There're NodeEntitys in my application, a property (name) is annotated with @Indexed(unique = true) to achieve the uniqueness like I do in JPA with @Column(unique = true). My problem is, that when I persist an entity with a name that already exists in my graph, it works fine anyway. But I expected some kind of exception here...?! Here' s an overview over basic my code: @NodeEntity public abstract class BaseEntity implements Identifiable { @GraphId private Long entityId; ... } public class Role extends BaseEntity { @Indexed(unique = true)

Cannot add more than one relationship between nodes in neo4j

江枫思渺然 提交于 2019-12-01 11:21:58
问题 I am trying to model a social network with Neo4J. This requires a user can have multiple relationships with another user. When I try to persist these relationships, only one is stored. For example, this is the test unit I do: @Test public void testFindConnections() { Id id1 = new Id(); id1.setId("first-node"); Id id2 = new Id(); id2.setId("second-node"); idService.save(id2); id1.connectedTo(id2, "first-rel"); id1.connectedTo(id2, "second-rel"); idService.save(id1); for (Id im : idService