spring-data-neo4j

SDN 4 - InProcessServer broken in snapshot build

谁说胖子不能爱 提交于 2019-12-02 06:01:16
Since about a week ago, running tests with InProcessServer on 4.0.0.BUILD-SNAPSHOT results in the following exception: Caused by: java.lang.NoClassDefFoundError: org/neo4j/ogm/testutil/TestServer at org.springframework.data.neo4j.server.InProcessServer.<init>(InProcessServer.java:25) ~[spring-data-neo4j-4.0.0.BUILD-SNAPSHOT-tests.jar:na] at com.ninjasquare.server.test.integration.IntegrationTestConfig.neo4jServer(IntegrationTestConfig.java:43) ~[test-classes/:na] Swithing the test dependency back to 4.0.0.M1 resolves the issue: <dependency> <groupId>org.springframework.data</groupId>

Spring Data Neo4j: Using the server with an embedded

為{幸葍}努か 提交于 2019-12-02 05:53:47
问题 I'm trying to configure my application context in order to be able to use the Neo4j server with an embedded graph in my app without much success. I'm using Spring Data at the same time (both Mongo and Neo4j repositories approach). This is my application-context, which isn't running: <context:component-scan base-package="org.domain.team.project.*"/> <mongo:repositories base-package="org.domain.team.project.data.repositories.mongodb"/> <!-- Neo4j --> <!-- <neo4j:config storeDirectory="/data

SDN BeforeSaveEvent<T> capture events before save entities != T

怎甘沉沦 提交于 2019-12-02 04:57:50
Currently I've centralized the Id creation of each NodeEntity in a BeforeSave Application Event. Something like that: @Inject IdentifierFactory identifierFactory; @Bean ApplicationListener<BeforeSaveEvent> beforeSaveEventApplicationListener() { return new ApplicationListener<BeforeSaveEvent>() { @Override public void onApplicationEvent(BeforeSaveEvent event) { if (event.getEntity() instanceof IdentifiableEntity) { IdentifiableEntity entity = (IdentifiableEntity) event.getEntity(); if (entity.getId() == null) entity.setId(identifierFactory.generateId()); } } }; This works fine. However, In my

Spring Data Neo4j: using the Neo4j server with an embedded: JAR packaging

此生再无相见时 提交于 2019-12-02 03:41:23
问题 I was finally able to create a server instance within my java app that uses the embedded database as explained here. This works properly while I'm running it from Eclipse, but this is not actually my purpose (my app, between other things, feeds the database with new nodes and relationships). I have a Neo4j box which is supposed to be my server instance and I want to deploy my app there as a JAR file. In that way, I would like to access the web interface from there. I have already tested it:

Unable to obtain lock on store lock file

a 夏天 提交于 2019-12-02 03:32:33
问题 I'm building a project with embedded Neo4j and Spring Data, and i'm having problems with file lock, i'm getting the exception: Caused by: org.neo4j.kernel.StoreLockException: Unable to obtain lock on store lock file: data/graph.db/store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access) at org.neo4j.kernel.StoreLocker.checkLock(StoreLocker.java:78) at org.neo4j.kernel.StoreLockerLifecycleAdapter.start

How to configure neo4j and cassandra repositories in same spring boot application

风格不统一 提交于 2019-12-02 02:46:17
I have configured neo4j and cassandra repositories separately with spring boot using spring-data. However, when I try to use two repositories in the same projects it doesn't work as expected. This is my folder structure. -----org.test.project -----controller BarController FooController -----models -----dao -----cassandra BarDAO FooDAO -----neo4j BarDAO FooDAO -----repositories -----cassandra BarRepository FooRepository -----neo BarRepository FooRepository -----services CassandraService (Has cassandra repositories @Autowired) NeoService(Has neo repositories @Autowired) TestApp.java Note that

Neo4j Embedded database hangs after abnormal application termination

北城余情 提交于 2019-12-02 02:36:34
问题 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

Spring Data Neo4j: Using the server with an embedded

我是研究僧i 提交于 2019-12-02 02:34:41
I'm trying to configure my application context in order to be able to use the Neo4j server with an embedded graph in my app without much success. I'm using Spring Data at the same time (both Mongo and Neo4j repositories approach). This is my application-context, which isn't running: <context:component-scan base-package="org.domain.team.project.*"/> <mongo:repositories base-package="org.domain.team.project.data.repositories.mongodb"/> <!-- Neo4j --> <!-- <neo4j:config storeDirectory="/data/production/graph.db"/> --> <neo4j:repositories base-package="org.domain.team.project.data.repositories

How do I properly set up cross-store persistence using Spring Data JPA + Neo4j?

僤鯓⒐⒋嵵緔 提交于 2019-12-02 02:22:01
问题 I am trying to get a very minimal JPA + SDN (Spring Data Neo4j) cross store project running and am trying to demonstrate that saving a partial entity using a JPA repository call will create a corresponding node in Neo4j. I have followed the instructions / advice that I have been able to find on SO, Google and Spring's site but am currently still having trouble standing things up. I currently have a minimal test project created at: https://github.com/simon-lam/sdn-cross-store-poc The project

Neo4j how to delete nodes recursively from some start node

亡梦爱人 提交于 2019-12-02 02:19:35
In my Neo4j database I have a following entities: @NodeEntity public class Product { private final static String CONTAINS = "CONTAINS"; private final static String DEFINED_BY = "DEFINED_BY"; private final static String VOTED_FOR = "VOTED_FOR"; private final static String PARENT = "PARENT"; private final static String CREATED_BY = "CREATED_BY"; @GraphId private Long id; @RelatedTo(type = PARENT, direction = Direction.INCOMING) private Product parent; @RelatedTo(type = CONTAINS, direction = Direction.OUTGOING) private Set<Product> childProducts = new HashSet<>(); @RelatedTo(type = DEFINED_BY,