cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Error creating bean with name 'databaseManagementService' when using neo4j.version 4.2.4 and java version 17

I am using neo4j.version 4.2.4 and java version 17. Getting error: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'databaseManagementService'

And in configuration file I am getting this issue: 'DatabaseManagementServiceBuilder(java.io.File)' is deprecated

I think there is some version incompatibility issue. Please help where I can check the compatible version for neo4j and spring-boot, when I am using java 17. This is my pom file for reference.

<?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>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.4.6</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>

    <groupId>com.neo.tutorial</groupId>
    <artifactId>neo-tutorial</artifactId>
    <name>tutorial</name>
    <packaging>pom</packaging>
    <version>1.0-SNAPSHOT</version>


    <properties>
        <java.version>17</java.version>
        <flatbuffers.version>1.12.0</flatbuffers.version>
        <neo4j.version>4.2.4</neo4j.version>
        <neo4j-ogm-core.version>3.2.32</neo4j-ogm-core.version>
        <neo4j-ogm-api.version>3.2.32</neo4j-ogm-api.version>
        <neo4j-java-driver.version>4.1.5</neo4j-java-driver.version>
        <liquigraph.version>4.0.2</liquigraph.version>
        <lombok.version>1.18.22</lombok.version>
        <spring-data-neo4j.version>5.3.3.RELEASE</spring-data-neo4j.version>
        <spring-boot-starter.version>2.3.3.RELEASE</spring-boot-starter.version>
        <spring-boot-starter-test.version>2.3.3.RELEASE</spring-boot-starter-test.version>
        <junit.version>4.12</junit.version>
        <grpc.version>1.30.2</grpc.version>
        <aws.version>1.11.825</aws.version>
        <jacoco.version>0.8.2</jacoco.version>
        <mockito-core.version>3.1.0</mockito-core.version>
        <s3mock-junit4.version>2.1.18</s3mock-junit4.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.neo4j</groupId>
                <artifactId>neo4j</artifactId>
                <version>${neo4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.neo4j</groupId>
                <artifactId>neo4j-bolt</artifactId>
                <version>${neo4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.neo4j</groupId>
                <artifactId>neo4j-ogm-core</artifactId>
                <version>${neo4j-ogm-core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.neo4j</groupId>
                <artifactId>neo4j-ogm-api</artifactId>
                <version>${neo4j-ogm-api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.neo4j.driver</groupId>
                <artifactId>neo4j-java-driver</artifactId>
                <version>${neo4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.data</groupId>
                <artifactId>spring-data-neo4j</artifactId>
                <version>${spring-data-neo4j.version}</version>
            </dependency>

            <dependency>
                <groupId>com.google.flatbuffers</groupId>
                <artifactId>flatbuffers-java</artifactId>
                <version>${flatbuffers.version}</version>
            </dependency>
            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-netty</artifactId>
                <version>${grpc.version}</version>
            </dependency>
            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-stub</artifactId>
                <version>${grpc.version}</version>
            </dependency>
            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-api</artifactId>
                <version>${grpc.version}</version>
            </dependency>
            <dependency>
                <groupId>org.liquigraph</groupId>
                <artifactId>liquigraph-core</artifactId>
                <version>${liquigraph.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter</artifactId>
                <version>${spring-boot-starter.version}</version>
            </dependency>
            <dependency>
                <groupId>com.amazonaws</groupId>
                <artifactId>aws-java-sdk-s3</artifactId>
                <version>${aws.version}</version>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.7</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>28.2-android</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito-core.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.adobe.testing</groupId>
                <artifactId>s3mock-junit4</artifactId>
                <version>${s3mock-junit4.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>test</phase>
                            <goals>
                                <goal>report-aggregate</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
1 REPLY 1

Hi @saritatewari4

Neo4j 4.x runs on Java 11.
Can you test with Java version 11 instead of 17?

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online