Spring boot project uses spring-data-neo4j to connect with neo4j. It can start and access the database normally when running locally all the time. If you write dockerfile well and run on the server with docker compose, you will report an error, such as:
Caused by: java.lang.NullPointerException: null
at org.neo4j.ogm.MetaData.entityType(MetaData.java:280)
The reasons are as follows:
https://github.com/spring-projects/spring-boot/issues/6709
stay pom.xml To solve the problem, add dependency to
<!--Not adding this package to run in docker will report an error-->
<!--https://github.com/spring-guides/gs-accessing-data-neo4j/issues/19-->
<dependency>
<groupId>io.github.lukehutch</groupId>
<artifactId>fast-classpath-scanner</artifactId>
<version>3.1.13</version>
</dependency>
Read More:
- [Solved] Neo4j error: Import-Module & neo4j Neo.ClientError.Security.Unauthorized
- [Solved] Neo4j error: Cannot merge the following node because of null property value for ‘casualty’
- IDEA generates Spring Boot project error: error: read timed out
- [Solved] Neo4j Error: Error occurred during initialization of VM Incompatible minimum and maximum heap sizes spec
- Spring-boot Use dubbo Error: ERROR 8404 o.s.boot.SpringApplication:Application run failed
- [How to Fix] Spring boot startup error: could not resolve placeholder
- Two implementation methods of spring boot scan mapper interface class
- New Spring boot startup error Failed to auto-configure a DataSource
- How to Fix Error when integrating spring cloud openfeign with spring cloud Alibaba
- Causes of error in data transmission from spring boot to JSON
- [Solved] spring boot – JPA–H2 Error: H2 error: “Syntax error in SQL statement … expected identifier“
- Spring Boot Druid Error: discard long time none received connection
- Error running ‘PigSellCabinetApplication’: Command line is too long. Shorten command line for PigSellCabinetApplication or also for Spring Boot default configuration
- Dyf Spring boot startup error: NoSuchBeanDefinitionException
- log4j Error: Please initialize the log4j system properly [How to Solve]
- Prompt unknown error in pom.xml of Maven project
- [Solved] Spring cloud config server can’t parse the YML file of the remote warehouse, and it will also report an error
- [Solved] The version of springcloud must support the current version of springboot, otherwise the startup project will report an error: error starting ApplicationContext
- [Solved] Spring cloud introduces zuul dependency error
- Spring boot uses configuration interface webmvcconfigurer to solve cross domain problems