SBT download error for ivy.xml although it exists - scala

SBT:
[error] download error: Caught java.net.SocketException: Connection reset (Connection reset) while downloading
for example on **sbt-plugin**
https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-plugi
n/scala_2.12/sbt_1.0/2.8.2/ivys/ivy.xml
But ivy.xml exists.
It happens for example on play-samples-2.8.x, with Scala 2.13.1, Play 2.8.2, SBT 1.3.8
Tkank you in advance, Marcin

I think this not a Scala, sbt or play framework related problem, but probably what the Java runtime reports. A glitch in the connection, somehow a change in your ip-address etc. Certainly Java runtime environment, connection or hardware.
Proszę dziękuję.

Related

SBT ResolveException for org.flywaydb#flyway-sbt;3.1

I've been trying to use sbt for compiling the source code of a server app, written in scala. When I run the sbt script, it starts downloading some packages and resolving some dependencies and at the final step, it returns the following error:
sbt.ResolveException: unresolved dependency: org.flywaydb#flyway-sbt;3.1:not found
And if I ignore this error, I can't use commands like "compile", ...
I have compiled this source code before using sbt on ubuntu 14.04 and used the commands I needed, but now I'm running it on another system but on the same operating system and I am getting this error.
Is there anyway to resolve this dependency?
Thanks for your help.
Make sure to switch your resolver from http to https and you should be good

How fix sigar library when I run spray application?

I have a sbt project written in scala. The project uses akka and spray. There is a class with main function. When I run scala console application sometimes I get
[on-spray-can-akka.actor.default-dispatcher-4] [DEBUG] [2014-11-07 16:48:30,336] Sigar: no sigar-amd64-winnt.dll in java.library.path
org.hyperic.sigar.SigarException: no sigar-amd64-winnt.dll in java.library.path
I do not change anything run it again and it runs well. So it can be run successful or fail several times on end. How to fix this?
UPDATED
Also when it start normal there is a message:
[INFO] [11/07/2014 17:02:36.772] [on-spray-can-akka.actor.default-dispatcher-2]
[Cluster(akka://myApp)] Cluster Node [akka.tcp://myApp#127.0.0.1:2551] - Metrics will be
retreived from MBeans, and may be incorrect on some platforms. To increase metric accuracy
add the 'sigar.jar' to the classpath and the appropriate platform-specific native libary to
'java.library.path'. Reason: java.lang.IllegalArgumentException: java.lang.UnsatisfiedLinkError:
org.hyperic.sigar.Sigar.getPid()J
Sigar is a native library for gathering performance stats, used by Typesafe Console atmos Scala library. If you're not interested in hooking up Typesafe Console to your application, you can simply remove all references to atmos library from sbt build script and app config files without affecting your app functionality.

How to fix NoSuchMethodError?

I use Scala 2.10.0RC1 and sbt 0.12.1.
What causes and how can I fix this runtime error (runs fine on 2.9.2)?
The exact error message is:
java.lang.NoSuchMethodError: scala.Predef$ArrowAssoc$.extension$$minus$greater(Ljava/lang/Object;Ljava/lang/Object;)Lscala/Tuple2;
You're running the code with the wrong Scala version. This can have several causes:
misconfiguration of the project with sbt – search for 2.9.2 in config files
stale cache used by sbt – sbt reboot
something else?
If you meticulously check all your sbt configuration files for 2.9.2 and then wipe out all caches, things should run better. Dependencies usually have a version number in the name of the jar file, so running a find on your system will likely point you to the ones you missed.

Play framework 2.0 unresolved dependencies

I have created a scala project with play framework 2.0.
The project compiles and runs fine both with sbt and play commands.
However, the problems started when I tried to add another play project as a dependency to my project, because I needed to reuse some of its classes.
sbt compile succeeds, but play compile/run does not.
They give me the following error:
sbt.ResolveException: unresolved dependency: name_of_old_project_play_dependency: not found
I am also not able to run the project with sbt run; whenever I do a request to the play framework, I get a null pointer exception.
Is that because both the projects are play projects and maybe there is a conflict somewhere?
Any insight would be appreciated!
Please be sure to view the play version since sbt (the build system play uses) may have different versions.
Please verify the build.properties and plugins.sbt play version.
A technique I use to solve unresolved dependencies is to check the links that sbt tries to access.
I manually try to fetch the file by visiting the failed sites. I usually discover I have a version mishap.

Issue getting SBT to work on Mac OS X

I'm trying to use Miles Sabin's HList of his Shapeless project. So I installed sbt from Macports (this is version 0.11).
Unfortunately, when launching sbt, I have the following error message:
java.lang.IncompatibleClassChangeError: Expected static method scala.Predef$.refArrayOps([Ljava/lang/Object;)Lscala/collection/mutable/ArrayOps;
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.lang.IncompatibleClassChangeError: Expected static method scala.Predef$.refArrayOps([Ljava/lang/Object;)Lscala/collection/mutable/ArrayOps;
Search google seems to point that sbt-launch.jar would be in classpath. But even though I export CLASSPATH to "", I still have the issue.
I also directly downloaded the sbt-launch.jar from typesafe, and running with java -jar, with exactly the same problem.
Any idea? Other people having the same issue?
EDIT
I've tracked the problem down to a Java extension under ~/Library/Java/Extensions/scala-library.jar
I have removed it and the problem is gone. I think this has been installed by the TypeSafe stack (TBC).
I have had this error, and generally uninstalling Java, and installing it again will resolve it.
OP posted:
I've tracked the problem down to a Java extension under ~/Library/Java/Extensions/scala-library.jar
I have removed it and the problem is gone. I think this has been installed by the TypeSafe stack (TBC).