Comments (12)
I got the same issue with Play 2.4.1, other than this exception, there is another one:
java.lang.NoClassDefFoundError: Could not initialize class dispatch.Http$
at org.anormcypher.Neo4jREST.sendQuery(Neo4jREST.scala:34) ~[anormcypher_2.11-0.6.0.jar:0.6.0]
at org.anormcypher.CypherStatement.apply(AnormCypher.scala:361) ~[anormcypher_2.11-0.6.0.jar:0.6.0]
at controllers.Application$$anonfun$index$1.apply(Application.scala:12) ~[classes/:na]
at controllers.Application$$anonfun$index$1.apply(Application.scala:10) ~[classes/:na]
at play.api.mvc.ActionBuilder$$anonfun$apply$17.apply(Action.scala:439) ~[play_2.11-2.4.1.jar:2.4.1]
at play.api.mvc.ActionBuilder$$anonfun$apply$17.apply(Action.scala:439) ~[play_2.11-2.4.1.jar:2.4.1]
at play.api.mvc.ActionBuilder$$anonfun$apply$16.apply(Action.scala:408) ~[play_2.11-2.4.1.jar:2.4.1]
at play.api.mvc.ActionBuilder$$anonfun$apply$16.apply(Action.scala:407) ~[play_2.11-2.4.1.jar:2.4.1]
at play.api.mvc.Action$.invokeBlock(Action.scala:533) ~[play_2.11-2.4.1.jar:2.4.1]
at play.api.mvc.Action$.invokeBlock(Action.scala:530) ~[play_2.11-2.4.1.jar:2.4.1]
at play.api.mvc.ActionBuilder$$anon$1.apply(Action.scala:493) ~[play_2.11-2.4.1.jar:2.4.1]
from anormcypher.
The way to use Ws changes between 2.3.x and 2.4.x.
https://www.playframework.com/documentation/2.3.x/ScalaWS
https://www.playframework.com/documentation/2.4.x/ScalaWS
I guess this is the reason why.
from anormcypher.
any solutions?
from anormcypher.
Using Ws directly, it works perfectly
from anormcypher.
Play 2.4 uses async-http-client 1.9. AnormCypher also has a dependency on async-http-client via the dispatch wrapper library, and that version is 1.8. And the upgrade has some breaking changes. Hence the conflict.
You can temporarily use WS directly, as callicles suggested.
There is an experimental branch to return an Enumerator[CypherResultRow] in order to stream very large graph data sets. The underlying http client is Play's WS wrapper instead of dispatch. You are welcome to try it, but it would probably require you to write an adaptor, as the original Future[Stream[CypherResultRow]] api is not yet done. If that branch gets merged, we could switch from dispatch to Play WS and be more closely integrated with Play in the future.
from anormcypher.
Hi Kai-Chen, is there any ETA for the fix yet?
from anormcypher.
Not that I know of, Volkan. And I have to say: very sorry about that. I will ping Wes and see if we can get that done soon. Backward compatibility is super-important, but I don't know any coder that reguarly puts that on the top of his to-do list.
Changing the dependency from ning to play is not trivial, and it would probably end up spilling into the client interface with anormcypher. One solution would be to switch to PlayWS in the newer version, breaking the api before 0.6, and just leave it at that. Even if we decide to take that route, there are still architectural concerns like should we introduce a separate WS client layer (which really would just look very much like either Ning or PlayWS and would have to expose it somehow anyway), and should that be added as an implicit (like what we are doing now) or a required parameter. Another concern is that a standalone client should still be easy to write, i.e. without the need to explicitly configure too much stuff. So it's not just a tiny bug fix :) But I hope we can get that decided soon enough.
from anormcypher.
If you're using Play 2.4, update dispatch to "net.databinder.dispatch" %% "dispatch-core" % "0.11.3",
, this should fix incompatibilities between the new Ning and dispatch libraries.
from anormcypher.
@flashingpumpkin that is so true!!! Thank you very much!
from anormcypher.
It doesn't look like there is a way to support both Play 2.3 and Play 2.4 with the same build of AnormCypher. So going forward, AnormCypher 0.7.0 will be the last version that can be used in Play 2.3. And AnormCypher 0.7.1 will be built with Play 2.4. Both will be released in about a week.
from anormcypher.
- Use AnormCypher 0.7.1 for Play 2.4
- Use AnormCypher 0.7.0 for Play 2.3
from anormcypher.
Perfect Kai-Chen. I will try it now. Thanks a lot!
from anormcypher.
Related Issues (20)
- Add Play 2.5 support HOT 2
- NoSuchMethodError with Play 2.5 HOT 21
- With Neo4j 3.0.x, Cypher query returning 2 results per record (one with actual value, one with null) HOT 7
- Generating Dynamic CQL in AnormCypher HOT 2
- Parse meta data returned from neo4j 3.0 tx endpoint
- Use macro to ensure that all code within the withTx block is executed sequentially HOT 1
- A number of the tests are failing with an exception HOT 5
- AnormCypher fails resolving dependencies HOT 5
- Neo4jREST.mapFormat doesn't support JsNull values HOT 5
- neo4j-jdbc HOT 3
- Async transaction support
- Cannot query data with neo4j 3.2.1 HOT 1
- initialCommands in console
- Query performance regressions since v0.7.1 HOT 2
- repo.anormcypher.org down HOT 3
- Clustering
- Release version for 2.12 HOT 1
- NingWSClient requires akka.stream.Materializer, and is deprecated
- Mirror packages on Maven Central HOT 1
- [email protected]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anormcypher.