question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provider HttpDriver not found for version 2.0.5

See original GitHub issue

After updating ogm to v2.0.5, it is not able to load bolt driver if http dependency is not declared. My gradle dependencies looks like:

dependencies {
    ...
    compile 'org.neo4j:neo4j-ogm-core:2.0.5'
    compile 'org.neo4j:neo4j-ogm-bolt-driver:2.0.5'
    // compile 'org.neo4j:neo4j-ogm-http-driver:2.0.5'  --> this is now required
}

Test:

  1. Make sure you do not have neo4j-ogm-http-driver declare as a dependency.
  2. Start your application and you’ll get the following exception:
Exception in thread "main" java.util.ServiceConfigurationError: org.neo4j.ogm.driver.Driver: Provider org.neo4j.ogm.drivers.http.driver.HttpDriver not found
    at java.util.ServiceLoader.fail(ServiceLoader.java:239)
    at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
    at org.neo4j.ogm.service.DriverService.load(DriverService.java:36)
    at org.neo4j.ogm.service.DriverService.load(DriverService.java:59)
    at org.neo4j.ogm.service.Components.loadDriver(Components.java:126)
    at org.neo4j.ogm.service.Components.driver(Components.java:84)
    at org.neo4j.ogm.session.SessionFactory.openSession(SessionFactory.java:81)

Exception at: https://github.com/neo4j/neo4j-ogm/blob/master/api/src/main/java/org/neo4j/ogm/service/DriverService.java#L36

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
vince-bickerscommented, Sep 27, 2016

@xenoterracide I assume you’ve set application.properties to an embedded URI? Spring Boot starter looks at the URI scheme to decide whether to initialise the http driver or the embedded driver.

application.properties

spring.data.neo4j.uri=file:///tmp/sdn-university.db
spring.data.neo4j.session.scope=session

That said, there are additional problems with going to 2.0.5 which you haven’t encountered yet, and that are related to transitive dependencies. Effectively, until spring boot releases a version based on 2.0.5 OGM (it’s built with 2.0.4), you’ll need to explicitly include all the 2.0.5 OGM jar files before any others.

I’ve just updated https://github.com/neo4j-examples/sdn4-university pom file accordingly, and it does work with the embedded driver.

0reactions
xenoterracidecommented, Sep 27, 2016

https://github.com/xenoterracide/spring-boot/commit/03e2778a4b5a797912b6d550d25819392e2b0cd8 pull my code, and run the test and look at the output of the logs and tell me what I’m doing wrong

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reference - OGM Library - Neo4j
This chapter is the reference documentation for Neo4j-OGM.
Read more >
spring-boot-dependencies : 2.3.4.RELEASE - Maven Central
Apache License, Version 2.0. Home page, https://spring.io/projects/spring-boot. Source code, https://github.com/spring-projects/spring-boot. Developers.
Read more >
spring-boot-starter-parent » 2.0.5.RELEASE - Maven Repository
Category/License Version Updates Parser Generator 2.7.7 ✓ EPL 1.0LGPL 2.1 1.2.3 1.4.5 Logging EPL 1.0LGPL 2.1 1.2.3 1.4.5
Read more >
Cairo-SR4 - Spring IO Platform Reference Guide
Group Artifact Version antlr antlr 2.7.7 ch.qos.logback logback‑access 1.2.3 ch.qos.logback logback‑classic 1.2.3
Read more >
Software Packages in "focal", Subsection admin - Ubuntu
... adapt (1.5-0ubuntu1) [universe]: adapt package from one version of Ubuntu to ... command-not-found (20.04.2): Suggest installation of packages in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found