spring-projects / spring-data-neo4j

Provide support to increase developer productivity in Java when using Neo4j. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
http://spring.io/projects/spring-data-neo4j
Apache License 2.0
832 stars 618 forks source link

Spring Data Example Tests fail with JDK 9 [DATAGRAPH-999] #1561

Closed spring-projects-issues closed 6 years ago

spring-projects-issues commented 7 years ago

Jens Schauder opened DATAGRAPH-999 and commented

When run without the --permit-illegal-access the neo4j example fails with the following exception when run with JDK9

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.405 s <<< FAILURE! - in example.springdata.neo4j.ActorRepositoryIntegrationTest
shouldBeAbleToSaveAndLoadActor(example.springdata.neo4j.ActorRepositoryIntegrationTest)  Time elapsed: 0.005 s  <<< ERROR!
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: 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.NullPointerException
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.neo4j.ogm.session.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is java.lang.NullPointerException
Caused by: java.lang.NullPointerException

No further details from DATAGRAPH-999

spring-projects-issues commented 6 years ago

Mark Paluch commented

This issue was solved by changes in the Java runtime and Spring Framework itself.

Java 9 compatibility asserted, Spring Data Examples builds with Java 9 in place, see https://github.com/spring-projects/spring-data-examples/issues/360