Code Monkey home page Code Monkey logo

Comments (12)

originrobot avatar originrobot commented on July 22, 2024

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.

callicles avatar callicles commented on July 22, 2024

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.

 avatar commented on July 22, 2024

any solutions?

from anormcypher.

callicles avatar callicles commented on July 22, 2024

Using Ws directly, it works perfectly

from anormcypher.

Kai-Chen avatar Kai-Chen commented on July 22, 2024

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.

vdogan avatar vdogan commented on July 22, 2024

Hi Kai-Chen, is there any ETA for the fix yet?

from anormcypher.

Kai-Chen avatar Kai-Chen commented on July 22, 2024

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.

flashingpumpkin avatar flashingpumpkin commented on July 22, 2024

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.

haffla avatar haffla commented on July 22, 2024

@flashingpumpkin that is so true!!! Thank you very much!

from anormcypher.

Kai-Chen avatar Kai-Chen commented on July 22, 2024

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.

Kai-Chen avatar Kai-Chen commented on July 22, 2024
  • Use AnormCypher 0.7.1 for Play 2.4
  • Use AnormCypher 0.7.0 for Play 2.3

from anormcypher.

vdogan avatar vdogan commented on July 22, 2024

Perfect Kai-Chen. I will try it now. Thanks a lot!

from anormcypher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.