I am trying to get SBT running on my Mac Operating System.
So far, I downloaded the Jar-Launcher and installed in into the /bin folder.
Then I created a SBT script, containing the following lines:
export PATH=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin:$PATH
java -Xmx512M -jar ` $0` /bin/sbt-launch-0.7.7.jar "$#"
When I call SBT on the Console, I receive the following series of error messages:
> /bin/sbt: fork: Resource temporarily unavailable
java.io.IOException: Cannot run program "sh": error=35, Resource temporarily unavailable
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:466)
at jline.UnixTerminal.exec(UnixTerminal.java:297)
at jline.UnixTerminal.exec(UnixTerminal.java:282)
at jline.UnixTerminal.stty(UnixTerminal.java:273)
at jline.UnixTerminal.initializeTerminal(UnixTerminal.java:77)
at jline.Terminal.setupTerminal(Terminal.java:75)
at jline.Terminal.getTerminal(Terminal.java:26)
at xsbt.boot.JLine$.terminal(SimpleReader.scala:20)
at xsbt.boot.JLine$.createReader(SimpleReader.scala:22)
at xsbt.boot.SimpleReader$.<init>(SimpleReader.scala:42)
at xsbt.boot.SimpleReader$.<clinit>(SimpleReader.scala)
at xsbt.boot.Initialize$.create(Create.scala:17)
at xsbt.boot.Launch$.parsed(Launch.scala:28)
at xsbt.boot.Launch$.configured(Launch.scala:21)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Launch$.apply(Launch.scala:13)
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.run(Boot.scala:19)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.io.IOException: error=35, Resource temporarily unavailable
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
at java.lang.ProcessImpl.start(ProcessImpl.java:91)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 21 more
What is going wrong here?
Looks like you have a stray $0 there (which is expanded to the name of the current process sh). Try
java -Xmx512M -jar /bin/sbt-launch-0.7.7.jar "$#"
instead. That should get you up and running. The usual way is to call sbt like so:
java -Xmx512M -jar `dirname $0`/sbt-launch.jar "$#"
supposed you have the shell script sbt in the same folder as sbt-launch.jar because that is where dirname $0 points at.
Related
I'm trying to get to grips with command line operations of NetLogo on a Windows 10 machine. I want to run the Fire.nlogo model provided.
I set the directory with cd C:\Program Files\NetLogo 6.0.2
Then I try to run a simple experiment called experiment1 which I've written beforehand in BehaviourSpace
netlogo-headless --model Fire.nlogo --experiment experiment1
This gives me the following error:
Exception in thread "main" java.io.FileNotFoundException: C:\Program Files\NetLogo 6.0.2\Fire.nlogo (The system cannot find the file specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at scala.io.Source$.fromFile(Source.scala:91)
at scala.io.Source$.fromFile(Source.scala:76)
at scala.io.Source$.fromURI(Source.scala:121)
at org.nlogo.fileformat.AbstractNLogoFormat.$anonfun$sections$1(NLogoFormat.scala:37)
at scala.util.Try$.apply(Try.scala:209)
at org.nlogo.fileformat.AbstractNLogoFormat.sections(NLogoFormat.scala:36)
at org.nlogo.fileformat.AbstractNLogoFormat.sections$(NLogoFormat.scala:34)
at org.nlogo.fileformat.NLogoFormat.sections(NLogoFormat.scala:16)
at org.nlogo.api.ModelFormat.load(ModelFormat.scala:53)
at org.nlogo.api.ModelFormat.load$(ModelFormat.scala:51)
at org.nlogo.fileformat.NLogoFormat.load(NLogoFormat.scala:16)
at org.nlogo.api.FormatterPair.load(ModelLoader.scala:26)
at org.nlogo.api.ModelLoader.readModel(ModelLoader.scala:60)
at org.nlogo.api.ModelLoader.readModel$(ModelLoader.scala:57)
at org.nlogo.api.ConfigurableModelLoader.readModel(ModelLoader.scala:90)
at org.nlogo.headless.HeadlessWorkspace.open(HeadlessWorkspace.scala:491)
at org.nlogo.headless.Main$.newWorkspace$1(Main.scala:18)
at org.nlogo.headless.Main$.runExperiment(Main.scala:21)
at org.nlogo.headless.Main$.$anonfun$main$1(Main.scala:12)
at org.nlogo.headless.Main$.$anonfun$main$1$adapted(Main.scala:12)
at scala.Option.foreach(Option.scala:257)
at org.nlogo.headless.Main$.main(Main.scala:12)
at org.nlogo.headless.Main.main(Main.scala)
I notice that the output gives the path as C:\Program Files\NetLogo 6.0.2\Fire.nlogobut the model is actually located at C:\Program Files\NetLogo 6.0.2\app\models\Sample Models\Earth Science\Fire.nlogo
Though I seem to be following the tutorials as they're written here https://ccl.northwestern.edu/netlogo/docs/behaviorspace.html
Any ideas where I'm going wrong here? Thanks.
A quick look suggests that you need to give the full file path to the --model argument. So the command would look like:
netlogo-headless --model "C:\Program Files\NetLogo 6.0.2\app\models\Sample Models\Earth Science\Fire.nlogo" --experiment experiment1
Since you have set cd C:\Program Files\NetLogo 6.0.2 you can probably go with
netlogo-headless --model "app\models\Sample Models\Earth Science\Fire.nlogo" --experiment experiment1
Alternatively, you can go to the directory that contains the model you want to run and instead provide the path (again with quotes) to the .bat file
"c:\Program Files\NetLogo 6.0.2\netlogo-headless.bat" --model Fire.nlogo --experiment experiment1
i have a problem.
i'm using installanywhere for some product. (installanywhere 2014 SP1)
setting installanywhere option,
Product > JVM Settings > VM valid List : JDK_1.7+, IBM_JDK_1.7+
this option installer choose openjdk.
i'm success install in openjdk 1.7.0_65, redhat 6.x 64bit os.
but install failed in openjdk 1.7.0_111, redbat 6.x 64bit os.
error message -
===============================================================================
This Test installer (created with InstallAnywhere)
-------------------------------------------------------------------------------
Preparing CONSOLE Mode Installation...
This installer was created with an unlicensed version
of InstallAnywhere. The evaluation period has expired.
Please contact sales#flexerasoftware.com about licensing.
so, commanding [export LAX_DEBUG=true] and install.
under line debug message.
Preparing to install...
Checking for POSIX df.
Found POSIX df.
Checking tail options...
Using tail -n 1.
True location of the self extractor: /opt/Test/Test_Setup_RedHat.bin
Forcing install base (including tmp dir) to: /opt/Test/tmp
Creating installer data directory: /opt/Test/tmp/install.dir.27084
Creating installer data directory: /opt/Test/tmp/install.dir.27084/InstallerData
Gathering free-space information...
Space needed to complete the self-extraction: 16376 blocks
Available space: 242730896 blocks
Available blocks: 242730896 Needed blocks: 16376 (block = 512 bytes)
This installation does not contain a VM.
Extracting the installation resources from the installer archive...
Extracting install.zip from ./Test_Setup_RedHat.bin to /opt/Test/tmp/install.dir.27084/InstallerData/installer.zip ...
Extracting to padded done, exit code = 0
Extracting from padded to zip done, exit code = 0
Creating disk1 data directory: /opt/Test/tmp/install.dir.27084/InstallerData/Disk1
Creating instdata data directory: /opt/Test/tmp/install.dir.27084/InstallerData/Disk1/InstData
Extracting resources from ./Test_Setup_RedHat.bin to /opt/Test/tmp/install.dir.27084/InstallerData/Disk1/InstData/Resource1.zip ...
Extracting done, exit code = 0
Configuring the installer for this system's environment...
[7m========= Analyzing UNIX Environment =================================[0m
Setting UNIX (linux) flavor specifics.
Importing UNIX environment into LAX properties.
Checking for POSIX awk.
[7m========= Analyzing LAX ==============================================[0m
LAX found............................ OK.
LAX properties read.................. OK.
[7m========= Finding VM =================================================[0m
[1mValid VM types.......................... JDK_1.7+, IBM_JDK_1.7+[0m
[1mExpanded Valid VM types................. JDK_1.7+, IBM_JDK_1.7+ [0m
Found jvmspecs.properties
JVM Spec Build Option Specified Without VM
Searching without JVM specs
Searching without JVM specs
[1mWARNING! No valid lax.nl.current.vm available.[0m
/usr/xpg4/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/var/cfengine/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
[1mSearching for VMs in PATH:[0m
Looking in:............................. /usr/xpg4/bin
Looking in:............................. /usr/local/bin
Looking in:............................. /bin
Looking in:............................. /usr/bin
Found VM:............................. /usr/bin/java
Version:............................. 1.7.0_111
Looking in:............................. /usr/local/sbin
Looking in:............................. /usr/sbin
Looking in:............................. /sbin
Looking in:............................. /var/cfengine/bin
Looking in:............................. /bin
Looking in:............................. /usr/bin
Found VM:............................. /usr/bin/java
Version:............................. 1.7.0_111
Looking in:............................. /sbin
Looking in:............................. /usr/sbin
Looking in:............................. /usr/local/bin
checking: "1.7.0_111" against "JDK_1.7+,": failed (wrong version)
checking: "1.7.0_111" against "JDK_1.7+,": failed (wrong version)
checking: "1.7.0_111" against "IBM_JDK_1.7+": passed
[1m Using VM:............................. /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java[0m
[7m========= Virtual Machine Options ====================================[0m
LAX properties incorporated............. OK.
classpath............................... "/opt/Test/tmp/install.dir.27084/InstallerData:/opt/Test/tmp/install.dir.27084/InstallerData/installer.zip"
main class.............................. "com.zerog.ia.installer.Main"
.lax file path.......................... "/opt/Test/tmp/install.dir.27084/temp.lax"
user directory.......................... "/opt/Test/tmp/install.dir.27084"
stdout to............................... "console"
sterr to................................ "console"
install directory....................... ""
JIT..................................... none
option (verify)......................... off
option (verbosity)...................... none
option (garbage collection extent)...... none
option (garbage collection thread)...... none
option (native stack max size).......... none
option (java stack max size)............ none
option (java heap max size)............. 50331648
option (java heap initial size)......... 16777216
option (lax.nl.java.option.additional).. none
[7m========= Display settings ===========================================[0m
X display............................... not set
[1mWARNING: This shell's DISPLAY variable has not been set.
This installer is configured to run in GUI and will probably
fail. Try running this installer in console or silent mode,
or on another UNIX host which has the DISPLAY variable set,
if the installer unexpectedly fails.[0m
UI mode................................. gui
Launching installer...
[7m========= VM Command Line ============================================[0m
[1moptions:[0m
[7mCLASSPATH:[0m/opt/Test/tmp/install.dir.27084/InstallerData:/opt/Test/tmp/install.dir.27084/InstallerData/installer.zip:
[7m========= Forking JAVA =============================================[0m
OpenJDK 64-Bit Server VM warning: Insufficient space for shared memory file:
27084
Try using the -Djava.io.tmpdir= option to select an alternate temp location.
===============================================================================
This Test installer (created with InstallAnywhere)
-------------------------------------------------------------------------------
Preparing CONSOLE Mode Installation...
This installer was created with an unlicensed version
of InstallAnywhere. The evaluation period has expired.
Please contact sales#flexerasoftware.com about licensing.
what should i do? success running open jdk 1.7.0_65, but open jdk 1.7.0_111 failed.
CentOS 6.2 and OpenJDK1.7.0_111 running success.
I am getting an error saying I have a file that is too long in sbt.
[info] Compiling 29 Scala sources to /home/chris/dev/suredbits-core/target/scala-2.11/classes...
[error] File name too long
[error] one error found
[error] (compile:compile) Compilation failed
[error] Total time: 7 s, completed Feb 17, 2015 8:10:25 AM
How do I find out which file is too long so I can shorten the filename? I have added the compiler flag -Xmax-classfile-name and set it to 254.
If your /home is an encrypted file system (e.g. LUKS), you might run into this issue.
Setting max-classfile-name to 254 is the default (or it might be 255) - so you're not reducing it much. You should probably be considering something closer to a max length of 70 - 100. You can set it for all your projects by creating ~/.sbt/0.13/local.sbt with the scalac override:
scalacOptions ++= Seq("-Xmax-classfile-name","78")
This is how I solved my problem
mkdir /tmp/myproject-target
cd ~/workspace/myproject
rm -rf target
ln -s /tmp/myproject-target target
I encountered this problem in IntelliJ Ultimate 2016.1.2 (which resembles Intellij 14). I solved it by setting:
-Xmax-classfile-name 78
In File > Settings... > Build, Execution, Deployment > Compiler > Scala Compiler > Additional Compiler Options.
NOTE: there is a space between the option name and its value ("78"), not an equals sign.
Try using a shell script like this:
#!/bin/sh
for file in *; do {
echo -m "$file" | wc -m;
echo "$file"
}
done
Running this in your src/main/scala directory should show you which files have a name with more than 254 chars. I hope this answers your question.
Setting the file length limits might be unsafe, I could not find any official documentation that this solution is safe.
Using un-encrypted directory is not safe.
I want to offer a different approach:
install veracrypt (in ubuntu with apt)
create a non-encrypted directory (outside the encrypted user home dir)
create a veracrypt file container in the new directory
mount the container in
sbt works fine even if the mount point is in the encrypted directory)
It is possible to create the container with a complex password and mount on login
veracrypt -t --pim=0 --protect-hidden=no -k "" -p $PASSWORD $ENCRYPTED_CONTAINER $MOUNT_DIR
I use the sublime open the ensime project, the ensime server started normal.
After using it for a short time, the following errors occured.
Handling RPC: (swank:completions D:\Scala\ensime\src\main\scala\Main.scala 52 0)
Writing: 000086(:return (:abort 202 "Malformed swank:completions call: (swank:completions D:\Scala\ensime\src\main\scala\Main.scala 52 0)") 21)
Error in socket reader: java.io.EOFException: End of file reached in socket reader.
Got connection, creating handler...
When i use Emacs,from inside emacs,execute M-x ensime.the following errors occured.
d:\myemacs.emacs.d\ensime>set CLASSPATH="d:\myemacs.emacs.d\ensime\bin\..\lib\ant-1.6.5.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\ant-1.8.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\ant-launcher-1.8.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\asm-3.2.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\asm-commons-3.2.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\asm-tree-3.2.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\backport-util-concurrent-3.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\classworlds-1.1-alpha-2.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\critbit-0.0.4.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\ensime_2.9.2-RC1-0.9.3.RC4.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\ivy-2.1.0.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-ant-tasks-2.1.0.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-artifact-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-artifact-manager-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-error-diagnostics-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-model-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-plugin-registry-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-profile-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-project-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-repository-metadata-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-settings-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\nekohtml-1.9.6.2.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\org.eclipse.jdt.core-3.6.0.v_A58.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\org.scala-refactoring_2.9.2-SNAPSHOT-0.5.0-SNAPSHOT.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\plexus-container-default-1.0-alpha-9-stable-1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\plexus-interpolation-1.11.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\plexus-utils-1.5.15.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\scala-compiler.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\scala-library.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\scalariform_2.9.1-0.1.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\wagon-file-1.0-beta-6.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\wagon-http-lightweight-1.0-beta-6.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\wagon-http-shared-1.0-beta-6.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\wagon-provider-api-1.0-beta-6.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\xercesMinimal-1.9.6.2.jar"
d:\myemacs.emacs.d\ensime>if "" == "" (set ENSIME_JVM_ARGS=-Xms256M -Xmx1512M -XX:PermSize=128m -Xss1M -Dfile.encoding=UTF-8 )
d:\myemacs.emacs.d\ensime>java -classpath "d:\myemacs.emacs.d\ensime\bin\..\lib\ant-1.6.5.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\ant-1.8.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\ant-launcher-1.8.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\asm-3.2.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\asm-commons-3.2.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\asm-tree-3.2.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\backport-util-concurrent-3.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\classworlds-1.1-alpha-2.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\critbit-0.0.4.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\ensime_2.9.2-RC1-0.9.3.RC4.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\ivy-2.1.0.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-ant-tasks-2.1.0.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-artifact-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-artifact-manager-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-error-diagnostics-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-model-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-plugin-registry-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-profile-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-project-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-repository-metadata-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\maven-settings-2.2.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\nekohtml-1.9.6.2.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\org.eclipse.jdt.core-3.6.0.v_A58.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\org.scala-refactoring_2.9.2-SNAPSHOT-0.5.0-SNAPSHOT.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\plexus-container-default-1.0-alpha-9-stable-1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\plexus-interpolation-1.11.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\plexus-utils-1.5.15.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\scala-compiler.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\scala-library.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\scalariform_2.9.1-0.1.1.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\wagon-file-1.0-beta-6.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\wagon-http-lightweight-1.0-beta-6.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\wagon-http-shared-1.0-beta-6.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\wagon-provider-api-1.0-beta-6.jar;d:\myemacs.emacs.d\ensime\bin\..\lib\xercesMinimal-1.9.6.2.jar" -Xms256M -Xmx1512M -XX:PermSize=128m -Xss1M -Dfile.encoding=UTF-8 org.ensime.server.Server c:/Users/zxu/AppData/Local/Temp/ensime_port.5320
'java' is not recognized as an internal or external command,
operable program or batch file.
Process inferior-ensime-server exited abnormally with code 1
This problem troubled me for a long time,I can't sleep if these two problems were not be resolved.
Thanks!
My system environment:
OS: Window 7 64bit
JAVA: 1.7 or 1.6
Scala: 2.9.1 final
Sbt: 0.11.3
Ensime: ensime_2.9.2-RC1-0.9.3.RC4.tar.gz
Try adding your Java's bin directory to the PATH environment variable.
When i try to compile scalala i get a OutOfMemoryError:
> compile
[info]
[info] == compile ==
[info] Source analysis: 127 new/modified, 0 indirectly invalidated, 0 removed.
[info] Compiling main sources...
[info] == compile ==
java.lang.OutOfMemoryError: Java heap space
at scala.Tuple2$Zipped.map(Tuple2.scala:63)
at scala.tools.nsc.symtab.Types$TypeMap.mapOver(Types.scala:3134)
at scala.tools.nsc.symtab.Types$TypeMap.mapOver(Types.scala:3024)
at scala.tools.nsc.symtab.Types$SubstMap.apply(Types.scala:3455)
at scala.tools.nsc.symtab.Types$Type.subst(Types.scala:580)
at scala.tools.nsc.symtab.Types$Type.instantiateTypeParams(Types.scala:421)
at scala.tools.nsc.typechecker.Infer$Inferencer.exprTypeArgs(Infer.scala:449)
at scala.tools.nsc.typechecker.Infer$Inferencer.inferExprInstance(Infer.scala:1103)
at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:738)
at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:732)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.typedImplicit1(Implicits.scala:484)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.typedImplicit0(Implicits.scala:449)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.scala$tools$nsc$typechecker$Implicits$ImplicitSearch$$typedImplicit(Implicits.scala:376)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation.tryImplicitInfo$1(Implicits.scala:668)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation.rankImplicits(Implicits.scala:671)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation.findBest(Implicits.scala:695)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:753)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.implicitManifestOrOfExpectedType(Implicits.scala:1069)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1096)
at scala.tools.nsc.typechecker.Implicits$class.inferImplicit(Implicits.scala:57)
at scala.tools.nsc.Global$analyzer$.inferImplicit(Global.scala:347)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$applyImplicitArgs$1.apply(Typers.scala:120)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$applyImplicitArgs$1.apply(Typers.scala:115)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.tools.nsc.typechecker.Typers$Typer.applyImplicitArgs(Typers.scala:115)
at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:760)
at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:732)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.typedImplicit1(Implicits.scala:484)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.typedImplicit0(Implicits.scala:449)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.scala$tools$nsc$typechecker$Implicits$ImplicitSearch$$typedImplicit(Implicits.scala:376)
at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation.tryImplicitInfo$1(Implicits.scala:668)
Error during sbt execution: java.lang.OutOfMemoryError: Java heap space
Exception in thread "Poller SunPKCS11-Darwin" java.lang.OutOfMemoryError: Java heap space
at sun.security.pkcs11.wrapper.PKCS11.C_GetSlotInfo(Native Method)
at sun.security.pkcs11.SunPKCS11.initToken(SunPKCS11.java:767)
at sun.security.pkcs11.SunPKCS11.access$100(SunPKCS11.java:42)
at sun.security.pkcs11.SunPKCS11$TokenPoller.run(SunPKCS11.java:700)
at java.lang.Thread.run(Thread.java:680)
{/Users/axaluss/LIBRARIES/scalala-Scalala-f2876c8/scalala-Scalala-f2876c8}
###[ axaluss ]:
I dont know much about SBT so I dont know what I am doing wrong.
The sbt file I changed to:
java $SBT_OPTS -Dfile.encoding=UTF-8 -Xss4M -Xmx1024M -XX:MaxPermSize=1024M -XX:NewSize=512M -XX:NewRatio=3 -jar `dirname $0`/project/sbt-launch-0.7.5.jar "$#"
Build.properties:
#Project properties
#Mon Apr 11 02:52:55 PDT 2011
project.organization=org.scalala
project.name=scalala
sbt.version=0.7.4
project.version=1.0.0.RC2-SNAPSHOT
def.scala.version=2.9.0
build.scala.versions=2.9.0
project.initialize=false
The same problem occured when compiling for scala 2.8.1.
How can I manage to compile scalala?
Thanks for any help!
Try to increase heap size a bit, in sbt put:
-Xmx1524M
sbt command can read JAVA_OPTS or SBT_OPTS environment variable. Co you can try:
$ JAVA_OPTS=-Xmx1524M
If that doesn't work and you are using OpenJDK on a Linux based OS, then you can also try this:
# echo 1 > /proc/sys/vm/overcommit_memory
Just setting SBT_OPTS may not work as the JAVA_OPTS appear after those and at least my java version "1.7.0_80" uses the last flag to set the heapsize.