Exception in generateClasses when building AppSync project in Debug but not Release - aws-appsync

A project I am working on gives the following error only when the build variant is Debug - whereas for Release the code is generated fine, project builds and AppSync works.
It's only in Debug variant that the following error appears:
java.io.FileNotFoundException: /Users/mike/Documents/Development/Mantra/Android/app/build/generated/source/appsync/generatedIR/debug/src (Is a directory)
The stack trace from the Run Tasks step is:
The GenerateDebugApolloIR task is green and finishes OK
The GenerateDebugApolloClasses is red with subtask generateClasses in error as follows. The java files do not get generated and build fails with below error:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:generateDebugApolloClasses'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.gradle.api.UncheckedIOException: java.io.FileNotFoundException: /Users/mike/Documents/Development/Mantra/Android/app/build/generated/source/appsync/generatedIR/debug/src (Is a directory)
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:57)
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:40)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:76)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:46)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
... 32 more
Caused by: java.io.FileNotFoundException: /Users/mike/Documents/Development/Mantra/Android/app/build/generated/source/appsync/generatedIR/debug/src (Is a directory)
Could anyone point me in the right direction to figure this out?

Reposting my answer to the similar question here: ApolloGraphql FileNotFoundException: source/apollo/generatedIR/debug/src (Is a directory)
Had the same issue with prodRelease config, fixed by renaming prod flavor.
In apps build.gradle I have:
buildTypes {
debug {...}
release {...}
}
productFlavors {
dev {...}
stage {...}
prod {...}
}
which gives me 6 buildVariants
devDebug
devRelease
stageDebug
stageRelease
prodDebug
prodRelease
top 5 were building without a problems locally and on CI, while prodRelease was giving me the same error as you described without any logical explanation. GraphQL files are the same for dev, stage and prod... I've tried to create specific folders for "prod" then for "prodRelease", checked their access rights - all the same for all variants, nothing helped. And prodDebug were building correctly all the time. Then I've renamed prod flavor(don't forget to rename graphql files folder accordingly) and it now works like a charm.

Related

Spark Submit: Class Not Found Exception

I am trying to submit a job to spark on my machine as so:
$ spark-submit --master local --class ai.affable.flint.Foo target/scala-2.11/flint.jar
However, this fails with the following error:
java.lang.ClassNotFoundException: ai.affable.flint.Foo
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
I have verfied that the JAR file exists and has a class called Foo:
$ jar tvf ./target/scala-2.11/flint.jar | grep Foo
2003 Fri Dec 14 20:53:40 MYT 2018 ai/affable/flint/Foo.class
...
This baffles me because:
a) the JAR exists b) the class exists in the jar 3) I have specified the fully qualified path and double checked for any path errors or mispellings.
Does anyone know what I am missing?
EDIT:
I got it to work by recreating the project in a fresh directory.I literally copy pasted the code and repeated the steps.
I will still like to know what I can do in situations like this short of recreating the project.

CRAFTER CMS build issue

I'm trying to build CRAFTER CMS version(3.0.2-SNAPSHOT) using following command as instructed in its web site. I'm continuously getting build error after several minutes.
Build Command:
./gradlew init build deploy
Following is the stack trace which I'm getting:
[INFO] Scanning for projects...
[ERROR] Could not find the selected project in the reactor: !crafter-search-itest -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException
FAILURE: Build failed with an exception.
Where:
Build file '/data/CrafterRepo/craftercms/build.gradle' line: 781
What went wrong:
Execution failed for task ':build'.
[mvn, clean, install, -Dmaven.test.skip=true, -pl, !crafter-search-itest] # ./src/search return a non-zero value (1)
Try:
Run with --info or --debug option to get more log output.
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':build'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: org.gradle.api.GradleException: [mvn, clean, install, -Dmaven.test.skip=true, -pl, !crafter-search-itest] # ./src/search return a non-zero value (1)
at build_2aqvjygbxnaf64xrgv6yyjqsp.executeProcess(/data/CrafterRepo/craftercms/build.gradle:781)
at build_2aqvjygbxnaf64xrgv6yyjqsp.executeProcess(/data/CrafterRepo/craftercms/build.gradle)
at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:479)
at org.gradle.internal.metaobject.BeanDynamicObject.tryInvokeMethod(BeanDynamicObject.java:191)
at org.gradle.groovy.scripts.BasicScript$ScriptDynamicObject.tryInvokeMethod(BasicScript.java:130)
at org.gradle.internal.metaobject.ConfigureDelegate.invokeMethod(ConfigureDelegate.java:80)
at build_2aqvjygbxnaf64xrgv6yyjqsp$_buildModule_closure21.doCall(/data/CrafterRepo/craftercms/build.gradle:666)
at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:71)
at org.gradle.util.ConfigureUtil.configureTarget(ConfigureUtil.java:160)
at org.gradle.util.ConfigureUtil.configureSelf(ConfigureUtil.java:136)
at org.gradle.api.internal.AbstractTask.configure(AbstractTask.java:613)
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:143)
at build_2aqvjygbxnaf64xrgv6yyjqsp.buildModule(/data/CrafterRepo/craftercms/build.gradle:659)
at build_2aqvjygbxnaf64xrgv6yyjqsp.buildModule(/data/CrafterRepo/craftercms/build.gradle:636)
at build_2aqvjygbxnaf64xrgv6yyjqsp$_run_closure10$_closure48$_closure49.doCall(/data/CrafterRepo/craftercms/build.gradle:380)
at build_2aqvjygbxnaf64xrgv6yyjqsp$_run_closure10$_closure48.doCall(/data/CrafterRepo/craftercms/build.gradle:379)
at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:700)
at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:673)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
... 28 more
Get more help at https://help.gradle.org
BUILD FAILED in 51s
2 actionable tasks: 2 executed
Any help is appreciated.
The error indicates that you are not using the required version of maven (3.3.x or higher), please make sure that your version aligns with the one in the README.md in the CrafterCMS project https://github.com/craftercms/craftercms/blob/master/README.md

SBT throws java.io.FileNotFoundException: (Permission denied) on project folder

I'm wondering whether anyone has any experience with a java.io.FileNotFoundException while trying to run SBT.
When I try to get SBT running I get the error below. This happens right after I enter sbt when it tries to load the project definition.
I checked out the files that it says it can't access and they're definitely there and I'm totally stumped as to why it's doing this.
The stack trace is as follows:
[debug] Running task... Cancelable: false, check cycles: false
java.io.FileNotFoundException: /home/blah/blah/project/target/streams/$global/compilers/$global/out (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
at java.io.FileOutputStream.<init>(FileOutputStream.java:165)
at sbt.std.Streams$$anon$3$$anon$2$$anonfun$text$1.apply(Streams.scala:80)
at sbt.std.Streams$$anon$3$$anon$2$$anonfun$text$1.apply(Streams.scala:80)
at sbt.std.Streams$$anon$3$$anon$2.make(Streams.scala:91)
at sbt.std.Streams$$anon$3$$anon$2.text(Streams.scala:80)
at sbt.std.Streams$$anon$3$$anon$2.log(Streams.scala:85)
at sbt.std.TaskStreams$class.log(Streams.scala:31)
at sbt.std.Streams$$anon$3$$anon$2.log(Streams.scala:69)
at sbt.EvaluateTask$$anonfun$logIncomplete$2.log$1(EvaluateTask.scala:95)
at sbt.EvaluateTask$$anonfun$logIncomplete$2.apply(EvaluateTask.scala:99)
at sbt.EvaluateTask$$anonfun$logIncomplete$2.apply(EvaluateTask.scala:94)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
at scala.collection.immutable.List.foreach(List.scala:76)
at sbt.EvaluateTask$.logIncomplete(EvaluateTask.scala:94)
at sbt.EvaluateTask$.logIncResult(EvaluateTask.scala:86)
at sbt.EvaluateTask$.run$1(EvaluateTask.scala:149)
at sbt.EvaluateTask$.runTask(EvaluateTask.scala:160)
at sbt.EvaluateTask$$anonfun$apply$1$$anonfun$apply$3.apply(EvaluateTask.scala:84)
at sbt.EvaluateTask$$anonfun$apply$1$$anonfun$apply$3.apply(EvaluateTask.scala:83)
at scala.Option.map(Option.scala:133)
at sbt.EvaluateTask$$anonfun$apply$1.apply(EvaluateTask.scala:83)
at sbt.EvaluateTask$$anonfun$apply$1.apply(EvaluateTask.scala:82)
at sbt.EvaluateTask$.withStreams(EvaluateTask.scala:120)
at sbt.EvaluateTask$.apply(EvaluateTask.scala:82)
at sbt.EvaluateTask$.evalPluginDef(EvaluateTask.scala:69)
at sbt.Load$$anonfun$2.apply(Load.scala:51)
at sbt.Load$$anonfun$2.apply(Load.scala:51)
at sbt.Load$.buildPluginDefinition(Load.scala:496)
at sbt.Load$.buildPlugins(Load.scala:477)
at sbt.Load$.plugins(Load.scala:465)
at sbt.Load$.loadUnitNew(Load.scala:419)
at sbt.Load$.loadUnit(Load.scala:410)
at sbt.Load$$anonfun$13$$anonfun$apply$11.apply(Load.scala:252)
at sbt.Load$$anonfun$13$$anonfun$apply$11.apply(Load.scala:252)
at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:94)
at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:93)
at sbt.BuildLoader.apply(BuildLoader.scala:137)
at sbt.Load$.loadAll(Load.scala:307)
at sbt.Load$.loadURI(Load.scala:260)
at sbt.Load$.load(Load.scala:256)
at sbt.Load$.load(Load.scala:247)
at sbt.Load$.apply(Load.scala:124)
at sbt.Load$.defaultLoad(Load.scala:39)
at sbt.BuiltinCommands$.doLoadProject(Main.scala:400)
at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:394)
at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:394)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:60)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:60)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)
at sbt.Command$.process(Command.scala:90)
at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(MainLoop.scala:71)
at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(MainLoop.scala:71)
at sbt.State$$anon$2.process(State.scala:170)
at sbt.MainLoop$$anonfun$next$1.apply(MainLoop.scala:71)
at sbt.MainLoop$$anonfun$next$1.apply(MainLoop.scala:71)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.MainLoop$.next(MainLoop.scala:71)
at sbt.MainLoop$.run(MainLoop.scala:64)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:53)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:50)
at sbt.Using.apply(Using.scala:25)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:50)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:33)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:17)
at sbt.MainLoop$.runLogged(MainLoop.scala:13)
at sbt.xMain.run(Main.scala:26)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:57)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:77)
at xsbt.boot.Launch$.run(Launch.scala:57)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
at xsbt.boot.Launch$.launch(Launch.scala:65)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Boot$.runImpl(Boot.scala:32)
at xsbt.boot.Boot$.main(Boot.scala:21)
at xsbt.boot.Boot.main(Boot.scala)
The (Permission denied) error says that you're probably running the sbt command from a user that doesn't have permission for the project you're entering sbt in.
Change folder permissions with chown -R youruser:youruser /path/to/project and it should fix it.
The problem could be that you ran sbt as root and few directories inside target folder became root(hence permission denied issue). You can just run sudo rm -rf target/ and then sbt clean compile to regain those compiled files under your account. Worked for me.
Neither of the answers helped me, but #Priyatham gave a great idea: I've also removed project/project and project/target folders - and it worked.

giter8 throws IllegalArgumentException: Invalid wildcards +refs/pull/*/head:refs/rem otes/origin/pr/*

I have SBT, Scala, and giter8. When I type g8 on the command line it says that it's installed fine, but when I use it to set up a template from a GitHub repository, i.e.
g8 ajhager/libgdx-sbt-project
it throws the following exception:
java.lang.IllegalArgumentException: Invalid wildcards +refs/pull/*/head:refs/remotes/origin/pr/*
at org.eclipse.jgit.transport.RefSpec.<init>(RefSpec.java:142)
at org.eclipse.jgit.transport.RemoteConfig.<init>(RemoteConfig.java:176)
at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:151)
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:121)
at giter8.Apply$class.clone(apply.scala:73)
at giter8.Giter8.clone(giter8.scala:3)
at giter8.Apply$class.inspect(apply.scala:33)
at giter8.Giter8.inspect(giter8.scala:3)
at giter8.Apply$class.inspect(apply.scala:46)
at giter8.Giter8.inspect(giter8.scala:3)
at giter8.Giter8$$anonfun$2.apply(giter8.scala:19)
at giter8.Giter8$$anonfun$2.apply(giter8.scala:18)
at scala.Option.map(Option.scala:133)
at giter8.Giter8.run(giter8.scala:18)
at giter8.Giter8.run(giter8.scala:10)
at giter8.Giter8.run(giter8.scala:3)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:57)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:77)
at xsbt.boot.Launch$.run(Launch.scala:57)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
at xsbt.boot.Launch$.launch(Launch.scala:65)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Boot$.runImpl(Boot.scala:32)
at xsbt.boot.Boot$.main(Boot.scala:21)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.lang.IllegalArgumentException: Invalid wildcard
s +refs/pull/*/head:refs/remotes/origin/pr/*
What's causing it? I use PowerShell, and just trying to get a libgdx sbt project set up.
It may be that the environment(s) - Git Shell / PowerShell - you execute g8 in interferes and hence the error.
Execute g8 in cmd on Windows so no git-related configurations would come into effect.

localrepo throws "Could not locate ... " error when I try to use it

I'm using lein 1.7.1 on a ubuntu machine. I've added localrepo by including
:dev-dependencies [[lein-localrepo "0.3"]]
to my project.clj file. lein deps runs fine but using localrepo like in lein localrepo coords example.jar throws me a nasty error:
Exception in thread "main" java.io.FileNotFoundException: Could not locate leiningen/core/main__init.class or leiningen/core/main.clj on classpath: (localrepo.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:5441)
at clojure.lang.Compiler.eval(Compiler.java:5416)
at clojure.lang.Compiler.load(Compiler.java:5858)
at clojure.lang.RT.loadResourceScript(RT.java:340)
at clojure.lang.RT.loadResourceScript(RT.java:331)
at clojure.lang.RT.load(RT.java:409)
at clojure.lang.RT.load(RT.java:381)
at clojure.core$load$fn__4519.invoke(core.clj:4915)
at clojure.core$load.doInvoke(core.clj:4914)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:4729)
at clojure.core$load_lib.doInvoke(core.clj:4766)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$load_libs.doInvoke(core.clj:4800)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$require.doInvoke(core.clj:4881)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at leiningen.core$resolve_task.invoke(core.clj:208)
at leiningen.core$apply_task.invoke(core.clj:258)
at leiningen.core$_main.doInvoke(core.clj:329)
at clojure.lang.RestFn.applyTo(RestFn.java:139)
at clojure.core$apply.invoke(core.clj:542)
at leiningen.core$_main.invoke(core.clj:332)
at user$eval42.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:5425)
at clojure.lang.Compiler.eval(Compiler.java:5392)
at clojure.core$eval.invoke(core.clj:2382)
at clojure.main$eval_opt.invoke(main.clj:235)
at clojure.main$initialize.invoke(main.clj:254)
at clojure.main$script_opt.invoke(main.clj:270)
at clojure.main$main.doInvoke(main.clj:354)
at clojure.lang.RestFn.invoke(RestFn.java:512)
at clojure.lang.Var.invoke(Var.java:385)
at clojure.lang.AFn.applyToHelper(AFn.java:185)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)
Caused by: java.io.FileNotFoundException: Could not locate leiningen/core/main__init.class or leiningen/core/main.clj on classpath:
at clojure.lang.RT.load(RT.java:412)
at clojure.lang.RT.load(RT.java:381)
at clojure.core$load$fn__4519.invoke(core.clj:4915)
at clojure.core$load.doInvoke(core.clj:4914)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:4729)
at clojure.core$load_lib.doInvoke(core.clj:4766)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$load_libs.doInvoke(core.clj:4800)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$require.doInvoke(core.clj:4881)
at clojure.lang.RestFn.invoke(RestFn.java:551)
at leiningen.localrepo$eval68$loading__4414__auto____69.invoke(localrepo.clj:1)
at leiningen.localrepo$eval68.invoke(localrepo.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:5425)
... 37 more
I've searched this error on the web, but can't find any reference to it or any viable solutions. How do I resolve this error?
I don't believe you're using version 0.3 of the lein-localrepo plugin. I suspect a newer version is being picked up. Version 0.3 doesn't make reference to leiningen.core.main whereas 0.4 or better does. If you manage to get the right plugin installed, I bet it will work fine.