Reputation: 11
i have a problem to run configure.init() in my Jetty-container (run-jetty-run in Eclipse with Springframework )
After reaching configure.init() the client-service blocks without any notice or exception. If i run the same code in a console-java program it works.
I would expect output:
Enter init()
OK init()
Server-Version:2.6.1
Does somebody has any idea or experience with it ? Java-Driver-version is 2.5.7.
Codesnippet:
public void arangoVersion() {
try {
configure = new ArangoConfigure();
write("Enter init()");
configure.init();
write("OK init()"); // never reached :(
arangoDriver = new ArangoDriver(configure);
write("Server-Version:" + arangoDriver.getVersion().getVersion());
} catch (ArangoException ax) {
write("Arango-Exception" + ax.getErrorMessage() + " , Nr. : "
+ ax.getCode());
} catch (Exception ex) {
write("Exception" + ex.getMessage() );
}
}
public void write( String text ) {
System.out.println( text );
// for web: logger.debug( text );
}
Thanks in advance
Upvotes: 0
Views: 172
Reputation: 11
SOLVED
Are there different versions of httpclient.jar in your maven dependencies? The java driver uses httpclient 4.3.6 which is not compatible with older versions. – fceller Aug 28 at 8:20
Yes, indeed there was the mentioned version conflict with httpclient. An older httpclient-version was in an included (Eclipse-)project. So configure.init() is working now.
(I would propose to catch the no-class-found-exception explitely in the Arango-Java-Driver and to make a version-check and output for httpclient. httpclient is widely spread.)
After updating the httpclient and resolving some small incompatibilities with my application the second problem occurs:
Now the ArangoDriver ran into the void with no visible reaction in my spring-application.
A debugging-session revealed that the actions of ArangoDriver where encapsulated in Springframework-transactions due AOP-coverage for all Spring-services and throws a NoClassFound-exception for the ArangoDriver.
After moving the Arango-java-driver in the same Maven-POM-layer as the SpringTX it was running perfectly.
Thanks to all.
Upvotes: 1