Hot questions for Using Neo4j in spring boot

Top Java Programmings / Neo4j / spring boot

Question:

I'm new on neo4j spring data, and the query i'm trying to do its not working on my spring boot application, but working on the neo4j web interface.

I have 3 nodes on the database: "oracle", "java" and "cloud" The query i'm trying to run:

MATCH(interest:Interest) WHERE interest.name =~ '(?i).*cl.*' RETURN interest

So, using the neo4j web interface, if i put "cl" it will return "oracle" and "cloud", which is correct.

Using spring data, i get all 3 results, which is wrong.

My repository interface:

@Query("MATCH(interest:Interest) WHERE interest.name =~ '(?i).*{0}.*' RETURN interest")
Set<Interest> getKindOf(String value);

My rest controller:

@ResponseBody
public Collection<Interest> getPersonByName(@PathVariable String name) {
    Set<Interest> interests = interestRepository.getKindOf(name);
    return interests;
}

Checking Spring boot logs i can see the query:

INFO 12716 --- [nio-2016-exec-1] o.n.o.drivers.http.request.HttpRequest   : Thread: 22, url: http://localhost:7474/db/data/transaction/commit, request: {"statements":[{"statement":"MATCH(interest:Interest) WHERE interest.name =~ '(?i).*{0}.*' RETURN interest","parameters":{"0":"cl"},"resultDataContents":["graph"],"includeStats":false}]}

So, the question is: Why i get 2 results using neo4j web interface (OK) and 3 results using spring data (NOK)?

Thanks for the help!

Rodrigo


Answer:

The complete regex should be passed as argument (aka cypher query parameter)

@Query("MATCH(interest:Interest) WHERE interest.name =~ {0} RETURN interest")
Set<Interest> getKindOf(String value);

--

@ResponseBody
public Collection<Interest> getPersonByName(@PathVariable String name) {
    String regex = "(?i).*" + name + ".*";
    Set<Interest> interests = interestRepository.getKindOf(regex);
    return interests;
}

Note this has to do with the cypher parameters handling, this is not specific to sdn

Question:

Apparently this is a common exception but, all the questions asked here seem to be related to CSV hence, why this question.

I have a domain object that make use of uuid as unique id and is declared as follow

@NodeEntity(label = "TNODE")
public class TestNode {
    @Id @GeneratedValue(strategy = UuidStrategy.class) 
    @Convert(UuidStringConverter.class)
    private UUID uuid;

    private String name; 

    @Relationship(type = "TEST_REL_IS", direction = Relationship.OUTGOING) private TestNodeTarget testTarget;

    public TestNode() {}
    public TestNode(String name, TestNodeTarget target) {
        this.name = name; 
        this.testTarget = target;
    }

    //getters and setters
}

And the TestNodeTarget is as follow

@NodeEntity(label = "TNODE_TARGET")
public class TestNodeTarget {
    private Long id; 
    private String name;

    public TestNodeTarget() {}
    public TestNodeTarget(String name) {
        this.name = name; 
    }

    //getters and setters
}

I am using Spring Boot 2.0.3.RELEASE with sprng-boot-data-neo4j starter which pulls down neo4j-ogm-core-3.1.0, neo4j-ogm-bolt-driver-3.1.0, neo4j-ogm-api-3.1.0 and The mysterious neo4j-java-driver-1.5.

I am using the Neo4j OGM SessionFactory to build my own generic DAO layer instead of Spring Data Repository that restricts me from

  • Single Repository for all domains (i.e. loadById(classType, id))
  • Run custom cypher queries
  • Some other reasons I don't remember
Issue

I am able to perform CREATE, READ and DELETE operations. The PUT operations with following assumptions

  1. Previously created tn:TestNode, t1:TestNodeTarget and t2:TestNodeTarget
  2. The tn node has a relationship with t1 node
  3. Retrieve tn node, t1 & t2 nodes
  4. Change the tn node relationship to t2 from t1
  5. Call session.save

The exception is

Caused by: org.neo4j.driver.v1.exceptions.ClientException: Cannot merge node using null property value for uuid
    at org.neo4j.driver.internal.util.ErrorUtil.newNeo4jError(ErrorUtil.java:62)
    at org.neo4j.driver.internal.async.inbound.InboundMessageDispatcher.handleFailureMessage(InboundMessageDispatcher.java:137)
    at org.neo4j.driver.internal.messaging.PackStreamMessageFormatV1$Reader.unpackFailureMessage(PackStreamMessageFormatV1.java:432)
    at org.neo4j.driver.internal.messaging.PackStreamMessageFormatV1$Reader.read(PackStreamMessageFormatV1.java:396)
    at org.neo4j.driver.internal.async.inbound.InboundMessageHandler.channelRead0(InboundMessageHandler.java:83)
    at org.neo4j.driver.internal.async.inbound.InboundMessageHandler.channelRead0(InboundMessageHandler.java:35)
    at org.neo4j.driver.internal.shaded.io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
    at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    at org.neo4j.driver.internal.shaded.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
    at org.neo4j.driver.internal.shaded.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
    at org.neo4j.driver.internal.async.inbound.MessageDecoder.channelRead(MessageDecoder.java:40)
    at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    at org.neo4j.driver.internal.shaded.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
    at org.neo4j.driver.internal.shaded.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:297)
    at org.neo4j.driver.internal.shaded.io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:413)
    at org.neo4j.driver.internal.shaded.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
    at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    at org.neo4j.driver.internal.shaded.io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1336)
    at org.neo4j.driver.internal.shaded.io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1127)
    at org.neo4j.driver.internal.shaded.io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1162)
    at org.neo4j.driver.internal.shaded.io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
    at org.neo4j.driver.internal.shaded.io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
    at org.neo4j.driver.internal.shaded.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
    at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    at org.neo4j.driver.internal.shaded.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359)
    at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    at org.neo4j.driver.internal.shaded.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935)
    at org.neo4j.driver.internal.shaded.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
    at org.neo4j.driver.internal.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
    at org.neo4j.driver.internal.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
    at org.neo4j.driver.internal.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
    at org.neo4j.driver.internal.shaded.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
    at org.neo4j.driver.internal.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
    at org.neo4j.driver.internal.shaded.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
Questions
  1. What is the root cause of the error Caused by: org.neo4j.driver.v1.exceptions.ClientException: Cannot merge node using null property value for uuid message? The node uuid value is not null.
  2. How do bolt-driver and neo4j-java-driver communicate with each other? I was surprised to see neo4j-java-driver.
  3. Since I am using Neo4j OGM in favour of Spring Data's Repository then can I ditch the spring-boot-starter-data-neo4j? If yes, what happens to the @Transactional and transaction management?

Answer:

TL;DR

Using a UUID field annotated with @Id is not a replacement to private Long id field (or is it?). Add the id field to the class and the exception disappears.

I couldn't wait and decided to debug this issue myself and share my findings

Transaction

At first, the PUT operation worked (without the private Long id field) without exception but failed to delete the old relationship and based on this Github issue I wrapped the operations in @Transactional and I got the exception. Some progress.

In ORM context, the above would work fine. In other words, I can retrieve the entity from @Transactional annotated service layer, make necessary changes in a non-transactional layer and then persist the entity using another service layer method that is annotated with @Transactional. For OGM you gotta do it all in same transaction layer. Hum!

The exception

As shown in the question above, the TestNode entity makes use of UUID as follow

@Id @GeneratedValue(strategy = UuidStrategy.class) 
@Convert(UuidStringConverter.class)
private UUID uuid;

I had to update the TestNode class to include a

private Long id; 

And after this the PUT operation works as expected and the old relationship gets removed.

Confusions

Why lack of private Long id; only cause exception during update? Why not when you retrieve, delete, or create the entity?

Question:

On Ubuntu 16.10 I have followed the instruction from:

https://github.com/neo4j-examples/movies-java-spring-data-neo4j-4

But when I go to http://localhost:8080/ and try to search for e.g. Matrix nothing happens, it just looks empty:

I have verified that the neo4j db has been populated with the required data and I also updated user/pass in the .properties file in the maven project.

Any ideas, and is it possible to find a log somewhere?

Pressing F12 in Firefox gives:

Indicating the error in the sources as described in the below answer, did not manage to get the same error info in Chrome when pressing F12 though.


Answer:

The code in the GitHub project is not properly updated. The MovieRepository.java class has findByTitleContaining method and @param is missing in this method. If you check the index.html file, javascript code is executing /movies/search/findByTitleLike?title=* URL. The quick fix will be add following method in MovieRepository.java and then execute mvn spring-boot:run command again.

Collection<Movie> findByTitleLike(@Param("title") String title);

In order to have proper source and test classes, you should replace findByTitleContaining method with findByTitleLike method in MovieRepository.java class and also fix the MovieRepositoryTest.java class to use the correct method. Delete testFindByTitleContaining method and add following method in MovieRepositoryTest.java class.

@Test
public void testFindByTitleLike() {
    String title = "Matrix";
    Collection<Movie> result = instance.findByTitleLike("*"+title+"*");
    assertNotNull(result);
    assertEquals(1, result.size());
}

Question:

I have the following classes

import java.util.Set;

import org.neo4j.ogm.annotation.GeneratedValue;
import org.neo4j.ogm.annotation.Id;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Relationship;
@NodeEntity
public class Client {

    @Id
    @GeneratedValue
    private Long id;

    private String name;

    @Relationship(type = "HAS_CONFIGURED", direction = Relationship.OUTGOING)
    public Set<Environment> environments;

    public Client () {

    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Set<Environment> getEnvironments() {
        return environments;
    }

    public void setEnvironments(Set<Environment> environments) {
        this.environments = environments;
    }

}

import java.util.Set;

import org.neo4j.ogm.annotation.GeneratedValue;
import org.neo4j.ogm.annotation.Id;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Relationship;

@NodeEntity
public class Environment {

    @Id
    @GeneratedValue
    private Long id;

    private String name;

    @Relationship(type = "HAS_INSTALLED", direction = Relationship.OUTGOING)
    public Set<Application> applications;

    public Environment() {

    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Set<Application> getApplications() {
        return applications;
    }

    public void setApplications(Set<Application> applications) {
        this.applications = applications;
    }

}

import java.util.Set;

import org.neo4j.ogm.annotation.GeneratedValue;
import org.neo4j.ogm.annotation.Id;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Relationship;
import org.neo4j.ogm.annotation.RelationshipEntity;

@NodeEntity
public class Application {
    @Id
    @GeneratedValue
    private Long id;

    private String name;

    @Relationship(type = "CAN_THROW", direction = Relationship.OUTGOING)
    public Set<Error> errors;

    public Application() {

    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Set<Error> getErrors() {
        return errors;
    }

    public void setErrors(Set<Error> errors) {
        this.errors = errors;
    }

}

And I am trying to load them all using a crud repository

import java.util.List;

import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.neo4j.repository.Neo4jRepository;

import com.nic.loganalyzer.loganalyzer.model.entity.graph.Client;

public interface ClientRepository extends Neo4jRepository<Client, Long> {


    List<Client> findAllByName(String name);

}

Hierarchy is like Client-->Environment-->Application--Error. The problem is that it loads only till Applications but Application does not load environments. Is it loaded eagerly? Or else how can I load the entire structure and traverse. The way I traverse is as follows

List<Client> findAllByName = clientRepository.findAllByName(eventLog.getClient());
for (Client client: findAllByName) {
    List<Environment> environments = client.getEnvironments().stream()
            .filter(e -> e.getName().equalsIgnoreCase(eventLog.getEnvironment()))
            .collect(Collectors.toList());
    for (Environment environment : environments) {
        List<Application> applications = environment.getApplications().stream()
                .filter(e -> e.getName().equalsIgnoreCase(eventLog.getApplication()))
                .collect(Collectors.toList());
        for (Application application : applications) {
            List<Error> errors = application.getErrors().stream()
                    .filter(e -> eventLog.getError().contains(e.getName()))
                    .collect(Collectors.toList());

Answer:

As far as I understand, the default "depth" value on derived finders is 1.

If you want to load the whole hierarchy, try adding @Depth(value = 3) on top of your derived finder.

Your method should look like:

@Depth(value = 3)
List<Client> findAllByName(String name);

Question:

Trying to implement simple social network concept: followers + followings. All are just Accounts related to each other. Using Neo4j and Spring boot.

'org.springframework.boot' version '2.2.4.RELEASE'
'org.springframework.boot:spring-boot-starter-data-neo4j'

Account.class

@NodeEntity
public class Account {

  @Id
  private String pk;

  @Relationship(type = "FOLLOWS", direction = Relationship.INCOMING)
  private Set<Account> followers;

  @Relationship(type = "FOLLOWS", direction = Relationship.OUTGOING)
  private Set<Account> followings;
}

Using standart spring CrudRepository (or Neo4JRepository, no difference) i constantly get stackoverflows working with accounts. Simplest situation where A follows B and B follows A will cause a SOF for findById(). I understand that it has smth. to do with fetching depth, but it defaults to 1, which means that i should get followers and followings of account but theirs relations should be empty. The relations work correctly in terms of adding: i can connect accounts from any end by adding to appropriate Set and graph turns out exactly as i intend, but fetching is not working..

Main question: What am i doing and understanding wrong, and what can be done to implement this kind of relations correctly?

I tried using session.load() with depth 0, and no SOFs, of course, but that is not exactly what i need. Default depth 1 should provide exactly what i need, but i guess i misunderstand the concept?

And extra: is there a way to configure default depth for entire application? Without using session manually, thus reimplementing all basic operations..


Answer:

Finally, got it. The real problem was not in fetching, but inside internal call for equals() and hashcode() somewhere during fetch. Since i use lombok with @Data, all properties paricipated in those methods, causing SOF.

Adding @EqualsAndHashCode(exclude={"followers", "followings"}) to class's annotations fixed the issue and depth=1 works now.

Question:

I am trying to use neo4j using spring boot and spring data. I have stored data in my neo4j already and all my queries are returning null unless I store the data using my app which kind of made me confused. I thought maybe I am using an embedded database but I guess that is not the case as I don't have it on my dependencies. Here is my pom.xml:

<?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">
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.2.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <groupId>me.neo4j</groupId>
    <artifactId>neo4jpoc</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-neo4j</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-neo4j</artifactId>
        </dependency>

        <!-- add this dependency if you want to use the bolt driver -->
        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-ogm-bolt-driver</artifactId>
        </dependency>

        <!-- add this dependency if you want to use the HTTP driver -->
        <!--<dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-ogm-http-driver</artifactId>
        </dependency>-->

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

Here is my application.properties:

spring.data.neo4j.uri=bolt://localhost:7687
spring.data.neo4j.username=neo4j
spring.data.neo4j.password=neo4j
logging.level.org.neo4j.driver.GraphDatabase = debug
logging.level.org.neo4j.driver.Driver = debug
logging.level.org.neo4j.driver.OutboundMessageHandler = debug
logging.level.org.neo4j.driver.InboundMessageDispatcher = debug

Here is my db.properties:

URI=bolt://localhost
username=neo4j
password=neo4j

Here is my entity:

package me.neo4j.neo4jpoc.graph.entity;

import org.neo4j.ogm.annotation.GeneratedValue;
import org.neo4j.ogm.annotation.Id;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Property;
import org.neo4j.ogm.annotation.Relationship;

import java.util.Collections;
import java.util.HashSet;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;

@NodeEntity
public class MyEntity {

    @Id
    @GeneratedValue
    private Long id;

    @Property(name = "NAME")
    private String name;

    @Relationship(type = "CONSISTS_OF", direction = Relationship.UNDIRECTED)
    public Set<MyEntity> children;

    @Relationship(type = "BELONGS_TO", direction = Relationship.UNDIRECTED)
    public Set<MyEntity> parents;

    public void consistsOf(MyEntity child) {
        if (children == null) {
            children = new HashSet<>();
        }
        children.add(child);
    }

    public void belongsTo(MyEntity parent) {
        if (parents == null) {
            parents = new HashSet<>();
        }
        parents.add(parent);
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String toString() {
        return this.name + "'s children => "
                + Optional.ofNullable(this.children).orElse(
                Collections.emptySet()).stream()
                .map(MyEntity::getName)
                .collect(Collectors.toList()) + "'s parents => "
                + Optional.ofNullable(this.parents).orElse(
                Collections.emptySet()).stream()
                .map(MyEntity::getName)
                .collect(Collectors.toList());
    }
}

Here is my spring data repository:

package me.neo4j.neo4jpoc.graph.repo;

import me.neo4j.neo4jpoc.graph.entity.MyEntity;
import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.repository.CrudRepository;

public interface MyEntityRepository extends CrudRepository<MyEntity, Long> {

    @Query("MATCH (l:MAIN) RETURN l")
    MyEntity findQuery();
}

Here is my spring boot configuration:

package me.neo4j.neo4jpoc;

import org.neo4j.ogm.config.ClasspathConfigurationSource;
import org.neo4j.ogm.config.ConfigurationSource;
import org.neo4j.ogm.session.SessionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.neo4j.repository.config.EnableNeo4jRepositories;
import org.springframework.data.neo4j.transaction.Neo4jTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Configuration
@EnableNeo4jRepositories(basePackages = "me.neo4j.neo4jpoc.graph.repo")
@EnableTransactionManagement
public class Neo4jConfiguration {

    @Bean
    public Neo4jTransactionManager transactionManager(SessionFactory sessionFactory) {
        return new Neo4jTransactionManager(sessionFactory);
    }

    @Bean
    public SessionFactory sessionFactory(org.neo4j.ogm.config.Configuration configuration) {
        // with domain entity base package(s)
        return new SessionFactory(configuration, "me.neo4j.neo4jpoc.graph.entity");
    }

    @Bean
    public org.neo4j.ogm.config.Configuration configuration() {
        ConfigurationSource properties = new ClasspathConfigurationSource("db.properties");
        return new org.neo4j.ogm.config.Configuration.Builder(properties).build();
    }


}

and finally here is my spring boot application class:

package me.neo4j.neo4jpoc;

import me.neo4j.neo4jpoc.graph.entity.MyEntity;
import me.neo4j.neo4jpoc.graph.repo.MyEntityRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class AccessingDataNeo4jApplication {

    private static final Logger LOG = LoggerFactory.getLogger(AccessingDataNeo4jApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(AccessingDataNeo4jApplication.class, args);
    }

    @Bean
    CommandLineRunner run(MyEntityRepository repository) {
        return args -> {

            MyEntity myEntity = repository.findQuery();
            System.out.println("myEntity = " + myEntity);
            LOG.debug("myEntity = {}", myEntity);
        };
    }
}

Also here is the cyphers for storing the data which I have stored inside my neo4j database through neo4j browser:

CREATE(l:PARENT {NAME:'ParentX'})
CREATE(w:MAIN {NAME:'Node1'})
CREATE(t:CHILD {NAME:'ChildY'})
CREATE (l)-[:CONSISTS_OF]->(w),(w)-[:CONSISTS_OF]->(t)
CREATE (l)<-[:BELONGS_TO]-(w),(w)<-[:BELONGS_TO]-(t)

Any input would be appreciated as I have no clue why it is not retrieving data.


Answer:

Your (single) entity class is named MyEntity and its @NodeEntity annotation does not specify the label name, so the associated node label defaults to MyEntity as well. Therefore, your Java code will only create and search for nodes with the MyEntity label.

On the other hand, your Cypher code is creating nodes with the labels PARENT, MAIN, and CHILD.

This is why your Java code never finds any nodes created by your Cypher code.

You will have change your Java and/or Cypher code to use the same node label(s). And you may also need to update the existing nodes in the DB to use the proper label(s).

Question:

I wanted to make use of @Transactional, expecting that annotated methods get a separate transaction which will be committed at the end of the method.

However, if I check the DB, there was nothing committed:

@Transactional
public boolean borrowLibraryItem(Long libraryUserId, Long uniqueLibraryItemNumber) {
    boolean success = false;
    LibraryUser borrower = libraryUserRepository.findByLibraryUserId(libraryUserId);
    LibraryItem borrowItem = libraryItemRepository.findByUniqueLibraryItemNumber(uniqueLibraryItemNumber);
    success = borrower != null && borrowItem != null;
    if (success) {
        BorrowedByRel borrowedByRel = new BorrowedByRel(borrower, borrowItem);
        borrowedByRel.setBorrowDate(LocalDateTime.now());
        borrowItem.setBorrowedByRel(borrowedByRel);
        // libraryItemRepository.save(borrowItem);
    }
    return success;
}

The code commits the changes perfectly fine when using the repository.save-method, but not without.

Configuration is done via spring boot - as far as I understood, things should work out of the box this way (this might be the part where I got something wrong):

@SpringBootApplication
@EnableNeo4jRepositories(basePackages = "yalms.libraryapi.repositories")
@EntityScan("yalms.libraryapi.entities")
@EnableTransactionManagement
public class YalmsLibraryApplication {
    public static void main(String[] args) {
        SpringApplication.run(YalmsLibraryApplication.class, args);
    }
}

Something regarding transactions seems to be happening, as the following logging.level.org.springframework.transaction.interceptor=TRACE shows:

Getting transaction for borrowLibraryItem()..
Don't need to create transaction for findByLibraryUserId, not transactional..
Request: MATCH (n:`LibraryUser`)..
Don't need to create transaction for findByUniqueLibraryItemNumber, not transactional..
Request: MATCH (n:`LibraryItem`)..
Completing transaction for borrowLibraryItem().

I would expect though that the changes (the addition of a relationship) would be committed. Am I misunderstanding something here or do I have something not configured right? Any help would be very much appreciated, thanks in advance!

UPDATE: I've added a Neo4jTransactionManager-Bean as suggested in the comments, unfortunately it didn't help to solve my issue:

    @Bean
    public SessionFactory sessionFactory() {
        org.neo4j.ogm.config.Configuration configuration = new org.neo4j.ogm.config.Configuration.Builder()
                .uri(databaseUrl)
                .credentials(userName, password)
                .build();
        return new SessionFactory(configuration,"yalms.libraryapi");
    }

    @Bean
    public Neo4jTransactionManager transactionManager() {
        return new Neo4jTransactionManager(sessionFactory());
    }

I've enabled trace-output regarding everything coming from spring.data.*, and it's quite surprising to me as it seems that everything seems to be working fine:

TRACE 19634 --- [nio-8080-exec-2] .s.t.s.TransactionSynchronizationManager : Initializing transaction synchronization
TRACE 19634 --- [nio-8080-exec-2] o.s.t.i.TransactionInterceptor           : Getting transaction for [yalms.libraryapi.services.BorrowService.borrowLibraryItem]
TRACE 19634 --- [nio-8080-exec-2] o.s.t.i.TransactionInterceptor           : Don't need to create transaction for [org.springframework.data.neo4j.repository.support.SimpleNeo4jRepository.findByLibraryUserId]: This method isn't transactional.
DEBUG 19634 --- [nio-8080-exec-2] .s.d.n.r.q.d.DerivedGraphRepositoryQuery : Executing query for method findByLibraryUserId
TRACE 19634 --- [nio-8080-exec-2] .s.t.s.TransactionSynchronizationManager : Retrieved value [org.springframework.data.neo4j.transaction.SessionHolder@4adaed6] for key [org.neo4j.ogm.session.SessionFactory@5f4fecd0] bound to thread [http-nio-8080-exec-2]
 INFO 19634 --- [nio-8080-exec-2] o.n.o.drivers.bolt.request.BoltRequest   : Request: MATCH (n:`LibraryUser`) WHERE n.`libraryUserId` = { `libraryUserId_0` } WITH n RETURN n,[ [ (n)<-[r_b1:`BORROWED_BY`]-(l1:`LibraryItem`) | [ r_b1, l1 ] ] ], ID(n) with params {libraryUserId_0=0}
TRACE 19634 --- [nio-8080-exec-2] o.s.t.i.TransactionInterceptor           : Don't need to create transaction for [org.springframework.data.neo4j.repository.support.SimpleNeo4jRepository.findByUniqueLibraryItemNumber]: This method isn't transactional.
DEBUG 19634 --- [nio-8080-exec-2] .s.d.n.r.q.d.DerivedGraphRepositoryQuery : Executing query for method findByUniqueLibraryItemNumber
TRACE 19634 --- [nio-8080-exec-2] .s.t.s.TransactionSynchronizationManager : Retrieved value [org.springframework.data.neo4j.transaction.SessionHolder@4adaed6] for key [org.neo4j.ogm.session.SessionFactory@5f4fecd0] bound to thread [http-nio-8080-exec-2]
 INFO 19634 --- [nio-8080-exec-2] o.n.o.drivers.bolt.request.BoltRequest   : Request: MATCH (n:`LibraryItem`) WHERE n.`uniqueLibraryItemNumber` = { `uniqueLibraryItemNumber_0` } WITH n RETURN n,[ [ (n)-[r_b1:`BORROWED_BY`]->(l1:`LibraryUser`) | [ r_b1, l1 ] ] ], ID(n) with params {uniqueLibraryItemNumber_0=2}
TRACE 19634 --- [nio-8080-exec-2] o.s.t.i.TransactionInterceptor           : Completing transaction for [yalms.libraryapi.services.BorrowService.borrowLibraryItem]
TRACE 19634 --- [nio-8080-exec-2] o.s.d.n.t.Neo4jTransactionManager        : Triggering beforeCommit synchronization
TRACE 19634 --- [nio-8080-exec-2] o.s.d.n.t.Neo4jTransactionManager        : Triggering beforeCompletion synchronization
DEBUG 19634 --- [nio-8080-exec-2] o.s.d.n.t.Neo4jTransactionManager        : Initiating transaction commit
DEBUG 19634 --- [nio-8080-exec-2] o.s.d.n.t.Neo4jTransactionManager        : Committing Neo4j OGM transaction [org.neo4j.ogm.drivers.bolt.transaction.BoltTransaction@5a5172dc] on Session [org.neo4j.ogm.session.Neo4jSession@7dc575ae]
TRACE 19634 --- [nio-8080-exec-2] o.s.d.n.t.Neo4jTransactionManager        : Triggering afterCommit synchronization
TRACE 19634 --- [nio-8080-exec-2] .s.t.s.TransactionSynchronizationManager : Clearing transaction synchronization
TRACE 19634 --- [nio-8080-exec-2] o.s.d.n.t.Neo4jTransactionManager        : Triggering afterCompletion synchronization
DEBUG 19634 --- [nio-8080-exec-2] o.s.d.n.t.Neo4jTransactionManager        : Not closing pre-bound Neo4j Session after transaction
TRACE 19634 --- [nio-8080-exec-2] .s.t.s.TransactionSynchronizationManager : Removed value [org.springframework.data.neo4j.transaction.SessionHolder@4adaed6] for key [org.neo4j.ogm.session.SessionFactory@5f4fecd0] from thread [http-nio-8080-exec-2]
DEBUG 19634 --- [nio-8080-exec-2] o.s.d.n.w.s.OpenSessionInViewInterceptor : Closed Neo4j OGM Session in OpenSessionInViewInterceptor

But the update still does not end up in DB - makes kinda sense as there is no query that creates the new relation, but I do not understand why not: The retrieved entities seem to be attached to the transaction, the entities get modified within the transaction, so the changes should be committed once the transaction completes. Or did I misunderstand something here fundamentally?


Answer:

Neo4j-OGM (the object graph mapper behind Spring Data Neo4j) needs an explicit save call. This is currently done by the explicit Spring Data Neo4j save call. There is no auto-commit when using Spring's transactional boundary.

Basically you have no error in your application and the explicit save call needs to be un-commented.

Some notes on the comments: You do not need to define a TransactionManager on your own within a Spring Boot applications. The spring-boot-starter-neo4j takes care of initialising Configuration, SessionFactory and an appropriate TransactionManager.

Question:

I have containerised a spring boot application. It is contained in a jar file. when I call the jar file separately It is working but when I run it through docker-compose up it yields the following error:

ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crawlerController': Unsatisfied dependency expressed through field 'campaignservice'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'campaignService': Unsatisfied dependency expressed through field 'campaignrepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'campaignRepository': Cannot resolve reference to bean 'org.springframework.data.neo4j.transaction.SharedSessionCreator#0' while setting bean property 'session'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.data.neo4j.transaction.SharedSessionCreator#0': Cannot resolve reference to bean 'sessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.neo4j.ogm.session.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is java.lang.TypeNotPresentException: Type javafx.util.Pair not present

Given that the jar works when invoked separately I assume that all of the dependencies are contained in the classpath. so I do not understand why it does not work when called through Docker

the dockerFile is :

FROM openjdk:8-jre

VOLUME /tmp
ADD target/SpringNeoServer.jar /SpringNeoServer.jar

EXPOSE 7864

ENTRYPOINT ["java", "-jar", "SpringNeoServer.jar"]

Answer:

JavaFX is not included in this version of openjdk.

Instructions to add it can be found here.

Question:

I am trying to update a node on Neo4J, but what ends up happening is that it creates a duplicate Node. I read that the update has to be in a single transaction and I added @Transactional, but still same result. Here is what I have. I tried the approach of reading and deleting the old node, and saving the new one and it appears to be working. But, I think that is not the right approach. Why the @Transactional annotation not working. Thank you.

@EnableNeo4JRepositories(com.example.graph.repo)
@EnableTransactionManagement
@org.springframework.contect.annotation.Configuration
public class Neo4JConfig {
   @Bean
   public Configuration configuration() {
       Configuration cfg = new Configuration();
       cfg.driverConfiguration()                 
       .setDriverClassName("org.neo4j.ogm.drivers.http.driver.HttpDriver")
       .setURI("http://neo4j:neo4j@localhost:7474");
       return cfg;
    }

    @Bean 
    public SessionFactory sessionFactory() {
       return new SessionFactory(configuration(), "com.example");
    }

    @Bean
    public Neo4jTransactionManager transactionManager() {
       return new Neo4JTransactionManager(sessionFactory());
    }
}

@Service
public class UserService{
   @Autowired
   UserRepository userRepository;

   @Transactional
   public void updateUser(User user) {
       User existingUser = userRepository.getExistingUser(user.getUserName());
       if(existingUser != null ) {
           user.setSomeValue(existingUser.getSomeValue());
           userRepository.save(user);
       }
   }
}

Answer:

Spring AOP uses JDK Proxy mechanism by default. It means that you must invoke @Transactional method via interface method.

So you should split your service into interface UserService and implementation (say UserServiceImpl), autowire the interface into the code where you currently autowire the impementation, and then invoke transactional method via interface.

P.S. Another approach is to force Spring to use CGLIB as long as this mechanism is not limited to interfaces. More details for both mechanisms https://docs.spring.io/spring/docs/3.0.0.M3/reference/html/ch08s06.html

Question:

I spent a while trying to figure out spring boot neo4j in java. What I want is something like this

import org.neo4j.driver.v1.AuthTokens;
import org.neo4j.driver.v1.Driver;
import org.neo4j.driver.v1.GraphDatabase;
import org.neo4j.driver.v1.Record;
import org.neo4j.driver.v1.Session;
import org.neo4j.driver.v1.StatementResult;
import org.neo4j.driver.v1.Transaction;
import org.neo4j.driver.v1.Value;


public class adding {

    static Driver driver;

    public static void main(String args[]) throws JSONException {
        StatementResult result;
        driver = GraphDatabase.driver("bolt://localhost:7687", AuthTokens.basic("neo4j","password"));
        Session session = driver.session();

        result = session.run("CREATE (a:Person {name: bob} return a.name");

    }

}

So this works an all however I'm looking to query with spring boot.

I followed this guide https://spring.io/guides/gs/accessing-data-neo4j/

and was left pretty confused. I'm not sure how I can immitate the above create process with spring boot . Is there like a query command?

package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class SpringGraphNeo4jApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringGraphNeo4jApplication.class, args);
    }

}

The demo has this file and runs on a port.... I don't understand


Answer:

Add @EnableNeo4jRepositories in you SpringGraphNeo4jApplication class

In case you want to use your own queries , use @query annotation on repository

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.neo4j.repository.config.EnableNeo4jRepositories;

@SpringBootApplication
@EnableNeo4jRepositories
public class SpringGraphNeo4jApplication {

    private final static Logger log = LoggerFactory.getLogger(SpringGraphNeo4jApplication.class);

    public static void main(String[] args) throws Exception {
        SpringApplication.run(SpringGraphNeo4jApplication.class, args);
    }

}

Question:

I'm having a trouble with mapping an object Employee to my database when invoking a default method in my Employee repository. I get an argument type mismatch when invoking an employeerepository.findall() method

Employee repository
package org.jarivm.relationGraph.repositories;

import org.jarivm.relationGraph.domains.Employee;
import org.jarivm.relationGraph.domains.Project;
import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.neo4j.repository.GraphRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author Jari Van Melckebeke
 * @since 10.10.16
 */
@Repository
public interface EmployeeRepository extends GraphRepository<Employee> {

}
the controller
package org.jarivm.relationGraph.services;

import org.jarivm.relationGraph.domains.*;
import org.jarivm.relationGraph.repositories.ClientRepository;
import org.jarivm.relationGraph.repositories.EmployeeRepository;
import org.jarivm.relationGraph.repositories.ProjectRepository;
import org.jarivm.relationGraph.repositories.SectorRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.Banner;
import org.springframework.data.neo4j.template.Neo4jOperations;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;

/**
 * @author Jari Van Melckebeke
 * @since 17.10.16.
 */
@Controller
@RequestMapping("user")
@Transactional
public class UserController {
    private final ProjectRepository projectRepository;
    private final ClientRepository clientRepository;
    private final SectorRepository sectorRepository;
    private final EmployeeRepository employeeRepository;

    @Autowired
    public UserController(EmployeeRepository employeeRepository, SectorRepository sectorRepository, ProjectRepository projectRepository, ClientRepository clientRepository) {
        this.employeeRepository = employeeRepository;
        this.sectorRepository = sectorRepository;
        this.projectRepository = projectRepository;
        this.clientRepository = clientRepository;
    }

    @RequestMapping("/index")
    public String userIndex() {
        return "/user/index";
    }

    @RequestMapping("/tableOverview")
    public String graph(Model model) {
        model.addAttribute("graphClient", clientRepository.graph(150));
        model.addAttribute("graphProject", projectRepository.graph(150));
        return "/user/tableOverview";
    }

    @RequestMapping("/employeeByScore")
    public String employeeByScore(Model model) {
        model.addAttribute("graphEmployee", employeeRepository.employeesOfAllTime(150)); //works
        return "/user/employeeByScore";
    }

    @RequestMapping("/newProject")
    public String newProject(Model model) {
        model.addAttribute("projectToken", new Project());
        System.out.println(employeeRepository.count()); //works
        System.out.println(employeeRepository.findAll(50)); //fails???
        model.addAttribute("employees", employeeRepository.findAll());
        model.addAttribute("employeeList", new ArrayList<WorkedOn>());
        model.addAttribute("clients", clientRepository.findAll());
        return "/user/create/newProject";
    }
}
Project domain
package org.jarivm.relationGraph.domains;

import org.neo4j.ogm.annotation.GraphId;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Relationship;
import org.neo4j.ogm.annotation.typeconversion.DateString;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

/**
 * @author Jari Van Melckebeke
 * @since 20.09.16
 */
@NodeEntity(label = "Project")
@Component
public class Project {

    @GraphId
    private Long id;

    private Double cost;
    private Double scoreFromClient;
    private List<String> conflicts;
    private Long nConflicts;
    private String name;
    private String version;
    private String language;

    @DateString(value = "yyyy-MM-dd")
    private Date dateStarted;
    @DateString(value = "yyyy-MM-dd")
    private Date dateFinished;

    @Relationship(type = "Issued")
    private Issued issued;

    public Project(String name) {
        this.name = name;
    }


    public Project() {
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setCost(Double cost) {
        this.cost = cost;
    }

    public Double getScoreFromClient() {
        return scoreFromClient;
    }

    public void setScoreFromClient(Double scoreFromClient) {
        this.scoreFromClient = scoreFromClient;
    }

    public List<String> getConflicts() {
        return conflicts;
    }

    public void setConflicts(List<String> conflicts) {
        this.conflicts = conflicts;
    }

    public Long getnConflicts() {
        return nConflicts;
    }

    public void setnConflicts(Long nConflicts) {
        this.nConflicts = nConflicts;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public Long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public Double getCost() {
        return cost;
    }

    public void setCost(double cost) {
        this.cost = cost;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getDateStarted() {
        return dateStarted;
    }

    public void setDateStarted(Date dateStarted) {
        this.dateStarted = dateStarted;
    }

    public Date getDateFinished() {
        return dateFinished;
    }

    public void setDateFinished(Date dateFinished) {
        this.dateFinished = dateFinished;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public Issued getIssued() {
        return issued;
    }

    public void setIssued(Issued issued) {
        this.issued = issued;
    }

    @Override
    public String toString() {
        return "Project{" +
                "id=" + id +
                ", cost=" + cost +
                ", scoreFromClient=" + scoreFromClient +
                ", conflicts=" + conflicts +
                ", nConflicts=" + nConflicts +
                ", name='" + name + '\'' +
                ", version='" + version + '\'' +
                ", language='" + language + '\'' +
                ", dateStarted=" + dateStarted +
                ", dateFinished=" + dateFinished +
                '}';
    }
}
error log
2016-10-21 19:19:00.118 ERROR 30643 --- [nio-2904-exec-6] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.neo4j.ogm.exception.MappingException: Error mapping GraphModel to instance of org.jarivm.relationGraph.domains.Employee] with root cause

java.lang.IllegalArgumentException: argument type mismatch
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
    at org.neo4j.ogm.entity.io.MethodWriter.write(MethodWriter.java:40) ~[neo4j-ogm-core-2.0.5.jar:na]
    at org.neo4j.ogm.entity.io.MethodWriter.write(MethodWriter.java:70) ~[neo4j-ogm-core-2.0.5.jar:na]
    at org.neo4j.ogm.context.GraphEntityMapper.writeProperty(GraphEntityMapper.java:234) ~[neo4j-ogm-core-2.0.5.jar:na]
    at org.neo4j.ogm.context.GraphEntityMapper.setProperties(GraphEntityMapper.java:186) ~[neo4j-ogm-core-2.0.5.jar:na]
    at org.neo4j.ogm.context.GraphEntityMapper.mapNodes(GraphEntityMapper.java:162) ~[neo4j-ogm-core-2.0.5.jar:na]
    at org.neo4j.ogm.context.GraphEntityMapper.mapEntities(GraphEntityMapper.java:145) ~[neo4j-ogm-core-2.0.5.jar:na]
    at org.neo4j.ogm.context.GraphEntityMapper.map(GraphEntityMapper.java:120) ~[neo4j-ogm-core-2.0.5.jar:na]
    at org.neo4j.ogm.context.GraphEntityMapper.map(GraphEntityMapper.java:85) ~[neo4j-ogm-core-2.0.5.jar:na]
    at org.neo4j.ogm.session.delegates.LoadByTypeDelegate.loadAll(LoadByTypeDelegate.java:75) ~[neo4j-ogm-core-2.0.5.jar:na]
    at org.neo4j.ogm.session.delegates.LoadByTypeDelegate.loadAll(LoadByTypeDelegate.java:112) ~[neo4j-ogm-core-2.0.5.jar:na]
    at org.neo4j.ogm.session.Neo4jSession.loadAll(Neo4jSession.java:151) ~[neo4j-ogm-core-2.0.5.jar:na]
    at org.springframework.data.neo4j.template.Neo4jTemplate.loadAll(Neo4jTemplate.java:100) ~[spring-data-neo4j-4.1.3.RELEASE.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136) ~[spring-tx-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at com.sun.proxy.$Proxy85.loadAll(Unknown Source) ~[na:na]
    at org.springframework.data.neo4j.repository.GraphRepositoryImpl.findAll(GraphRepositoryImpl.java:125) ~[spring-data-neo4j-4.1.3.RELEASE.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:503) ~[spring-data-commons-1.12.3.RELEASE.jar:na]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:488) ~[spring-data-commons-1.12.3.RELEASE.jar:na]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:460) ~[spring-data-commons-1.12.3.RELEASE.jar:na]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61) ~[spring-data-commons-1.12.3.RELEASE.jar:na]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[spring-tx-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) ~[spring-tx-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136) ~[spring-tx-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at com.sun.proxy.$Proxy94.findAll(Unknown Source) ~[na:na]
    at org.jarivm.relationGraph.services.UserController.newProject(UserController.java:81) ~[classes/:na]
    at org.jarivm.relationGraph.services.UserController$$FastClassBySpringCGLIB$$b4c5dcbc.invoke(<generated>) ~[classes/:na]
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[spring-tx-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) ~[spring-tx-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.jarivm.relationGraph.services.UserController$$EnhancerBySpringCGLIB$$57d059d2.newProject(<generated>) ~[classes/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.5.5.jar:8.5.5]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:121) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:100) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) ~[spring-security-web-4.1.3.RELEASE.jar:4.1.3.RELEASE]
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:89) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108) [tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) [tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) [tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:784) [tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.5.jar:8.5.5]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802) [tomcat-embed-core-8.5.5.jar:8.5.5]
    at ...

thanks in advance, Jari Van Melckebeke


Answer:

From a first look, you return some properties that are not present in the Project class, e.g. first_name and last_name. This looks to me like you intended to return a User node as well? Also, you return first_name and last_name twice. Additionally, you return several String properties; how is Spring supposed to know which of them should be mapped to the Map index?

I suggest that you define something like this

public class ProjectWithIndexResult {
    private String index;
    private project Project;
    ....
}

and return List<ProjectWithIndexResult> instead of the Map.

Slightly off topic: It's not good code style to have variable names with underscores.