You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am building an api connecting to a neo4j database using OGM bolt driver. I need to be able to build and run the application in native mode exactly like we run in regular JVM.
Current Behavior
The application is perfectly functional in regular JVM mode. When I build it using GraalVM native mode the driver class is not found/ recongnized. Also, please note that I have the required dependencies in my pom.xml. (Provided stacktrace excerpt below).
Possible Solution
Add support for OGM in native mode?
Stacktrace
Caused by: org.neo4j.ogm.exception.core.ConfigurationException: Could not load driver class org.neo4j.ogm.drivers.bolt.driver.BoltDriver
at org.neo4j.ogm.session.SessionFactory.newConfiguredDriverInstance(SessionFactory.java:271)
at org.neo4j.ogm.session.SessionFactory.(SessionFactory.java:89)
at com.config.SessionFactoryProducer.produceSessionFactory(SessionFactoryProducer.java:33)
at com.config.SessionFactoryProducer_ProducerMethod_produceSessionFactory_90de702675c65462441375a80e04e7de183112f0_Bean.create(SessionFactoryProducer_ProducerMethod_produceSessionFactory_90de702675c65462441375a80e04e7de183112f0_Bean.zig:192)
at com.config.SessionFactoryProducer_ProducerMethod_produceSessionFactory_90de702675c65462441375a80e04e7de183112f0_Bean.get(SessionFactoryProducer_ProducerMethod_produceSessionFactory_90de702675c65462441375a80e04e7de183112f0_Bean.zig:222)
at com.config.SessionFactoryProducer_ProducerMethod_produceSessionFactory_90de702675c65462441375a80e04e7de183112f0_Bean.get(SessionFactoryProducer_ProducerMethod_produceSessionFactory_90de702675c65462441375a80e04e7de183112f0_Bean.zig:245)
at com.service.AccountServiceImpl_Bean.create(AccountServiceImpl_Bean.zig:179)
... 55 more
Caused by: java.lang.ClassNotFoundException: org.neo4j.ogm.drivers.bolt.driver.BoltDriver
at com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:60)
at java.lang.Class.forName(DynamicHub.java:1194)
at org.neo4j.ogm.session.SessionFactory.newConfiguredDriverInstance(SessionFactory.java:266)
... 61 more
Context
We are trying to use the ogm bolt driver and connect to neo4j backend and then trying to build a native image using Quarkus+GraalVM
Your Environment
OGM Version used: 3.2.14
Java Version used: GraalVM CE 20.10 (Java 1.8.0_251)
Neo4J Version used: Neo4j-enterprise-3.5.8
Quarkus Version: 1.6.1.Final
Bolt Driver Version used (if applicable): 3.2.14
Operating System and Version: Mac OS Mojave 10.14.6
The text was updated successfully, but these errors were encountered:
Thanks for your time reaching out @sachinsudhi. As I stated in April here quarkusio/quarkus#8530 (comment) Neo4j-OGM is not happening from our side in native GraalVM mode anytime soon.
The Java-Driver for which we provide the quarkus extension is tested on our side and ensured to work on GraalVM native.
We might gonna explore options with Spring Data Neo4j 6, that is to be released in autumn. The Spring team is working on native compilation and from our side, only the CypherDSL needs to be changed not to use method handles.
Expected Behavior
I am building an api connecting to a neo4j database using OGM bolt driver. I need to be able to build and run the application in native mode exactly like we run in regular JVM.
Current Behavior
The application is perfectly functional in regular JVM mode. When I build it using GraalVM native mode the driver class is not found/ recongnized. Also, please note that I have the required dependencies in my pom.xml. (Provided stacktrace excerpt below).
Possible Solution
Add support for OGM in native mode?
Stacktrace
Caused by: org.neo4j.ogm.exception.core.ConfigurationException: Could not load driver class org.neo4j.ogm.drivers.bolt.driver.BoltDriver
at org.neo4j.ogm.session.SessionFactory.newConfiguredDriverInstance(SessionFactory.java:271)
at org.neo4j.ogm.session.SessionFactory.(SessionFactory.java:89)
at com.config.SessionFactoryProducer.produceSessionFactory(SessionFactoryProducer.java:33)
at com.config.SessionFactoryProducer_ProducerMethod_produceSessionFactory_90de702675c65462441375a80e04e7de183112f0_Bean.create(SessionFactoryProducer_ProducerMethod_produceSessionFactory_90de702675c65462441375a80e04e7de183112f0_Bean.zig:192)
at com.config.SessionFactoryProducer_ProducerMethod_produceSessionFactory_90de702675c65462441375a80e04e7de183112f0_Bean.get(SessionFactoryProducer_ProducerMethod_produceSessionFactory_90de702675c65462441375a80e04e7de183112f0_Bean.zig:222)
at com.config.SessionFactoryProducer_ProducerMethod_produceSessionFactory_90de702675c65462441375a80e04e7de183112f0_Bean.get(SessionFactoryProducer_ProducerMethod_produceSessionFactory_90de702675c65462441375a80e04e7de183112f0_Bean.zig:245)
at com.service.AccountServiceImpl_Bean.create(AccountServiceImpl_Bean.zig:179)
... 55 more
Caused by: java.lang.ClassNotFoundException: org.neo4j.ogm.drivers.bolt.driver.BoltDriver
at com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:60)
at java.lang.Class.forName(DynamicHub.java:1194)
at org.neo4j.ogm.session.SessionFactory.newConfiguredDriverInstance(SessionFactory.java:266)
... 61 more
Context
We are trying to use the ogm bolt driver and connect to neo4j backend and then trying to build a native image using Quarkus+GraalVM
Your Environment
The text was updated successfully, but these errors were encountered: