Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Christopher Batey
@chbatey
couple of thousand downloads a month, probably the same CI servers repeatedly :)
and used to test the cassandra drivers
Petr Zapletal
@pzapletal
possibly
and you're planning to write Scala API /
?
Christopher Batey
@chbatey
perhaps, it is hard enough making the java and http apis backward compatible :)
Petr Zapletal
@pzapletal
yeah, can imagine that
also, I'll try the fix and if it will work I'll open PR during today. How long would it take to merge it in and publish to repos ?
Christopher Batey
@chbatey
someone just raised a PR upgrading to akka 2.4, likely to break you?
happy to make a release right after merging
Petr Zapletal
@pzapletal
I think I'll have one conflict with, no big deal
btw. do we have any document about contributing ?
Christopher Batey
@chbatey
just the bottom of the read me
Petr Zapletal
@pzapletal
@chbatey could you have a look please - scassandra/scassandra-server#147 ?
Petr Zapletal
@pzapletal
@/all I wrote super simple scala junit test:
class StubbedCassandraTest extends FreeSpecLike with BeforeAndAfter {

  val scassandra = ScassandraFactory.createServer()

  before {
    scassandra.start()
  }

  after {
    scassandra.stop()
  }

  "StubbedCassandraTest" - {
    "should connect to stubbed cassandra" in {

      val primingClient = scassandra.primingClient()
      val activityClient = scassandra.activityClient()

      val preparedStatementPrime = PrimingRequest.preparedStatementBuilder()
        .withQuery("SELECT * FROM foo")
        .build()

      primingClient.prime(preparedStatementPrime)

    }
  }
}
but got following:
[INFO] [04/07/2016 17:24:30.882] [CassandraServerStub-8042-8043-akka.actor.default-dispatcher-6] [akka://CassandraServerStub-8042-8043/user/BinaryTcpListener] Port 8042 ready for Cassandra binary connections. Actor[akka://CassandraServerStub-8042-8043/system/IO-TCP/selectors/$a/0#-1951143371]
[ERROR] [04/07/2016 17:24:30.987] [CassandraServerStub-8042-8043-akka.actor.default-dispatcher-3] [akka://CassandraServerStub-8042-8043/user/PrimingServer/$a] null
akka.actor.ActorInitializationException: exception during creation
    at akka.actor.ActorInitializationException$.apply(Actor.scala:172)
    at akka.actor.ActorCell.create(ActorCell.scala:611)
    at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:461)
    at akka.actor.ActorCell.systemInvoke(ActorCell.scala:483)
    at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:282)
    at akka.dispatch.Mailbox.run(Mailbox.scala:223)
    at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
    at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
    at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
    at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
    at akka.util.Reflect$.instantiate(Reflect.scala:65)
    at akka.actor.ArgsReflectConstructor.produce(IndirectActorProducer.scala:96)
    at akka.actor.Props.newActor(Props.scala:214)
    at akka.actor.ActorCell.newActor(ActorCell.scala:566)
    at akka.actor.ActorCell.create(ActorCell.scala:592)
    ... 9 more
Caused by: java.lang.NoClassDefFoundError: shapeless/PrependAux$
    at spray.routing.directives.PathDirectives$class.pathPrefix(PathDirectives.scala:40)
    at org.scassandra.server.priming.PrimingServerHttpService.pathPrefix(PrimingServer.scala:80)
    at spray.routing.directives.PathDirectives$class.path(PathDirectives.scala:33)
    at org.scassandra.server.priming.PrimingServerHttpService.path(PrimingServer.scala:80)
    at org.scassandra.server.priming.routes.PrimingPreparedRoute$class.$init$(PrimingPreparedRoute.scala:37)
    at org.scassandra.server.priming.PrimingServerHttpService.<init>(PrimingServer.scala:86)
    ... 18 more
Caused by: java.lang.ClassNotFoundException: shapeless.PrependAux$
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 24 more
what did I miss ?
Christopher Batey
@chbatey
urgh, something has gone wrong with that class path!
is that in an IDE or from the cli?
does your project depend on a different version of shapeless?
Christopher Batey
@chbatey
inside java-client i did ../gradlew dependencies
which shows that spray depends on shapeless 2.4
if your project overrides this to a version that isn't binary compatible then bad things will happen :(
Christopher Batey
@chbatey
oops it is shapeless 1.2.4
i am guessing your project brings in a shapeless 2.* http://stackoverflow.com/questions/30941202/spray-can-noclassdeffounderror
Christopher Batey
@chbatey
yeah i re-created it on one of my projects by adding 'com.chuusai:shapeless_2.10:2.2.5'
@pzapletal using the shaded fat jar should fix your problems e.g 'org.scassandra:java-client:1.0.3:standalone'
Christopher Batey
@chbatey
@pzapletal i just released 1.0.4 with your change, that and standalone hopefully gets you going. Thanks for the contribution
Petr Zapletal
@pzapletal
@chbatey thank you, will try that. If we decide to use it, I'm sure more will follow ...
Christopher Batey
@chbatey
woo more contributors :)
Petr Zapletal
@pzapletal
@chbatey could you please have a look at this one - scassandra/scassandra-server#148 ?
Christopher Batey
@chbatey
looks good - thanks
do you need that released asap?
Petr Zapletal
@pzapletal
no probs, got a simple test working from scala. Digging deeper. About merging, it's not critical, I can use my local snapshot, but would be handy to have it sooner than later for the rest of the team
Christopher Batey
@chbatey
it is merged, i can push a new release to mvn central today
Petr Zapletal
@pzapletal
excellent, thanks a lot !
Petr Zapletal
@pzapletal
@chbatey one more for you - scassandra/scassandra-server#149 . Thanks !
Christopher Batey
@chbatey
@pzapletal released a new version
Petr Zapletal
@pzapletal
@chbatey thanks !!
yuriabaev
@yuriabaev

HI!
When trying to run the server after build (of feature/76 branch) I get
"no main manifest attribute, in scassandra-server_2.11-1.1.0-SNAPSHOT.jar "

the command I run:
java -Dscassandra.binary.listen-address=0.0.0.0 -Dscassandra.binary.listen-address=0.0.0.0 -Dscassandra.admin.listen-address=0.0.0.0 -jar scassandra-server_2.11-1.1.0-SNAPSHOT.jar

can someone please try and help?
thanks!
Andrew Tolbert
@tolbertam
@yuriabaev there should be an accompanying 'standalone' jar file, i.e.: ./server/build/libs/scassandra-server_2.11-1.1.0-SNAPSHOT-standalone.jar that jar is executable and includes all the dependencies, where the other one doesn't.
I'll update the docs on that branch to indicate that the standalone jar is the one that should be used
yuriabaev
@yuriabaev
great! thanks a lot!
Christopher Batey
@chbatey
@tolbertam if you're on today would you mind doing another release? The latest PR that was merged isn't in a release and i am away today so can't do it
Andrew Tolbert
@tolbertam
^ ah, sorry for some reason i wasn't getting gitter notifications
I was planning on doing that right now for a small change I made, sorry for long delay
Andrew Tolbert
@tolbertam
done (released as 1.1.2), should show up in central soon