Scala/Sbt project on IntelliJ - scala

It's been a while since I used Scala and Intellij. But I wanted to learn about Big Data, and I decided to start a course.
I have been trying to setup IntelliJ to run the first project. I installed openjdk 16 and scala 2.12.13.
I am able to run the project from terminal
$ sbt clean compile run
In IntelliJ I created an sbt task with the same commands, but I am getting the following error.
[info] running com.sundogsoftware.sparkstreaming.PrintTweets
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
[error] (run-main-1) java.lang.ExceptionInInitializerError
[error] java.lang.ExceptionInInitializerError
[error] at org.apache.spark.unsafe.array.ByteArrayMethods.<clinit>(ByteArrayMethods.java:54)
[error] at org.apache.spark.internal.config.package$.<init>(package.scala:1006)
[error] at org.apache.spark.internal.config.package$.<clinit>(package.scala)
[error] at org.apache.spark.SparkConf$.<init>(SparkConf.scala:639)
[error] at org.apache.spark.SparkConf$.<clinit>(SparkConf.scala)
[error] at org.apache.spark.SparkConf.set(SparkConf.scala:94)
[error] at org.apache.spark.SparkConf.set(SparkConf.scala:83)
[error] at org.apache.spark.SparkConf.setMaster(SparkConf.scala:115)
[error] at org.apache.spark.SparkContext$.updatedConf(SparkContext.scala:2698)
[error] at org.apache.spark.streaming.StreamingContext$.createNewSparkContext(StreamingContext.scala:862)
[error] at org.apache.spark.streaming.StreamingContext.<init>(StreamingContext.scala:101)
[error] at com.sundogsoftware.sparkstreaming.PrintTweets$.main(PrintTweets.scala:24)
[error] at com.sundogsoftware.sparkstreaming.PrintTweets.main(PrintTweets.scala)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
[error] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[error] Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make private java.nio.DirectByteBuffer(long,int) accessible: module java.base does not "opens java.nio" to unnamed module #3d8f7200
[error] at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
[error] at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
[error] at java.base/java.lang.reflect.Constructor.checkCanSetAccessible(Constructor.java:188)
[error] at java.base/java.lang.reflect.Constructor.setAccessible(Constructor.java:181)
[error] at org.apache.spark.unsafe.Platform.<clinit>(Platform.java:56)
[error] at org.apache.spark.unsafe.array.ByteArrayMethods.<clinit>(ByteArrayMethods.java:54)
[error] at org.apache.spark.internal.config.package$.<init>(package.scala:1006)
[error] at org.apache.spark.internal.config.package$.<clinit>(package.scala)
[error] at org.apache.spark.SparkConf$.<init>(SparkConf.scala:639)
[error] at org.apache.spark.SparkConf$.<clinit>(SparkConf.scala)
[error] at org.apache.spark.SparkConf.set(SparkConf.scala:94)
[error] at org.apache.spark.SparkConf.set(SparkConf.scala:83)
[error] at org.apache.spark.SparkConf.setMaster(SparkConf.scala:115)
[error] at org.apache.spark.SparkContext$.updatedConf(SparkContext.scala:2698)
[error] at org.apache.spark.streaming.StreamingContext$.createNewSparkContext(StreamingContext.scala:862)
[error] at org.apache.spark.streaming.StreamingContext.<init>(StreamingContext.scala:101)
[error] at com.sundogsoftware.sparkstreaming.PrintTweets$.main(PrintTweets.scala:24)
[error] at com.sundogsoftware.sparkstreaming.PrintTweets.main(PrintTweets.scala)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
[error] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[error] stack trace is suppressed; run last Compile / bgRun for the full output
[error] Nonzero exit code: 1
[error] (Compile / run) Nonzero exit code: 1
[error] Total time: 1 s, completed Apr 8, 2021, 8:17:21 AM
I am stuck, I have been trying to vary the setup, delete the .idea folder and invalidate cache/restart intellij. But I am always getting the same error.

Related

error] java.lang.UnsatisfiedLinkError: Can't load library: /Users/user/Library/Caches/JNA/temp/jna6522888454902179447.tmp

I am new to Mac and Scala/Play-framework and trying to setup and run a webapp locally, but getting an error which I assume is an issue with the M1 silicone processor. Installing the webapp with sbt dist works fine, but when running it using command run -Dconfig.file=./app.conf -Djdk.tls.trustNameService=true -Dhttps.port=8080 -Dhttp.port=8081 it gives a jna error. My system operative is Mac Monterey.
Full error:
[error] java.lang.UnsatisfiedLinkError: Can't load library:/Users/roozbeh.merandi/Library/Caches/JNA/temp/jna6522888454902179447.tmp
[error] at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2633)
[error] at java.base/java.lang.Runtime.load0(Runtime.java:768)
[error] at java.base/java.lang.System.load(System.java:1837)
[error] at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1018)
[error] at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:988)
[error] at com.sun.jna.Native.<clinit>(Native.java:195)
[error] at io.methvin.watchservice.jna.CarbonAPI.<clinit>(CarbonAPI.java:20)
[error] at io.methvin.watchservice.jna.CFStringRef.toCFString(CFStringRef.java:23)
[error] at io.methvin.watchservice.MacOSXListeningWatchService.register(MacOSXListeningWatchService.java:127)
[error] at io.methvin.watchservice.WatchablePath.register(WatchablePath.java:50)
[error] at io.methvin.watcher.DirectoryWatcher.register(DirectoryWatcher.java:400)
[error] at io.methvin.watcher.DirectoryWatcher.registerAll(DirectoryWatcher.java:373)
[error] at io.methvin.watcher.DirectoryWatcher.<init>(DirectoryWatcher.java:193)
[error] at io.methvin.watcher.DirectoryWatcher$Builder.build(DirectoryWatcher.java:122)
[error] at play.dev.filewatch.DefaultFileWatchService.watch(DefaultFileWatchService.scala:44)
[error] at play.dev.filewatch.FileWatchService$$anon$1.watch(FileWatchService.scala:95)
[error] at play.runsupport.Reloader.<init>(Reloader.scala:443)
[error] at play.runsupport.Reloader$.reloader$lzycompute$1(Reloader.scala:283)
[error] at play.runsupport.Reloader$.play$runsupport$Reloader$$reloader$1(Reloader.scala:275)
[error] at play.runsupport.Reloader$.startDevMode(Reloader.scala:301)
[error] at play.sbt.run.PlayRun$.devModeServer$lzycompute$1(PlayRun.scala:100)
[error] at play.sbt.run.PlayRun$.devModeServer$1(PlayRun.scala:83)
[error] at play.sbt.run.PlayRun$.$anonfun$playRunTask$3(PlayRun.scala:107)
[error] at play.sbt.run.PlayRun$.$anonfun$playRunTask$3$adapted(PlayRun.scala:67)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] stack trace is suppressed; run last Compile / run for the full output
[error] (Compile / run) java.lang.UnsatisfiedLinkError: Can't load library: /Users/roozbeh.merandi/Library/Caches/JNA/temp/jna6522888454902179447.tmp

How to resolve [error] bad option: '-Ybackend-parallelism'?

I am trying to run sbt publishLocal on the spotify scio project following https://spotify.github.io/scio/Getting-Started.html guide. However, I receive the following error log:
PS C:\tools\scio> sbt publishLocal
[info] welcome to sbt 1.4.7 (Amazon.com Inc. Java 1.8.0_265)
[info] loading global plugins from C:\Users\ROCKEM\.sbt\1.0\plugins
[info] loading settings for project scio-build from plugins.sbt ...
[info] loading project definition from C:\tools\scio\project
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] loading settings for project scio from apache.sbt,build.sbt ...
[info] resolving key references (35839 settings) ...
[info] set current project to scio (in build file:/C:/tools/scio/)
[info] Wrote C:\tools\scio\scio-sql\target\scala-2.13\scio-sql_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-avro\target\scala-2.13\scio-avro_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-core\target\scala-2.13\scio-core_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-macros\target\scala-2.13\scio-macros_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-test\target\scala-2.13\scio-test_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-parquet\target\scala-2.13\scio-parquet_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-tensorflow\target\scala-2.13\scio-tensorflow_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-smb\target\scala-2.13\scio-smb_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-elasticsearch\es7\target\scala-2.13\scio-elasticsearch7_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-redis\target\scala-2.13\scio-redis_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-cassandra\cassandra3\target\scala-2.13\scio-cassandra3_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-jdbc\target\scala-2.13\scio-jdbc_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-google-cloud-platform\target\scala-2.13\scio-google-cloud-platform_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-elasticsearch\es6\target\scala-2.13\scio-elasticsearch6_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Wrote C:\tools\scio\scio-extra\target\scala-2.13\scio-extra_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Main Scala API documentation to C:\tools\scio\scio-macros\target\scala-2.13\api...
[info] Wrote C:\tools\scio\scio-repl\target\scala-2.13\scio-repl_2.13-0.10.0-beta3+6-bb551a41-SNAPSHOT.pom
[info] Main Scala API documentation to C:\tools\scio\scio-core\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-elasticsearch\es7\target\scala-2.13\api...
[info] Main Scala API documentation to C:\tools\scio\scio-sql\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-cassandra\cassandra3\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-redis\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[info] Main Scala API documentation to C:\tools\scio\scio-smb\target\scala-2.13\api...
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-avro\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-google-cloud-platform\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[info] compiling 66 Scala sources and 7 Java sources to C:\tools\scio\scio-google-cloud-platform\target\scala-2.13\classes ...
[info] Main Scala API documentation to C:\tools\scio\scio-elasticsearch\es6\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-jdbc\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-parquet\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-tensorflow\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[info] Main Scala API documentation to C:\tools\scio\scio-test\target\scala-2.13\api...
[error] invalid setting for -Ybackend-parallelism must be between 1 and 16
[error] bad option: '-Ybackend-parallelism'
[error] Symbol 'type com.spotify.scio.bigquery.syntax.ScioContextSyntax' is missing from the classpath.
[error] This symbol is required by 'package com.spotify.scio.bigquery.package'.
[error] Make sure that type ScioContextSyntax is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
[error] A full rebuild may help if 'package.class' was compiled against an incompatible version of com.spotify.scio.bigquery.syntax.
[error] Symbol 'type com.spotify.scio.bigquery.syntax.TableRowSyntax' is missing from the classpath.
[error] This symbol is required by 'package com.spotify.scio.bigquery.package'.
[error] Make sure that type TableRowSyntax is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
[error] A full rebuild may help if 'package.class' was compiled against an incompatible version of com.spotify.scio.bigquery.syntax.
[error] Symbol 'type com.spotify.scio.bigquery.syntax.TableReferenceSyntax' is missing from the classpath.
[error] This symbol is required by 'package com.spotify.scio.bigquery.package'.
[error] Make sure that type TableReferenceSyntax is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
[error] A full rebuild may help if 'package.class' was compiled against an incompatible version of com.spotify.scio.bigquery.syntax.
[error] three errors found
[error] Scaladoc generation failed
[error] at xsbt.Runner.run(ScaladocBridge.scala:50)
[error] at xsbt.ScaladocBridge.run(ScaladocBridge.scala:21)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:155)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:134)
[error] at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:52)
[error] at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:40)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:79)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:72)
[error] at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:63)
[error] at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:61)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:68)
[error] at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error] at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1978)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] Scaladoc generation failed
[error] at xsbt.Runner.run(ScaladocBridge.scala:50)
[error] at xsbt.ScaladocBridge.run(ScaladocBridge.scala:21)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:155)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:134)
[error] at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:52)
[error] at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:40)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:79)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:72)
[error] at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:63)
[error] at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:61)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:68)
[error] at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error] at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1978)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] Scaladoc generation failed
[error] at xsbt.Runner.run(ScaladocBridge.scala:50)
[error] at xsbt.ScaladocBridge.run(ScaladocBridge.scala:21)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:155)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:134)
[error] at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:52)
[error] at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:40)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:79)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:72)
[error] at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:63)
[error] at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:61)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:68)
[error] at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error] at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1978)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] Scaladoc generation failed
[error] at xsbt.Runner.run(ScaladocBridge.scala:50)
[error] at xsbt.ScaladocBridge.run(ScaladocBridge.scala:21)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:155)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:134)
[error] at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:52)
[error] at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:40)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:79)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:72)
[error] at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:63)
[error] at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:61)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:68)
[error] at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error] at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1978)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] Scaladoc generation failed
[error] at xsbt.Runner.run(ScaladocBridge.scala:50)
[error] at xsbt.ScaladocBridge.run(ScaladocBridge.scala:21)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:155)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:134)
[error] at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:52)
[error] at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:40)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:79)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:72)
[error] at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:63)
[error] at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:61)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:68)
[error] at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error] at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1978)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] Scaladoc generation failed
[error] at xsbt.Runner.run(ScaladocBridge.scala:50)
[error] at xsbt.ScaladocBridge.run(ScaladocBridge.scala:21)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:155)
[error] at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:134)
[error] at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:52)
[error] at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:40)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:79)
[error] at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:72)
[error] at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:63)
[error] at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:61)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:68)
[error] at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error] at sbt.Defaults$.$anonfun$docTaskSettings$3(Defaults.scala:1978)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (scio-avro / Compile / doc) Scaladoc generation failed
[error] (scio-cassandra3 / Compile / doc) Scaladoc generation failed
[error] (scio-tensorflow / Compile / doc) Scaladoc generation failed
[error] (scio-macros / Compile / doc) Scaladoc generation failed
[error] (scio-core / Compile / doc) Scaladoc generation failed
[error] (scio-google-cloud-platform / Compile / compileIncremental) Compilation failed
[error] (scio-elasticsearch6 / Compile / doc) Scaladoc generation failed
[error] (scio-smb / Compile / doc) Scaladoc generation failed
[error] (scio-redis / Compile / doc) Scaladoc generation failed
[error] (scio-sql / Compile / doc) Scaladoc generation failed
[error] (scio-jdbc / Compile / doc) Scaladoc generation failed
[error] (scio-elasticsearch7 / Compile / doc) Scaladoc generation failed
[error] (scio-parquet / Compile / doc) Scaladoc generation failed
[error] (scio-test / Compile / doc) Scaladoc generation failed
[error] (scio-google-cloud-platform / Compile / doc) Scaladoc generation failed
[error] Total time: 23 s, completed 05-Feb-2021 10:52:19
Build.sbt can be viewed here.
How can I fix the backend parallelism issue?

How can I get the Scala.js 1.3.0 tutorial to run?

I thought I would try out Scala.js 1.3.0, but I cannot get the tutorial at scalajs-tutorial to run following the instructions at Basic Turorial What I get is
[error] stack trace is suppressed; run last Compile / scalaJSIR for the full output
[error] (Compile / scalaJSIR) java.nio.file.FileSystemLoopException: G:\My Drive\Git\scalajs-tutorial\target\scala-2.13\classes\tutorial
[error] Total time: 15 s, completed Oct. 16, 2020, 9:24:08 a.m.
sbt:Scala.js Tutorial>
sbt:Scala.js Tutorial> last Compile / scalaJSIR
[error] java.nio.file.FileSystemLoopException: G:\My Drive\Git\scalajs-tutorial\target\scala-2.13\classes\tutorial
[error] at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:294)
[error] at java.base/java.nio.file.FileTreeWalker.next(FileTreeWalker.java:373)
[error] at java.base/java.nio.file.Files.walkFileTree(Files.java:2840)
[error] at org.scalajs.linker.PathIRContainer$.org$scalajs$linker$PathIRContainer$$walkIR(PathIRContainer.scala:95)
[error] at org.scalajs.linker.PathIRContainer$.$anonfun$fromClasspath$4(PathIRContainer.scala:37)
[error] at scala.collection.TraversableLike$WithFilter.$anonfun$foreach$1(TraversableLike.scala:877)
[error] at scala.collection.immutable.List.foreach(List.scala:392)
[error] at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:876)
[error] at org.scalajs.linker.PathIRContainer$.$anonfun$fromClasspath$2(PathIRContainer.scala:33)
[error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
[error] at scala.concurrent.impl.ExecutionContextImpl$DefaultThreadFactory$$anon$1$$anon$2.block(ExecutionContextImpl.scala:75)
[error] at java.base/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3127)
[error] at scala.concurrent.impl.ExecutionContextImpl$DefaultThreadFactory$$anon$1.blockOn(ExecutionContextImpl.scala:87)
[error] at scala.concurrent.package$.blocking(package.scala:146)
[error] at org.scalajs.linker.PathIRContainer$.$anonfun$fromClasspath$1(PathIRContainer.scala:33)
[error] at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:659)
[error] at scala.util.Success.$anonfun$map$1(Try.scala:255)
[error] at scala.util.Success.map(Try.scala:213)
[error] at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
[error] at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
[error] at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
[error] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
[error] at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1429)
[error] at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
[error] at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
[error] at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
[error] at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
[error] at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
[error] (Compile / scalaJSIR) java.nio.file.FileSystemLoopException: G:\My Drive\Git\scalajs-tutorial\target\scala-2.13\classes\tutorial
I don't know why there would be a loop in the file system, since I used git clone to get the repo.
So, the reason there may be a loop in the file system is that I was running the repo in a directory on Google Drive File Stream. This does not seem to be a safe place to build SBT projects...
Moving the repo to the C: drive on my local system solved that problem, but the project still fails to build/run... more to come on a different post...

Sbt Project Compilation Error java.lang.NoSuchFieldError: O_TMPFILE

I have cloned sbt project and it has compiled successfully and resolved all dependencies.
But when I run it or run a clean test, it gives the following compilation error:
[error] java.lang.NoSuchFieldError: O_TMPFILE
[error] at org.jruby.RubyFile.createFileClass(RubyFile.java:202)
[error] at org.jruby.Ruby.initCore(Ruby.java:1486)
[error] at org.jruby.Ruby.bootstrap(Ruby.java:1270)
[error] at org.jruby.Ruby.init(Ruby.java:1170)
[error] at org.jruby.Ruby.newInstance(Ruby.java:334)
[error] at org.jruby.javasupport.JavaEmbedUtils.initialize(JavaEmbedUtils.java:79)
[error] at org.asciidoctor.internal.JRubyAsciidoctor.createJRubyAsciidoctorInstance(JRubyAsciidoctor.java:126)
[error] at org.asciidoctor.internal.JRubyAsciidoctor.create(JRubyAsciidoctor.java:57)
[error] at org.asciidoctor.Asciidoctor$Factory.create(Asciidoctor.java:668)
[error] at StreamApiBuild$.documentationGenerate(StreamApiBuild.scala:32)
[error] at $bb5b1f84bcb741e43d80$.$anonfun$StreamService$7(build.sbt:43)
[error] at sbt.std.Transform$$anon$3.$anonfun$apply$2(System.scala:46)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (Compile / managedResources) java.lang.NoSuchFieldError: O_TMPFILE
There is no such file in our project O_TMPFILE.
But when i comment the following lines in my build.sbt, it works fine.
.settings(resourceGenerators in Compile += task[Seq[File]] {
documentationGenerate((resourceManaged in Compile).value, name.value, version.value, baseDirectory.value)
})
I need to understand the cause of the error and permanent fix. I have googled more than enough but it didn't solve my problem.
I guess that documentationGenerate uses jRuby internally, and jRuby has problem with java 11 (not sure if case here). My proposition is to run sbt using java8 and see what happens.
https://github.com/jruby/jruby/issues/5334

scala import error from Play starter projects

im getting this error when i try to import play 2.6.12 scala starter project in intellij
Scala plugin version:2017.2.13
Intellij version:Ultimate 2017.2.1
https://www.playframework.com/download#starters
Applying State transformations org.jetbrains.sbt.CreateTasks from /Users/qdt624/Library/Application Support/IntelliJIdea2017.2/Scala/launcher/sbt-structure-1.1.jar
[error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[error] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[error] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[error] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[error] at java.lang.Class.forName0(Native Method)
[error] at java.lang.Class.forName(Class.java:348)
[error] at sbt.internal.inc.ModuleUtilities$.getObject(ModuleUtilities.scala:20)
[error] at sbt.BasicCommands$.$anonfun$call$5(BasicCommands.scala:203)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[error] at scala.collection.immutable.List.foreach(List.scala:389)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[error] at scala.collection.immutable.List.map(List.scala:295)
[error] at sbt.BasicCommands$.$anonfun$call$2(BasicCommands.scala:203)
[error] at sbt.Command$.$anonfun$applyEffect$4(Command.scala:134)
[error] at sbt.Command$.$anonfun$applyEffect$2(Command.scala:130)
[error] at sbt.MainLoop$.processCommand(MainLoop.scala:153)
[error] at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:136)
[error] at sbt.State$$anon$1.runCmd$1(State.scala:242)
[error] at sbt.State$$anon$1.process(State.scala:248)
[error] at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:136)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.MainLoop$.next(MainLoop.scala:136)
[error] at sbt.MainLoop$.run(MainLoop.scala:129)
[error] at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:107)
[error] at sbt.io.Using.apply(Using.scala:22)
[error] at sbt.MainLoop$.runWithNewLog(MainLoop.scala:101)
[error] at sbt.MainLoop$.runAndClearLast(MainLoop.scala:57)
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:42)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:34)
[error] at sbt.StandardMain$.runManaged(Main.scala:113)
[error] at sbt.xMain.run(Main.scala:76)
[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:41)
[error] at xsbt.boot.Boot$.main(Boot.scala:17)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[error] Use 'last' for the full log.
[info] shutting down server
[INFO] [04/05/2018 00:47:35.443] [Thread-3] [CoordinatedShutdown(akka://sbt-web)] Starting coordinated shutdown from JVM shutdown hook
I have tried deleting .idea folder and reimporting the project
This problem has been fixed and the fix will be available in the next release of the IntelliJ Scala plugin (2018.1.9+) or right now in the Nightly releases.
As a workaround until then, you can close the project and do a fresh import.