scala-redis
scala-redis copied to clipboard
Cannot pass compile phase
after following the readme step by step until using the update command in sbt enviroment, the screen logs the follwing msg:
[error] a module is not authorized to depend on itself: net.debasishg#redisclient_2.11;3.0
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) java.lang.IllegalArgumentException: a module is not authorized to depend on itself: net.debasishg#redisclient_2.11;3.0
Any advice?Thanks !
I updated the README with the latest version. Can u please check ? I just tried this and it works ..
Debasishs-MacBook-Air:scala-redis debasishghosh$ pwd
/Users/debasishghosh/projects/redisclient/scala-redis
Debasishs-MacBook-Air:scala-redis debasishghosh$ sbt
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1024M; support was removed in 8.0
[info] Loading global plugins from /Users/debasishghosh/.sbt/0.13/plugins
[info] Loading project definition from /Users/debasishghosh/projects/redisclient/scala-redis/project
[info] Set current project to RedisClient (in build file:/Users/debasishghosh/projects/redisclient/scala-redis/)
> update
[warn] Credentials file /Users/debasishghosh/.sbt/sonatype.credentials does not exist
[info] Updating {file:/Users/debasishghosh/projects/redisclient/scala-redis/}RedisClient...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[success] Total time: 1 s, completed 5 Sep, 2016 2:52:02 PM
> console
[warn] Credentials file /Users/debasishghosh/.sbt/sonatype.credentials does not exist
[info] Compiling 1 Scala source to /Users/debasishghosh/projects/redisclient/scala-redis/target/scala-2.11/classes...
[info] Starting scala interpreter...
[info]
Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_91).
Type in expressions for evaluation. Or try :help.
scala>
@debasishg cannot pass again. The same problem still exist. my scala version is 2.10.6 here and java version is "1.7.0_80".
Before update, can u please try the following in sbt prompt ..
> ++ 2.10.6
> update
@debasishg The ++ 2.10.6 command has no help to the problem solving. And the follwing is the content of my build.sbt:
libraryDependencies ++= Seq(
"net.debasishg" %% "redisclient" % "3.2"
)
//scalacOptions += "-deprecation"
//scalacOptions += "-unchecked"
I thought you were using the build script that comes with redisclient
to play around within sbt console
. But it looks like u r using redisclient
in some other project as a dependency. Is this part of your own build.sbt
? redisclient
comes with it's own build script within the project folder.
Can u please be more specific about what u r trying to do ?
I have past the compile dependency in the built.sbt, but failed in sbt test due to
[info] - should distribute work amongst the clients for 2000000 list operations *** FAILED ***
[info] java.util.concurrent.TimeoutException: Futures timed out after [20 seconds]
[info] at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:219)
[info] at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:223)
[info] at scala.concurrent.Await$$anonfun$result$1.apply(package.scala:190)
[info] at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
[info] at scala.concurrent.Await$.result(package.scala:190)
[info] at com.redis.Bench$.load(Bench.scala:39)
[info] at com.redis.Bench$.listLoad(Bench.scala:33)
[info] at com.redis.PoolSpec$$anonfun$4$$anonfun$apply$mcV$sp$4.apply$mcV$sp(PoolSpec.scala:106)
[info] at com.redis.PoolSpec$$anonfun$4$$anonfun$apply$mcV$sp$4.apply(PoolSpec.scala:105)
[info] at com.redis.PoolSpec$$anonfun$4$$anonfun$apply$mcV$sp$4.apply(PoolSpec.scala:105)
[info] - should set *** FAILED ***
[info] java.lang.RuntimeException: java.net.ConnectException: Connection refused
[info] at com.redis.IO$class.connect(IO.scala:38)
[info] at com.redis.RedisClient.connect(RedisClient.scala:94)
[info] at com.redis.RedisCommand$class.initialize(RedisClient.scala:71)
[info] at com.redis.RedisClient.initialize(RedisClient.scala:94)
[info] at com.redis.RedisClient.<init>(RedisClient.scala:98)
[info] at com.redis.RedisClientFactory.makeObject(Pool.scala:12)
[info] at com.redis.RedisClientFactory.makeObject(Pool.scala:7)
[info] at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)
[info] at com.redis.RedisClientPool.withClient(Pool.scala:43)
[info] at com.redis.cluster.RedisCluster.processForKey(RedisCluster.scala:88)
[info] ...
[info] Cause: java.net.ConnectException: Connection refused
[info] at java.net.PlainSocketImpl.socketConnect(Native Method)
[info] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
[info] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
[info] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
[info] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
[info] at java.net.Socket.connect(Socket.java:589)
[info] at com.redis.IO$class.connect(IO.scala:26)
[info] at com.redis.RedisClient.connect(RedisClient.scala:94)
[info] at com.redis.RedisCommand$class.initialize(RedisClient.scala:71)
[info] at com.redis.RedisClient.initialize(RedisClient.scala:94)
[info] ...
[info] Exception encountered when attempting to run a suite with class name: com.redis.cluster.RedisClusterSpec *** ABORTED ***
[info] java.lang.RuntimeException: java.net.ConnectException: Connection refused
[info] at com.redis.IO$class.connect(IO.scala:38)
[info] at com.redis.RedisClient.connect(RedisClient.scala:94)
[info] at com.redis.RedisCommand$class.initialize(RedisClient.scala:71)
[info] at com.redis.RedisClient.initialize(RedisClient.scala:94)
[info] at com.redis.RedisClient.<init>(RedisClient.scala:98)
[info] at com.redis.RedisClientFactory.makeObject(Pool.scala:12)
[info] at com.redis.RedisClientFactory.makeObject(Pool.scala:7)
[info] at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)
[info] at com.redis.RedisClientPool.withClient(Pool.scala:43)
[info] at com.redis.cluster.RedisCluster$$anonfun$onAllConns$1.apply(RedisCluster.scala:136)
[info] ...
[info] Cause: java.net.ConnectException: Connection refused
[info] at java.net.PlainSocketImpl.socketConnect(Native Method)
[info] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
[info] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
[info] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
[info] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
[info] at java.net.Socket.connect(Socket.java:589)
[info] at com.redis.IO$class.connect(IO.scala:26)
[info] at com.redis.RedisClient.connect(RedisClient.scala:94)
[info] at com.redis.RedisCommand$class.initialize(RedisClient.scala:71)
[info] at com.redis.RedisClient.initialize(RedisClient.scala:94)
You need to manually start redis dockers, like described in travis.yml
docker run -p 6382:6379 -d redis
docker run -p 6381:6379 -d redis
docker run -p 6380:6379 -d redis
docker run -p 6379:6379 -d redis