Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during installation on WINDOWS! #745

Open
ghost opened this issue Nov 9, 2017 · 6 comments
Open

Error during installation on WINDOWS! #745

ghost opened this issue Nov 9, 2017 · 6 comments

Comments

@ghost
Copy link

ghost commented Nov 9, 2017

java.io.IOException: Cannot run program "bash" (in directory "C:\Users\UserName"): CreateProcess error=2, O sistema nÒo conseguiu localizar o ficheiro especificado

I just tried these commands here

C:\testes>sbt new scalatra/scalatra.g8

C:\testes>set JAVA_OPTS=-Dhttp.proxyHost=myhgost -Dhttp.proxyPort=80 -Dhttps.proxyHost=myhost -Dhttps.proxyPort=80 -Dhttp.nonProxyHosts=localhost
"C:\Users\UserName.sbt\preloaded\org.scala-sbt\sbt"1.0.3"\jars\sbt.jar"

I ',m not sure if this stuff is really mature yet for real world project, trying jump to node.js. I was in hope any scala web framework were in good fit but not sure if is just advertising or real deal.

@takezoe
Copy link
Member

takezoe commented Nov 9, 2017

@josecarlosbarros I tested sbt new scalatra/scalatra.g8 and it worked completely.
Why bash was run on Windows? How did you install sbt?

@aadrian
Copy link

aadrian commented Nov 9, 2017

@takezoe bash comes with GIT for windows on complete install (together with other unix tools): http://www.mechanicalrevolution.com/blog/git_installation.html

@takezoe
Copy link
Member

takezoe commented Nov 9, 2017

But why bash is run...? Was there stacktrace?

@bab9e9
Copy link

bab9e9 commented Nov 21, 2017

It's frustrating when the very first thing you try to do with SBT fails.

I've seen other "issues" for Jgit, where they fix FS_Win32 to check for bash before trying to use it.
Sorry, I closed those windows.

I'm having a similar problem, here's an exception report:
C:\Users\bab\Scala\sbt>sbt new sbt/scala-seed.g8
"C:\Users\bab.sbt\preloaded\org.scala-sbt\sbt"1.0.3"\jars\sbt.jar"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[info] Set current project to sbt (in build file:/C:/Users/bab/Scala/sbt/)
13:32:30.332 [main] ERROR org.eclipse.jgit.util.FS - Caught exception in FS.readPipe()
java.io.IOException: Cannot run program "bash" (in directory "C:\Users\bab"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) ~[?:1.8.0_152]
at java.lang.Runtime.exec(Runtime.java:620) ~[?:1.8.0_152]
at org.eclipse.jgit.util.FS.readPipe(FS.java:431) ~[?:?]
at org.eclipse.jgit.util.FS_Win32.discoverGitPrefix(FS_Win32.java:113) ~[?:?]
at org.eclipse.jgit.util.FS.gitPrefix(FS.java:517) ~[?:?]
at org.eclipse.jgit.util.SystemReader$Default.openSystemConfig(SystemReader.java:92) ~[?:?]
at org.eclipse.jgit.internal.storage.file.FileRepository.(FileRepository.java:171) ~[?:?]
at org.eclipse.jgit.lib.BaseRepositoryBuilder.build(BaseRepositoryBuilder.java:577) ~[?:?]
at org.eclipse.jgit.api.InitCommand.call(InitCommand.java:113) ~[?:?]
at org.eclipse.jgit.api.CloneCommand.init(CloneCommand.java:161) ~[?:?]
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:132) ~[?:?]
at giter8.JgitHelper$.clone(JgitHelper.scala:116) ~[?:?]
at giter8.JgitHelper$.run(JgitHelper.scala:67) ~[?:?]
at giter8.JgitHelper$.run(JgitHelper.scala:80) ~[?:?]
at giter8.Giter8.$anonfun$run$2(giter8.scala:34) ~[?:?]
at scala.Option.map(Option.scala:146) ~[scala-library.jar:1.0.0]
at giter8.Giter8.run(giter8.scala:33) ~[?:?]
at sbtgiter8resolver.Giter8TemplateResolver.run(Giter8TemplateResolver.scala:31) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_152]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_152]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_152]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_152]
at sbt.TemplateCommandUtil$.call(TemplateCommand.scala:93) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.TemplateCommandUtil$.runTemplate(TemplateCommand.scala:71) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.TemplateCommandUtil$.$anonfun$run$1(TemplateCommand.scala:51) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.TemplateCommandUtil$.$anonfun$run$1$adapted(TemplateCommand.scala:47) ~[main_2.12-1.0.3.jar:1.0.3]
at scala.collection.LinearSeqOptimized.find(LinearSeqOptimized.scala:111) ~[scala-library.jar:1.0.0]
at scala.collection.LinearSeqOptimized.find$(LinearSeqOptimized.scala:108) ~[scala-library.jar:1.0.0]
at scala.collection.immutable.List.find(List.scala:86) ~[scala-library.jar:1.0.0]
at sbt.TemplateCommandUtil$.run(TemplateCommand.scala:47) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.TemplateCommandUtil$.runTemplate(TemplateCommand.scala:34) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.TemplateCommandUtil$.$anonfun$templateCommand$2(TemplateCommand.scala:17) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.Command$.$anonfun$applyEffect$4(Command.scala:125) ~[command_2.12-1.0.3.jar:1.0.3]
at sbt.Command$.$anonfun$applyEffect$2(Command.scala:121) ~[command_2.12-1.0.3.jar:1.0.3]
at sbt.MainLoop$.processCommand(MainLoop.scala:121) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:105) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.State$$anon$1.runCmd$1(State.scala:227) ~[command_2.12-1.0.3.jar:1.0.3]
at sbt.State$$anon$1.process(State.scala:233) ~[command_2.12-1.0.3.jar:1.0.3]
at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:105) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16) ~[util-control_2.12-1.0.2.jar:1.0.2]
at sbt.MainLoop$.next(MainLoop.scala:105) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.MainLoop$.run(MainLoop.scala:98) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:76) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.io.Using.apply(Using.scala:22) ~[io_2.12-1.0.2.jar:1.0.2]
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:70) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:52) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:37) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.MainLoop$.runLogged(MainLoop.scala:29) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.StandardMain$.runManaged(Main.scala:104) ~[main_2.12-1.0.3.jar:1.0.3]
at sbt.xMain.run(Main.scala:71) ~[main_2.12-1.0.3.jar:1.0.3]
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109) ~[?:?]
at xsbt.boot.Launch$.withContextLoader(Launch.scala:128) ~[?:?]
at xsbt.boot.Launch$.run(Launch.scala:109) ~[?:?]
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35) ~[?:?]
at xsbt.boot.Launch$.launch(Launch.scala:117) ~[?:?]
at xsbt.boot.Launch$.apply(Launch.scala:18) ~[?:?]
at xsbt.boot.Boot$.runImpl(Boot.scala:41) ~[?:?]
at xsbt.boot.Boot$.main(Boot.scala:17) ~[?:?]
at xsbt.boot.Boot.main(Boot.scala) ~[?:?]
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method) ~[?:1.8.0_152]
at java.lang.ProcessImpl.(ProcessImpl.java:386) ~[?:1.8.0_152]
at java.lang.ProcessImpl.start(ProcessImpl.java:137) ~[?:1.8.0_152]
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ~[?:1.8.0_152]
... 58 more

A minimal Scala project.

name [Scala Seed Project]:

@takezoe
Copy link
Member

takezoe commented Nov 22, 2017

@bab9e9 Thanks, I could find a cause of this error from your stacktrace!

This is a bug in old versions of JGit. Already it has been fixed in recent versions of JGit. To solve this problem, it requires to upgrade JGit version which is used in giter8. I created an issue to request upgrading JGit version to giter8: foundweekends/giter8#352

@johnlamont
Copy link

still failing a year later

[error] java.io.IOException: Unable to delete file: C:\Windows\TEMP\giter8-99771782408547\src\main\g8.gitignore
[error] at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2400)
[error] at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1721)
[error] at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1617)
[error] at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2391)
[error] at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1721)
[error] at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1617)
[error] at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2391)
[error] at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1721)
[error] at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1617)
[error] at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2391)
[error] at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1721)
[error] at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1617)
[error] at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2391)
[error] at giter8.JgitHelper.cleanup(JgitHelper.scala:58)
[error] at giter8.Giter8.run(giter8.scala:46)
[error] at giter8.Giter8.run(giter8.scala:56)
[error] at sbtgiter8resolver.Giter8TemplateResolver.run(Giter8TemplateResolver.scala:30)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.lang.reflect.Method.invoke(Method.java:498)
[error] at sbt.TemplateCommandUtil$.call(TemplateCommandUtil.scala:120)
[error] at sbt.TemplateCommandUtil$.runTemplate(TemplateCommandUtil.scala:96)
[error] at sbt.TemplateCommandUtil$.$anonfun$run$1(TemplateCommandUtil.scala:72)
[error] at sbt.TemplateCommandUtil$.$anonfun$run$1$adapted(TemplateCommandUtil.scala:68)
[error] at scala.collection.LinearSeqOptimized.find(LinearSeqOptimized.scala:111)
[error] at scala.collection.LinearSeqOptimized.find$(LinearSeqOptimized.scala:108)
[error] at scala.collection.immutable.List.find(List.scala:85)
[error] at sbt.TemplateCommandUtil$.run(TemplateCommandUtil.scala:68)
[error] at sbt.TemplateCommandUtil$.runTemplate(TemplateCommandUtil.scala:55)
[error] at sbt.TemplateCommandUtil$.$anonfun$templateCommand$2(TemplateCommandUtil.scala:25)
[error] at sbt.Command$.$anonfun$applyEffect$4(Command.scala:142)
[error] at sbt.Command$.$anonfun$applyEffect$2(Command.scala:137)
[error] at sbt.Command$.process(Command.scala:181)
[error] at sbt.MainLoop$.processCommand(MainLoop.scala:151)
[error] at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:139)
[error] at sbt.State$$anon$1.runCmd$1(State.scala:246)
[error] at sbt.State$$anon$1.process(State.scala:250)
[error] at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:139)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.MainLoop$.next(MainLoop.scala:139)
[error] at sbt.MainLoop$.run(MainLoop.scala:132)
[error] at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:110)
[error] at sbt.io.Using.apply(Using.scala:22)
[error] at sbt.MainLoop$.runWithNewLog(MainLoop.scala:104)
[error] at sbt.MainLoop$.runAndClearLast(MainLoop.scala:59)
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:44)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:35)
[error] at sbt.StandardMain$.runManaged(Main.scala:138)
[error] at sbt.xMain.run(Main.scala:89)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error] at xsbt.boot.Launch$.run(Launch.scala:109)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error] at xsbt.boot.Launch$.launch(Launch.scala:117)
[error] at xsbt.boot.Launch$.apply(Launch.scala:18)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:56)
[error] at xsbt.boot.Boot$.main(Boot.scala:18)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] java.io.IOException: Unable to delete file: C:\Windows\TEMP\giter8-99771782408547\src\main\g8.gitignore
[error] Use 'last' for the full log.
sbt:projects> exit
[info] shutting down server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants