neo4j,spring-data,spring-boot,spring-data-neo4j,neo4j-spatial , No index provider spatial found : Embedded Neo4j


No index provider spatial found : Embedded Neo4j

Question:

Tag: neo4j,spring-data,spring-boot,spring-data-neo4j,neo4j-spatial
            <?xml version="1.0" encoding="UTF-8"?>
            <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
                <modelVersion>4.0.0</modelVersion>

                <groupId>com.erranda</groupId>
                <artifactId>prototype</artifactId>
                <version>1.0.0</version>

                <parent>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-parent</artifactId>
                    <version>1.2.1.RELEASE</version>
                </parent>
                <properties>
                    <wicket.version>6.18.0</wicket.version>
                </properties>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.wicket</groupId>
                        <artifactId>wicket-core</artifactId>
                        <version>${wicket.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.wicket</groupId>
                        <artifactId>wicket-spring</artifactId>
                        <version>${wicket.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.wicket</groupId>
                        <artifactId>wicket-extensions</artifactId>
                        <version>${wicket.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.wicket</groupId>
                        <artifactId>wicket-auth-roles</artifactId>
                        <version>${wicket.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.wicketstuff</groupId>
                        <artifactId>wicketstuff-htmlcompressor</artifactId>
                        <version>6.18.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter</artifactId>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-context</artifactId>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-tx</artifactId>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.data</groupId>
                        <artifactId>spring-data-neo4j</artifactId>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-data-rest</artifactId>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-test</artifactId>
                        <scope>test</scope>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-web</artifactId>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-jetty</artifactId>
                    </dependency>
                    <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-validator</artifactId>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>commons-lang3</artifactId>
                        <version>3.3.2</version>
                    </dependency>
                    <dependency>
                        <groupId>joda-time</groupId>
                        <artifactId>joda-time</artifactId>
                        <version>2.6</version>
                    </dependency>
                    <!-- Javax Mail -->
                    <dependency>
                        <groupId>javax.mail</groupId>
                        <artifactId>mail</artifactId>
                        <version>1.4</version>
                    </dependency>

                    <!-- Geocoding -->
                    <dependency>
                        <groupId>com.google.code.geocoder-java</groupId>
                        <artifactId>geocoder-java</artifactId>
                        <version>0.16</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.data</groupId>
                        <artifactId>spring-data-neo4j-rest</artifactId>
                        <version>3.2.1.RELEASE</version>
                    </dependency>
                    <dependency>
                        <groupId>com.vaynberg.wicket.select2</groupId>
                        <artifactId>wicket-select2</artifactId>
                        <version>2.3</version>
                    </dependency>
                    <!-- Commons -->
                    <dependency>
                        <groupId>commons-collections</groupId>
                        <artifactId>commons-collections</artifactId>
                    </dependency>
                    <dependency>
                        <groupId>org.neo4j</groupId>
                        <artifactId>neo4j-spatial</artifactId>
                        <version>0.9</version>
                    </dependency>
                </dependencies>

                <build>
                    <resources>
                        <resource>
                            <!-- Copy wicket HTML and other resource files from the java directory -->
                            <filtering>false</filtering>
                            <directory>${basedir}/src/main/java</directory>
                            <includes>
                                <include>**/*.html</include>
                                <include>**/*.js</include>
                                <include>**/*.png</include>
                                <include>**/*.css</include>
                                <include>**/*.jpg</include>
                                <include>**/*.properties</include>
                            </includes>
                            <excludes>
                                <exclude>**/*.java</exclude>
                            </excludes>
                        </resource>
                        <resource>
                            <directory>${basedir}/src/main/resources</directory>
                        </resource>
                    </resources>
                    <plugins>
                        <plugin>
                            <artifactId>maven-compiler-plugin</artifactId>
                            <version>3.1</version>
                        </plugin>
                        <plugin>
                            <groupId>org.springframework.boot</groupId>
                            <artifactId>spring-boot-maven-plugin</artifactId>
                        </plugin>
                    </plugins>
                </build>

                <repositories>
                    <repository>
                        <id>spring-releases</id>
                        <name>Spring Releases</name>
                        <url>http://repo.spring.io/libs-release</url>
                    </repository>
                    <repository>
                        <id>neo4j-public-release-repository</id>
                        <url>http://m2.neo4j.org/releases</url>
                        <snapshots>
                            <enabled>false</enabled>
                        </snapshots>
                    </repository>
                </repositories>

                <pluginRepositories>
                    <pluginRepository>
                        <id>spring-releases</id>
                        <name>Spring Releases</name>
                        <url>http://repo.spring.io/libs-release</url>
                    </pluginRepository>
                </pluginRepositories>

            </project>

http://docs.spring.io/spring-data/neo4j/docs/3.0.2.RELEASE/reference/html/programming-model.html#reference_spatial

The link appears to be misleading because on adding the dependency to my pom file I still get the subject error. This however is not the case when I run it against a server with a spatial plugin.


Answer:

Use this repository in your maven pom

            <repository>
                        <id>neo4j-contrib-releases</id>
                        <url>https://raw.github.com/neo4j-contrib/m2/master/releases</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>false</enabled>
                        </snapshots>
                    </repository>
                    <repository>
                        <id>neo4j-contrib-snapshots</id>
                        <url>https://raw.github.com/neo4j-contrib/m2/master/snapshots</url>
                        <releases>
                            <enabled>false</enabled>
                        </releases>
                        <snapshots>
                            <enabled>true</enabled>
                        </snapshots>
                    </repository>

with the dependency

                <dependency>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-spatial</artifactId>
                    <version>0.13-neo4j-2.1.2</version>
                </dependency>

Related:


Are my Cypher statements 'overdone'


neo4j,py2neo
I am using py2neo with transactions. This means I am using the Cypher language. I am appending the textual Cypher statements to a transaction queue and submitting the contents of the queue in one shot with commit. It works fine. However, it is slow. I am getting about 100/nodes per...

neo4j Nodes Deleted (but not Actually)


neo4j,graph-databases
I would like to delete all the nodes of a certain label by executing match (P:ALabel) delete P; This returns the comment "No data returned." It also states how many Nodes deleted, and how long it took (5767 ms). However, the shell seems to stop responding after this, and I...

What is the most performant way to create the following MATCH statement and why?


neo4j,cypher
The question: What is the most performant way to create the following MATCH statement and why? The detailed problem: Let's say we have a Place node with a variable amount of properties and need to look up nodes from potentially billions of nodes by it's category. I'm trying to wrap...

org.hibernate.exception.SQLGrammarException: could not prepare statement; nested exception is javax.persistence.PersistenceException


java,spring,hibernate,jpa,spring-data
I have 3 entity classes Ooline: @Entity @IdClass(OolineId.class) @NamedQuery(name="Ooline.findAll", query="SELECT o FROM Ooline o") public class Ooline implements Serializable { private static final long serialVersionUID = 1L; @ManyToOne(fetch = FetchType.LAZY) @JoinColumns({ @JoinColumn(name="mitmas_mmcono" , referencedColumnName="mmcono"), @JoinColumn(name="mitmas_mmitno" , referencedColumnName="mmitno") }) private Mitmas mitmas ; @ManyToOne(fetch = FetchType.LAZY) @JoinColumns({ @JoinColumn(name="mitfac_m9cono",...

Is it possible to use neo4j-reco with neo4j 1.9?


neo4j,recommendation-engine,graphaware
The title says pretty much all. I'm trying to use neo4j-reco by GraphAware on top of neo4j-1.9. However, I don't know if it is possible at this time.

Getting error org.neo4j.rest.graphdb.entity.RestNode cannot be cast to java.lang.Iterable


neo4j,spring-data-neo4j
I am trying to filter feeds which contains user actvitity. I am using @QueryResult object to retrieve the result. I need both the feeds and the relationship information of user Liked Feeds. But while retrieving the feeds getting error: org.neo4j.rest.graphdb.entity.RestNode cannot be cast to java.lang.Iterable. (I am using SDN 3.3.0.RELEASE...

Is it possible to connect a JPA implementation to a Neo4j specific version?


jpa,neo4j,datanucleus,kundera,hibernate-ogm
I have a Java project that use an embedded Neo4j database (NoSQL), version 2.0.0. I need to migrate this data for a traditional relational db (SQL). For this job, I thought that using an implementation of JPA could help. I found these three projects: Hibernate OGM DataNucleus Kundera But I...

Assigning a label to a created node in Neo4jClient


c#,graph,neo4j,neo4jclient
I want to create some nodes of type Person and Books using Neo4jClient. To do that, I have class Person like this: Public Class Person { Public String Name; } To create node, I have written something like this: Var RefA = client.Create(new Person(){Name ="John"}); (Client -> GraphicClient) When I...

Cyper - odd error when creating relationship


neo4j,cypher
I've got the following query, which responds with the very cryptic error message of "Invalid input 'H': expected 'i/I' (line 2, column 2)" Here's the query: CREATE UNIQUE (c:AccountCharge)-[:ACCOUNT_CHARGED]->(a:Account) WHERE (a.ID = "a7f7def6-8f2b-4b21-bfac-dab2f6e6eaae") AND (c.ID = "666b1865-e29d-455b-abb0-50d679952543") Both the nodes exist, and I can't see where there's a break anywhere,...

spring data null arguments


spring,spring-data,spring-data-jpa
I am trying to implement the service for a rest controller that takes optional filter parameters like first name, last name, age, etc. I want to use a JpaRepository method like below. The problem is, if a parameter is null then no records are found. When a argument is null...

Redis Serialization and Deserialization


redis,deserialization,spring-data,serializable,spring-data-redis
I have noticed that some of my serialized objects stored in Redis have problems deserializing. This typically occurs when I make changes to the object class being stored in Redis. I want to understand the problem so that I can have a clear design for a solution. My question is,...

com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of org.springframework.data.domain.Sort out of START_ARRAY token


java,json,jackson,spring-data
My objectMapper is fetching the value of type Page<User> as follows: userList = objectMapper.readValue(RestAdapter.get(url), new TypeReference<PageImplBean<User>>(){}); The PageImplBean extends PageImpl class as follows: public class PageImplBean<T> extends PageImpl<T> { private static final long serialVersionUID = 1L; private int number; private int size; private int totalPages; private int numberOfElements; private long...

Limit the results of a union cypher query


neo4j,cypher
Let's say we have the example query from the documentation: MATCH (n:Actor) RETURN n.name AS name UNION MATCH (n:Movie) RETURN n.title AS name I know that if I do that: MATCH (n:Actor) RETURN n.name AS name LIMIT 5 UNION MATCH (n:Movie) RETURN n.title AS name LIMIT 5 I can reduce...

Neo4j cypher query is too slow(too many dbhits) in bidirectional relationship


neo4j,cypher
Having the flowing data model: (Phone{phoneNumber})-[:CALL]-(Phone{phoneNumber}) (Person{personId})-[:KEEP]-(Phone{personId}) (Case{caseId})-[:INVOLVE]-(Person{personId}) all these three are using bidirectional relationship. And created index on phoneNumber/personId/caseId. User can input one or more strings which maybe represent as phoneNumber/ caseId/personId to query for their relationships(NOT consider direction and relationship depth can be 1 to 4). Here is...

Understanding Options for Building TimeTree in Neo4


neo4j,graphaware
Is it possible to construct something like GraphAware's TimeTree using Neo4j's CLI, GraphAware's importer, Michael Hunger's batch import, or with py2neo? It would be optimal to be able to do this using Neo4j's CLI (in terms of set up). I want to be able to search for a certain kind...

Spring data repository QueryDslPredicateExecutor without pageable count


spring,spring-data,spring-data-jpa,querydsl
I'm trying to create a spring data repository with a method to list a page of entities and a QueryDSL predicate using this: public interface EntityRespository extends JpaRepository<Entity, Integer>, QueryDslPredicateExecutor<Entity> { List<Entity> findAllBy(Predicate predicate, Pageable pageable); } As mentioned here Way to disable count query from PageRequest for getting total...

Symbols within a Neo4j case-insensitive regex


regex,neo4j,cypher
I'm storing e-mail addresses within some user nodes that I'm trying to match against, however the (?i) case-insensitive option doesn't appear to work when a + is added in the mail address. I use these to test, for example [email protected] Setting up test nodes: CREATE (uWithoutSymbol:USER { email: '[email protected]' })...

Mongotemplate - Query ObjectId according to greater than (gt) or less than (lt) operator


mongodb,spring-data,objectid
When I type this into my consol, it works: db.posts.find({"_id": {$lt:ObjectId("55732dccf58c555b6d3f1c5a")}}).limit(5).sort({"_id":-1}) When I use mongotemplate, it doesn't work and returns a blank array: @RequestMapping(value="/next", method=RequestMethod.GET) public List getNextPost(@RequestParam String next) { Query query = new Query(); query.addCriteria(Criteria.where("_id").lt("55732dccf58c555b6d3f1c5a")); List<Posts> posts = template.find(query, Posts.class); return posts; } I tried it with this...

Parsing Neo4j ExecutionResult dumptoString in java


java,neo4j
I am using Neo4j graph database and the Neo4j Cypher api of java to get the query result.A dump to string method will give the execution result in the string format. GraphDatabaseFactory graphDbFactory = new GraphDatabaseFactory(); GraphDatabaseService graphDb = graphDbFactory.newEmbeddedDatabase("C:/TPNeo4jDB"); ExecutionEngine execEngine = new ExecutionEngine(graphDb); ExecutionResult execResult = execEngine.execute("MATCH (java:JAVA)...

How do I get the Neo4J primary key back in a query result?


neo4j,cypher
I'm using the rest api, and cypher. How do I get back the primary key when doing a query like this for a node with some id that I have assigned to it? {"statements" : [ {"statement" : "MATCH (n) where n.id = { id } RETURN n", "parameters" :...

How do I create a Neo4j relationship via the rails console?


ruby-on-rails,ruby,neo4j,neo4j.rb
I'm currently working through this tutorial and I'm stuck when it comes to creating relationships in the rails console. I've read through the Neo4jrb project documentation and a blog post on jayway.com but still can't figure it out. I've created a rails site and I want to create team nodes,...

Should we use the Neo4J internal id?


neo4j
We are currently working with a Neo4j database, and we need some kind of id to identify nodes. For example we have functions like CurrentUserHasAccess(NodeId) On other Stackoverflow posts I read that it's a bad idea to use the internal neo4j-identifier, because it can change over time. However I think...

JPA - how to prevent an unnecessary join while querying many to many relationships


java,hibernate,jpa,pagination,spring-data
I have entities Product and Category that are joined with a simple many to many relationship. I want to get a paginated list of products filtered by a single category. I'm trying to write a Spring Data JPA automatic method or a JPQL query method that would produce the SQL...

How to Fetch Data using Spring Data


spring,jpa,spring-boot,spring-data
Hey i want to create a repository extending JpaRepository and fetch result without writing actual query, In my example i have 2 tables Book and Author mapped by many to many relationship, suppose i want to fetch list of books by a particular author_id, since in my book entity, i...

How to add value in path Neo4j


neo4j
I want to add value path in neo4j graph such as (United States - Population - 2015) this path has value 320,970,000 and I want store in database This is what i want Can anyone help me? or any suggestion?...

Add a relationship Neo4j based upon a condition


neo4j
I have 2 node Labels : Account , Transactions. MATCH (n:Account) RETURN n returns me 4 accounts with this property's: accountName RAHUL RAINA id 16294736 accountName SAVINGS ACCOUNT - RES id 16294732 accountName VISA GOLD id 16294492 accountName SBCHQ-GEN-PUB-IND-NONRURAL-INR id 16294488 Transactions is like this : MATCH (n:Transaction) RETURN n...

Neo4j: configure legacy index with cypher or property file


indexing,neo4j
I am using Neo4j-server and I am trying to find a way to configure a legacy index either with cypher or with a property. So far to enable the legacy indexing I just uncommented the related line in neo4j.properties file. How can I apply some of the configurations listed here...

Neo4J IndexProvider is deprecated


spring,neo4j,spring-boot,spring-data-neo4j
The project https://github.com/neo4j-contrib/developer-resources/tree/gh-pages/language-guides/java/spring-data-neo4j produces a warning: Class 'org.springframework.data.neo4j.support.index.IndexProvider' is marked deprecated I use Spring Boot. The managed version for spring-data-neo4j is 3.2.2.RELEASE Does anybody know how this deprecation can be resolved?

Hibernate delete child when parent is getting updated in same transaction


hibernate,spring-data
I have defined two entities Customer and SalesOrder in my domain model with oneToMany relationship from customer to salesOrder. Below code deletes the sales order: SalesOrder salesOrder = salesOrderRepository.findByOrderNumber(orderNumber); if(null != salesOrder){ Customer customer = salesOrder.getCustomer(); customer.setCurrentCredit(customer.getCurrentCredit() - salesOrder.getTotalPrice()); Iterator<SalesOrder> iter = customer.getSalesOrders().iterator(); while(iter.hasNext()){ SalesOrder order = iter.next();...

Neo4j 2.2.2 server does not start after db is generated via java code


java,neo4j,spring-data-neo4j
I am new to Neo4j. I am trying some application in Java using Neo4j 2.2.2 along with Spring Data. I am using spring-data-neo4j (2.2.2.RELEASE) to connect the Neo4j DB. I have successfully done all CRUD opertaions using repositories in Spring Data. But I am unable to open & view this...

Caused by: java.sql.SQLSyntaxErrorException: [SQL0205] Column MITMAS_MMCONO not in table OOLINE in schema


spring,hibernate,jpa,left-join,spring-data
I have 3 entity classes Ooline: @Entity @IdClass(OolineId.class) @NamedQuery(name="Ooline.findAll", query="SELECT o FROM Ooline o") public class Ooline implements Serializable { private static final long serialVersionUID = 1L; @ManyToOne(fetch = FetchType.LAZY) @JoinColumns({ @JoinColumn(name="mitmas_mmcono" , referencedColumnName="mmcono"), @JoinColumn(name="mitmas_mmitno" , referencedColumnName="mmitno") }) private Mitmas mitmas ; @ManyToOne(fetch = FetchType.LAZY) @JoinColumns({ @JoinColumn(name="mitfac_m9cono",...

Global match regular expression with Neo4j Cypher query


regex,neo4j,cypher
I am searching in Neo4j using a regular expression. I would like this search to be global. As it stands, the search will only find words that start with inputted letters in the regular expression: MATCH (a) WHERE a.name =~ '(?i)bob.+' RETURN a.name So it will find the name Bob...

localhost:7474/graphaware/changefeed/CFM gives 404


neo4j,graphaware
i am trying to track latest changes in neo4j in Server Mode so i followed this link https://github.com/graphaware/neo4j-changefeed as i see some extra node are added and here are changes about my db but http://localhost:7474/graphaware/changefeed/CFM gives me 404 i am using neo4j 2.2.2 and my neo4j.properties com.graphaware.runtime.enabled=true com.graphaware.module.CFM.1=com.graphaware.module.changefeed.ChangeFeedModuleBootstrapper com.graphaware.module.CFM.maxChanges=100 com.graphaware.module.CFM.pruneDelay=10000...

How should I use @Cacheable on spring data repositories


java,spring-boot,spring-data
When using, for example, MongoRepository there are some methods which I would like to mark as @Cacheable such as insert(entity) or findOne(id). Since its spring repository and not mind, how should I use @Cacheable on those methods?

Neo4J - Run dbinfo command from REST API


neo4j
I want to run the dbinfo -g "High Availability" command over the Neo4J API. Does such an endpoint exist?...

Authenticate to access the server with Java Neo4j Rest Api


java,rest,neo4j
I'm starting to use the Neo4j Rest Api but when I try to connect the server I get the following error : { "errors" : [ { "code" : "Neo.ClientError.Security.AuthorizationFailed", "message" : "No authorization header supplied." } ] } This error seems to be normal because I am not authenticating...

No hello World output for Neo4j


java,eclipse,neo4j
I am just starting out with Neo4j and this is my first stackoverflow question! I tried to run the Hello-World example in Eclipse with the user library of Neo4j. ( https://github.com/neo4j/neo4j/blob/2.2.2/community/embedded-examples/src/main/java/org/neo4j/examples/EmbeddedNeo4j.java) I only changed the DB_PATH='data/graph.db' ( because in my neo4j-server.properties :org.neo4j.server.database.location=data/graph.db) The output I got in the console is:...

WITH is required between MERGE and MATCH


neo4j
I am trying to setup a graph database, I have two csv files . I have successfully setup on of the csv's, the first one works fine. First CSV : LOAD CSV WITH HEADERS FROM "file:///C:/Users/rraina/Desktop/acc.csv" AS csvLine MERGE (providerName:ProviderName { name: csvLine.providerName }) MERGE (container:Container { name: csvLine.CONTAINER })...

Neo4j unique IDs by tree with root node counter?


neo4j,uniqueidentifier
Is using a tree with a counter on the root node, to be referenced and incremented when creating new nodes, a viable way of managing unique IDs in Neo4j? In a previous question on performance on this forum (Neo4j merge performance VS create/set), the approach was described, and it occurred...

spring boot switching from in-memory database to persistent database


intellij-idea,spring-boot,spring-data
I have developed my web-application using spring-boot and spring-data-jpa and and in-memory database, and I have a couple questions: how can i now switch to a persistent, let's say, MySQL database? What do I have to change in my configuration? Can spring-boot set a database up for me with a...

Multiple Nodes per Line in Neo4j Batch Import Tool


neo4j
Using Neo4j's Batch Import Tool, how can I create multiple nodes from a single row, and then attribute some properties to Node 1 and some to Node 2? This is an example from 29.3: movieId:ID,title,year:int,:LABEL tt0133093,"The Matrix",1999,Movie tt0234215,"The Matrix Reloaded",2003,Movie;Sequel tt0242653,"The Matrix Revolutions",2003,Movie;Sequel Is there a way to make it...

Spring Data Mongodb - obtaining last item on a page


java,pagination,spring-data,spring-data-mongodb
This is my current pagination method on Spring Data MongoDB: @RequestMapping(value="/nextposts", method=RequestMethod.GET) public List getNextPosts(@RequestParam int next) { Pageable pageable = new PageRequest(next, 5, new Sort(new Sort.Order(Direction.DESC, "id"))); page = repo.findAll(pageable); return page.getContent(); } As you can see, I'm obtaining the page as specified by the "next" variable and then...

Find last node in unknown amount of relationships


neo4j,cypher
I can find last node like this MATCH p=(a)-->(b)-->(c) WHERE a.name='Object' AND c:Prime RETURN c But how i would find last node if i don't know how many relationships -->()-->() between two nodes? I am trying to find last Node name by the Lable name. Last node doesn't have any...

Left join in Neo4j does not seem to work


neo4j,cypher
This is my graph I am trying to make a query that tells me if the connections from a node of type T exist to nodes of type M. I heard that OPTIONAL MATCH is equivalent to SQL Left Join, but it does not include the the missing link. Here...

How to check if an ExecutionResult is empty in Neo4j


java,neo4j
I am executing a query in neo4j using java. I don't know how to check if the execution result is empty. Here is my code. String firstquery=" start n=node(*) match(b)-[relatedto]->(n) where b.value=\""+applicationName+"\" return n"; ExecutionResult execResult = execEngine.execute(firstquery); System.out.println("executing query"); String results = execResult.dumpToString(); System.out.println(results); Iterator<Node> n_column1 = execResult.columnAs( "n"...

find neo4j libraries for java api


java,neo4j
I want to use neo4j libraries to connect my java app with neo4j database and follow the tutorials from http://neo4j.com/docs/stable/tutorials-java-embedded-hello-world.html. At the beginning I copied the sources code from https://github.com/neo4j/neo4j/blob/2.2.2/community/embedded-examples/src/main/java/org/neo4j/examples/EmbeddedNeo4j.java and netbeans complains about missing libraries like: import org.neo4j.graphdb.Direction; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.Node; import...

Is it possible to have “connection preparation” with Spring / JPA persistency


java,spring,jpa,spring-data
I have a Spring CrudRepository that is just an interface, and I have a persistence context class where I have defined my data source: @Configuration @EnableTransactionManagement public class PersistenceContext { @Bean(name="dataSource", destroyMethod = "close") public DataSource dataSource() throws SQLException { return ... public interface DataRepository extends CrudRepository<Data, Long> { Data...

Segregating the read-only and read-write in Spring/J2EE Apps


mysql,jpa,design-patterns,architecture,spring-data
We using Spring, Spring-Data and JPA in our project. For production servers, we would like to setup database cluster such that all read queries are directed to one server and all write queries are directed to another server. This obviously will require some changes in the way the DAOs are...

How to access entity manager with spring boot and spring data


spring-boot,spring-data,spring-data-jpa
How to get access to the entity manager in the repository when we use spring boot and spring data? Otherwise, i will need to put my big query in annotation, i would prefer to have something clear... then a long text....

Cannot implicitly convert type from System.Collection.Generic.IEnumerable.MyClass to MyClass


c#,generics,neo4j,neo4jclient
Following is the code for which the error is being generated: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Neo4jClient; using Neo4jClient.Cypher; namespace ConsoleApplication1 { public class SNode { public int shelfid { get; set; } public int floorid { get; set; } } public class PathsResult<TNode> { public...