Problem with Neo4j for Spring and java.nio.file.Path

Hello everyone

I have warnings in my console when using java.nio.file.Path in my spring boot application:

o.s.d.n.mapping.Neo4jPersistentProperty  : Owning ClassInfo is null for property: java.nio.file.Path.fileSystem
o.s.d.n.mapping.Neo4jPersistentProperty  : Owning ClassInfo is null for property: java.nio.file.Path.parent
o.s.d.n.mapping.Neo4jPersistentProperty  : Owning ClassInfo is null for property: java.nio.file.Path.fileName
o.s.d.n.mapping.Neo4jPersistentProperty  : Owning ClassInfo is null for property: java.nio.file.Path.absolute
o.s.d.n.mapping.Neo4jPersistentProperty  : Owning ClassInfo is null for property: java.nio.file.Path.root
o.s.d.n.mapping.Neo4jPersistentProperty  : Owning ClassInfo is null for property: java.nio.file.Path.nameCount

Using Path as property in a @NodeEntity POJO makes neo4j crash and unable to restart till the database is removed.

My build.gradle looks as follows:

plugins {
    id 'org.springframework.boot' version '2.1.7.RELEASE'
    id 'idea'
    id 'java'
}

apply plugin: 'io.spring.dependency-management'

sourceCompatibility = '12'

configurations {
    developmentOnly
    runtimeClasspath {
        extendsFrom developmentOnly
    }
    compileOnly {
        extendsFrom annotationProcessor
    }
}

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-data-neo4j'
    implementation 'org.springframework.boot:spring-boot-starter-web'

    implementation group: 'org.modelmapper', name: 'modelmapper', version: '2.3.5'
    implementation group: 'commons-io', name: 'commons-io', version: '2.6'

    developmentOnly 'org.springframework.boot:spring-boot-devtools'
    annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'

    testImplementation group: 'org.neo4j', name: 'neo4j', version: '3.5.8'
    testImplementation group: 'org.neo4j', name: 'neo4j-ogm-embedded-driver', version: '3.1.12'
}

The problem is already known and was solved by not using nio:


Or by importing "fast-classpath-scanner" which did not work in my case:

Thank you for your help.

Hi Kep1er,

Can you post the code for your Node Entity?

Cheers!

The warning comes even if you don't use any nio objects in your @NodeEntity objects.
Here is my class with java.nio.file.Path.

@NodeEntity
public class Document extends Persisted {

    private String name;

    @Relationship(type = "DOCUMENT", direction = Relationship.INCOMING)
    @JsonBackReference
    private ProcessStep processStep;

    private Document templateDocument;

    private Path path;

    public Document() {
    }

   // Getter/setter omitted
}