mill: Failed resolvedAmmoniteReplIvyDeps - scala

I have following very simple module definition in build.src
import mill._
import mill.bsp.BSP.millSourcePath
import mill.scalalib.{JavaModule, ScalaModule}
object scalaMod0 extends ScalaModule {
override def scalaVersion = "2.13.6"
}
Mill version is 0.9.9
Then I try to run
mill show scalaMod0.resolvedAmmoniteReplIvyDeps
1/1] show interp.watchValue millSourcePath: /home/jk/workspace.exp/hands-on-scala/mill01
[1/1] show > [9/9] scalaMod0.resolvedAmmoniteReplIvyDeps | Downloading [2/2] artifacts (~0/0 bytes)
1 targets failed
show 1 targets failed
scalaMod0.resolvedAmmoniteReplIvyDeps
Resolution failed for 1 modules:
--------------------------------------------
com.lihaoyi:ammonite_2.13.6:2.3.8-65-0f0d597f
not found: /home/jk/.ivy2/local/com.lihaoyi/ammonite_2.13.6/2.3.8-65-0f0d597f/ivys/ivy.xml
not found: https://repo1.maven.org/maven2/com/lihaoyi/ammonite_2.13.6/2.3.8-65-0f0d597f/ammonite_2.13.6-2.3.8-65-0f0d597f.pom
The contents of https://repo1.maven.org/maven2/com/lihaoyi/ammonite_2.13.6 are following:
com/lihaoyi/ammonite_2.13.6
../
2.3.8-122-9be39deb/ 2021-05-17 21:19 -
2.3.8-123-0b9a8c9b/ 2021-05-18 14:20 -
2.3.8-124-2da846d2/ 2021-05-19 04:57 -
2.3.8-125-f6bb1cf9/ 2021-06-08 13:15 -
2.3.8-67-4b6c67db/ 2021-05-17 19:50 -
2.4.0/ 2021-06-08 13:25 -
2.4.0-10-40f87721/ 2021-07-27 12:49 -
2.4.0-11-5b9ff5e7/ 2021-07-27 12:57 -
2.4.0-12-69f45b4b/ 2021-07-27 13:05 -
2.4.0-13-6ffcb9ff/ 2021-07-30 16:49 -
2.4.0-14-4824b429/ 2021-08-02 15:59 -
2.4.0-17-6dbd7856/ 2021-08-30 14:06 -
2.4.0-18-12c9e33e/ 2021-09-01 15:35 -
2.4.0-19-f4790b61/ 2021-09-01 16:24 -
2.4.0-20-f3d8171f/ 2021-09-09 16:33 -
2.4.0-22-a70409dc/ 2021-09-09 23:09 -
2.4.0-23-76673f7f/ 2021-09-16 16:30 -
2.4.0-5-534c9436/ 2021-07-15 18:25 -
2.4.0-6-426d8ae5/ 2021-07-27 10:13 -
2.4.0-9-0017ff97/ 2021-07-27 11:59 -
maven-metadata.xml 2021-09-16 16:32 1175
maven-metadata.xml.md5 2021-09-16 16:32 32
maven-metadata.xml.sha1 2021-09-16 16:32 40
maven-metadata.xml.sha256 2021-09-16 16:32 64
maven-metadata.xml.sha512 2021-09-16 16:32 128
So the requested dir 2.3.8-65-0f0d597f does not exist.
How can I fix this?
Where is this 2.3.8-65-0f0d597f configured or selected? Why does mill want exactly this non-existing ammonite version?
When I start my local installed ammonite, it shows following version information:
amm
Loading...
Welcome to the Ammonite Repl 2.2.0 (Scala 2.13.3 Java 11.0.11)
Thank you for your help!

This is already discussed in the mill discussions forum (https://github.com/com-lihaoyi/mill/discussions/1396).
I'm mostly quoting an adapted version here:
Mill will by default pick the same ammonite version which it uses internally. But as ammonite releases need to match the full Scala version, and the pre-selected ammonite version (2.3.8-65-0f0d597f) wasn't released for Scala 2.13.6, you need to specify another ammonite version by overriding def ammoniteVersion.
For example:
import mill._
import mill.scalalib.ScalaModule
object scalaMod0 extends ScalaModule {
override def scalaVersion = "2.13.6"
override def ammoniteVersion = "2.4.0"
// ...
}

Related

Can SparkContext.setCheckpointDir(hdfsPath) set same hdfsPath in different spark apps?

As docs of:
https://spark.apache.org/docs/2.2.1/api/java/org/apache/spark/SparkContext.html#setCheckpointDir-java.lang.String-
SparkContext:
setCheckpointDir
public void setCheckpointDir(String directory)
Set the directory under which RDDs are going to be checkpointed.
Parameters:
directory - path to the directory where checkpoint files will be stored (must be HDFS path if running in cluster)
Questions :
1) If different spark apps SparkContext.setCheckpointDir(hdfsPath) set the same hdfsPath, Is there any conflict?
2) If no conflict, the hdfsPath for CheckpointDir will clean automaticly?
Questions :
1) If different spark apps SparkContext.setCheckpointDir(hdfsPath) set the same hdfsPath, Is there any conflict?
Answer : No conflict as per below example given. Multiple applcaition can use same check point directory. Under that unique hash kind of folder will be created to avoid conflicts.
2) If no conflict, the hdfsPath for CheckpointDir will clean automaticly?
Answer : Yes its happening. for the below example I used local for demonstration... but local or hdfs it doesnt matter. Behaviour will be the same.
Lets go by example (ran multiple times with same check point directory):
package examples
import java.io.File
import org.apache.log4j.Level
object CheckPointTest extends App {
import org.apache.spark.sql.{Dataset, SparkSession}
val spark = SparkSession.builder().appName("CheckPointTest").master("local").getOrCreate()
val logger = org.apache.log4j.Logger.getLogger("org")
logger.setLevel(Level.WARN)
import spark.implicits._
spark.sparkContext.setCheckpointDir("/tmp/checkpoints")
val csvData1: Dataset[String] = spark.sparkContext.parallelize(
"""
|id
| a
| b
| c
""".stripMargin.lines.toList).toDS()
val frame1 = spark.read.option("header", true).option("inferSchema",true).csv(csvData1).show
val checkpointDir = spark.sparkContext.getCheckpointDir.get
println(checkpointDir)
println("Number of Files in Check Point Directory " + getListOfFiles(checkpointDir).length)
def getListOfFiles(dir: String):List[File] = {
val d = new File(dir)
if (d.exists && d.isDirectory) {
d.listFiles.filter(_.isFile).toList
} else {
List[File]()
}
}
}
Result :
+---+
| id|
+---+
| a|
| b|
| c|
+---+
file:/tmp/checkpoints/30e6f882-b49a-42cc-9e60-59adecf13166
Number of Files in Check Point Directory 0 // this indicates once application finished removed all the RDD/DS information.
If you have a look at checkpoint folder it will be like this...
user#f0189843ecbe [~/Downloads]$ ll /tmp/checkpoints/
total 0
drwxr-xr-x 2 user wheel 64 Mar 27 14:08 a2396c08-14b6-418a-b183-a90a4ca7dba3
drwxr-xr-x 2 user wheel 64 Mar 27 14:09 65c8ef5a-0e64-4e79-a050-7d1ee1d0e03d
drwxr-xr-x 2 user wheel 64 Mar 27 14:09 5667758c-180f-4c0b-8b3c-912afca59f55
drwxr-xr-x 2 user wheel 64 Mar 27 14:10 30e6f882-b49a-42cc-9e60-59adecf13166
drwxr-xr-x 6 user wheel 192 Mar 27 14:10 .
drwxrwxrwt 5 root wheel 160 Mar 27 14:10 ..
user#f0189843ecbe [~/Downloads]$ du -h /tmp/checkpoints/
0B /tmp/checkpoints//a2396c08-14b6-418a-b183-a90a4ca7dba3
0B /tmp/checkpoints//5667758c-180f-4c0b-8b3c-912afca59f55
0B /tmp/checkpoints//65c8ef5a-0e64-4e79-a050-7d1ee1d0e03d
0B /tmp/checkpoints//30e6f882-b49a-42cc-9e60-59adecf13166
0B /tmp/checkpoints/
Conclusion :
1) Even multiple applications are running parllel, there will be unique hash under check point directory in that all the RDD/DS
information will be stored.
2) Afer success full execution of each
Spark Application, the context cleaner will remove the contents in
it.. is what I observed from the above practical example.

Cocoapods pod repo push git

I am trying to push my pod to local repo. Before that, I have verified pod lib lint on my repo, and working fine locally
$ pod lib lint --swift-version=5.0 --allow-warnings
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/rbconfig.rb:215: warning: Insecure world writable dir /usr/local/sbin in PATH, mode 040777
-> SFLocationManager (1.0)
- WARN | source: Git SSH URLs will NOT work for people behind firewalls configured to only allow HTTP, therefore HTTPS is preferred.
- NOTE | xcodebuild: note: Using new build system
- NOTE | xcodebuild: note: Planning build
- NOTE | xcodebuild: note: Constructing build description
SFLocationManager passed validation.
After this, I have created tags and pushed to server
$ git tag
0.1.0
0.1.1
1.0
Then I have tried to test pod repo push command for local repo, which got failed
$ pod repo push git#git.url.com:ankit.thakur/locationmanager.git SFLocationManager.podspec --allow-warnings --swift-version=5.0 --local-only
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/rbconfig.rb:215: warning: Insecure world writable dir /usr/local/sbin in PATH, mode 040777
Validating spec
-> SFLocationManager (1.0)
- WARN | source: Git SSH URLs will NOT work for people behind firewalls configured to only allow HTTP, therefore HTTPS is preferred.
- ERROR | file patterns: The `source_files` pattern did not match any file.
- NOTE | xcodebuild: note: Using new build system
- NOTE | xcodebuild: note: Planning build
- NOTE | xcodebuild: note: Constructing build description
[!] The `SFLocationManager.podspec` specification does not validate.
Then I removed --local-only flag and ran again, but still failed.
$ pod repo push git#git.url.com:ankit.thakur/locationmanager.git SFLocationManager.podspec --allow-warnings --swift-version=5.0
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/rbconfig.rb:215: warning: Insecure world writable dir /usr/local/sbin in PATH, mode 040777
Validating spec
-> SFLocationManager (1.0)
- WARN | source: Git SSH URLs will NOT work for people behind firewalls configured to only allow HTTP, therefore HTTPS is preferred.
- ERROR | file patterns: The `source_files` pattern did not match any file.
- NOTE | xcodebuild: note: Using new build system
- NOTE | xcodebuild: note: Planning build
- NOTE | xcodebuild: note: Constructing build description
[!] The `SFLocationManager.podspec` specification does not validate.
Here is the pod version
$ pod --version
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/rbconfig.rb:215: warning: Insecure world writable dir /usr/local/sbin in PATH, mode 040777
1.6.0
Here is the podspec file:
#
# Be sure to run `pod lib lint SFLocationManager.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |spec|
spec.name = 'SFLocationManager'
spec.version = '1.0'
spec.summary = 'SFLocationManager is location based library for iOS and Mac'
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
spec.description = <<-DESC
Location library in beta test version to fetch location with scheduled interval.
DESC
spec.homepage = 'https://git.url.com/ankit.thakur/locationmanager'
# spec.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
spec.license = { :type => 'MIT', :file => 'LICENSE' }
spec.author = { 'ankitthakur' => 'ankit.thakur#url.com' }
spec.source = { :git => 'git#git.url.com:ankit.thakur/locationmanager.git', :tag => spec.version.to_s }
# spec.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
spec.requires_arc = true
spec.ios.deployment_target = '10.0'
spec.osx.deployment_target = '10.10'
spec.source_files = 'SFLocationManager/Sources/Common/**/*.swift'
# spec.ios.source_files = 'SFLocationManager/Sources/iOS/**/*.swift'
# spec.osx.source_files = 'SFLocationManager/Sources/OSX/**/*.swift'
# spec.resource_bundles = {
# 'SFLocationManager' => ['SFLocationManager/Assets/*.png']
# }
spec.frameworks = 'CoreLocation'
# spec.public_header_files = 'Pod/Classes/**/*.h'
# spec.frameworks = 'UIKit', 'MapKit'
# spec.dependency 'AFNetworking', '~> 2.3'
end
The response of spec.source_files is
$ ls -al SFLocationManager/Sources/Common/**/*.swift
-rw-r--r--# 1 ankitthakur staff 2710 Apr 25 18:02 SFLocationManager/Sources/Common/GeocoderUtils/Geocoder.swift
-rw-r--r--# 1 ankitthakur staff 613 Apr 25 18:21 SFLocationManager/Sources/Common/LocationManager/LocationConfiguration.swift
-rw-r--r--# 1 ankitthakur staff 324 Apr 25 18:02 SFLocationManager/Sources/Common/LocationManager/LocationError.swift
-rw-r--r--# 1 ankitthakur staff 241 Apr 25 18:02 SFLocationManager/Sources/Common/LocationManager/LocationEventType.swift
-rw-r--r--# 1 ankitthakur staff 7144 Apr 25 18:36 SFLocationManager/Sources/Common/LocationManager/LocationManager.swift
-rw-r--r--# 1 ankitthakur staff 4649 Apr 25 18:02 SFLocationManager/Sources/Common/Model/Location.swift
-rw-r--r--# 1 ankitthakur staff 3939 Apr 25 18:27 SFLocationManager/Sources/Common/Trigger/LocationTriggerManager.swift
As per suggestions in provided solutions, my updated Podspec is
#
# Be sure to run `pod lib lint SFLocationManager.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |spec|
spec.name = 'SFLocationManager'
spec.version = '1.0'
spec.summary = 'SFLocationManager is location based library for iOS and Mac'
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
spec.description = <<-DESC
Location library in beta test version to fetch location with scheduled interval.
DESC
spec.homepage = 'https://git.promobitech.com/ankit.thakur/locationmanager'
# spec.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
spec.license = { :type => 'MIT', :file => 'LICENSE' }
spec.author = { 'ankitthakur' => 'ankit.thakur#promobitech.com' }
spec.source = { :git => 'git#git.promobitech.com:ankit.thakur/locationmanager.git', :tag => spec.version.to_s }
# spec.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
spec.requires_arc = true
spec.ios.deployment_target = '10.0'
spec.osx.deployment_target = '10.10'
spec.source_files = 'SFLocationManager/Sources/Common/GeocoderUtils/*.{swift}',
'SFLocationManager/Sources/Common/LocationManager/*.{swift}',
'SFLocationManager/Sources/Common/Model/*.{swift}',
'SFLocationManager/Sources/Common/Trigger/*.{swift}'
# spec.ios.source_files = 'SFLocationManager/Sources/iOS/**/*.{swift}'
# spec.osx.source_files = 'SFLocationManager/Sources/OSX/**/*.{swift}'
# spec.resource_bundles = {
# 'SFLocationManager' => ['SFLocationManager/Assets/*.png']
# }
spec.frameworks = 'CoreLocation'
# spec.public_header_files = 'Pod/Classes/**/*.h'
# spec.frameworks = 'UIKit', 'MapKit'
# spec.dependency 'AFNetworking', '~> 2.3'
end
but it is still not working.
Here is the my podspec file:
Admin:locationmanager ankitthakur$ ls -al
total 40
drwxr-xr-x 10 ankitthakur staff 320 Apr 25 20:38 .
drwxr-xr-x 9 ankitthakur staff 288 Apr 25 20:38 ..
-rw-r--r-- 1 ankitthakur staff 6148 Apr 25 20:38 .DS_Store
drwxr-xr-x 14 ankitthakur staff 448 Apr 26 14:50 .git
drwxr-xr-x 10 ankitthakur staff 320 Apr 25 20:38 Example
-rw-r--r-- 1 ankitthakur staff 1086 Apr 25 20:38 LICENSE
-rw-r--r-- 1 ankitthakur staff 1029 Apr 25 20:38 README.md
drwxr-xr-x 4 ankitthakur staff 128 Apr 25 20:51 SFLocationManager
-rw-r--r-- 1 ankitthakur staff 2241 Apr 26 14:49 SFLocationManager.podspec
lrwxr-xr-x 1 ankitthakur staff 27 Apr 25 20:38 _Pods.xcodeproj -> Example/Pods/Pods.xcodeproj
The error says:
file patterns: The `source_files` pattern did not match any file.
This means that you have written a wrong pattern.
So you should correct your source_files like the following
s.source_files = "FOLDERNAME/*.{swift}"
(This will include all the Swift files under the folder "FOLDERNAME")
In case you have multiple folders, do like the following:
s.source_files = "FOLDERNAME1/*.{swift}" , "FOLDERNAME2/*.{swift}"

Can only do 4 concurrent futures as maximum in Scala

I thought that using futures would easily allow me to to fire off one shot code blocks, however it seems I can only have 4 futures at a time.
Where does this restriction come from, or am I abusing Futures by using it like this?
import scala.concurrent._
import ExecutionContext.Implicits.global
import scala.util.{Failure, Success}
import java.util.Calendar
object Main extends App{
val rand = scala.util.Random
for (x <- 1 to 100) {
val f = Future {
//val sleepTime = rand.nextInt(1000)
val sleepTime = 2000
Thread.sleep(sleepTime)
val today = Calendar.getInstance().getTime()
println("Future: " + x + " - sleep was: " + sleepTime + " - " + today)
1;
}
}
Thread.sleep(10000)
}
Output:
Future: 3 - sleep was: 2000 - Mon Aug 31 10:02:44 CEST 2015
Future: 2 - sleep was: 2000 - Mon Aug 31 10:02:44 CEST 2015
Future: 4 - sleep was: 2000 - Mon Aug 31 10:02:44 CEST 2015
Future: 1 - sleep was: 2000 - Mon Aug 31 10:02:44 CEST 2015
Future: 7 - sleep was: 2000 - Mon Aug 31 10:02:46 CEST 2015
Future: 5 - sleep was: 2000 - Mon Aug 31 10:02:46 CEST 2015
Future: 6 - sleep was: 2000 - Mon Aug 31 10:02:46 CEST 2015
Future: 8 - sleep was: 2000 - Mon Aug 31 10:02:46 CEST 2015
Future: 9 - sleep was: 2000 - Mon Aug 31 10:02:48 CEST 2015
Future: 11 - sleep was: 2000 - Mon Aug 31 10:02:48 CEST 2015
Future: 10 - sleep was: 2000 - Mon Aug 31 10:02:48 CEST 2015
Future: 12 - sleep was: 2000 - Mon Aug 31 10:02:48 CEST 2015
Future: 16 - sleep was: 2000 - Mon Aug 31 10:02:50 CEST 2015
Future: 13 - sleep was: 2000 - Mon Aug 31 10:02:50 CEST 2015
Future: 15 - sleep was: 2000 - Mon Aug 31 10:02:50 CEST 2015
Future: 14 - sleep was: 2000 - Mon Aug 31 10:02:50 CEST 2015
I expected them to all show the same time.
To give some context, I thought I could use this construct and extend it by having a main loop, in which it sleeps every loop according to a value drawn from a exponential disitribution , to emulate user arrival/execution of a query. After each sleep I'd like to execute the query by sending it to the program's driver (in this case Spark, and the driver allows for multiple threads using it.) Is there a more obvious way than to use Futures?
When you are using using import ExecutionContext.Implicits.global,
It creates thread pool which has the same size of the number of CPUs.
From the source of the ExecutionContext.scala
The default ExecutionContext implementation is backed by a work-stealing thread pool. By default,
the thread pool uses a target number of worker threads equal to the number of [[https://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#availableProcessors-- available processors]].
And there's good StackOverflow question: What is the behavior of scala.concurrent.ExecutionContext.Implicits.global?
Since the default size of the thread pool depends on number of CPUs, if you want to use larger thread pool, you have to write something like
import scala.concurrent.ExecutionContext
import java.util.concurrent.Executors
implicit val ec = ExecutionContext.fromExecutorService(Executors.newWorkStealingPool(8))
before executing the Future.
( In your code, you have to place it before for loop. )
Note that work stealing pool was added in java 8, scala has their own ForkJoinPool which does the work stealing: scala.concurrent.forkjoin.ForkJoinPool vs java.util.concurrent.ForkJoinPool
Also if you want one thread per Future, you can write something like
implicit val ec = ExecutionContext.fromExecutorService(Executors.newSingleThreadExecutor)
Therefore, the following code executes 100 threads in parallel
import scala.concurrent._
import java.util.concurrent.Executors
object Main extends App{
for (x <- 1 to 100) {
implicit val ec = ExecutionContext.fromExecutorService(Executors.newSingleThreadExecutor)
val f = Future {
val sleepTime = 2000
Thread.sleep(sleepTime)
val today = Calendar.getInstance().getTime()
println("Future: " + x + " - sleep was: " + sleepTime + " - " + today)
1;
}
}
Thread.sleep(10000)
}
In addition to work stealing thread pool and single thread executors, there's some other executors: http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html
Read the docs for detail:
http://docs.scala-lang.org/overviews/core/futures.html
The default pool when using import scala.concurrent.ExecutionContext.Implicits.global indeed has as many threads as you have cores on your machine. This is ideal for non-blocking code (no synchronous io/sleep/...) but can be problematic and even cause deadlocks when you use it for blocking code.
However, this pool can actually grow if you mark blocking code in a scala.concurrent.blocking block. The same marker is for example in use when you are using Await.result and Await.ready functions that block while waiting for a Future.
see the api docs for blocking
So all you have to do is update your example:
import scala.concurrent.blocking
...
val sleepTime = 2000
blocking{
Thread.sleep(sleepTime)
}
...
Now all futures will end after 2000 ms
you can also use
`implicit val ec = ExecutionContext.fromExecutorService(ExecutorService.newFixedThreadPool(NUMBEROFTHREADSYOUWANT))`
in NUMBEROFTHREADSYOUWANT you can give number of threads want to start.
This will use before Future .

Grails MongoDB NoSuchFieldError: ACKNOWLEDGED

Getting error on update when using a different version mongodb java client.
I ran the dependency-report and found that only 1 jar for mongdb java driver is existing.
Please guide why this error is coming, I am trying to update domain object through GORM.
dependencies {
runtime "org.mongodb:mongo-java-driver:2.9.0"
}
plugins {
compile (":mongodb:1.3.0"){
excludes "mongo-java-driver";
}
}
Message: ACKNOWLEDGED
Line | Method
->> 646 | doInDB in
org.grails.datastore.mapping.mongo.engine.MongoEntityPersister$5
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 616 | updateEntry in
org.grails.datastore.mapping.mongo.engine.MongoEntityPersister
| 78 | updateEntry . . . . . . in ''
| 846 | run in
org.grails.datastore.mapping.engine.NativeEntryEntityPersister$2
| 33 | executePendingOperation in
org.grails.datastore.mapping.core.impl.PendingOperationExecution
| 364 | flushPendingOperations in org.grails.datastore.mapping.core.AbstractSession
| 343 | flushPendingUpdates . . in ''
| 263 | flush in ''
| 126 | flush . . . . . . . . . in org.grails.datastore.mapping.mongo.MongoSession
WriteConcern.ACKNOWLEDGED is only available in the MongoDB Java Driver version 2.10 and above. You either need to update your Mongo version:
dependencies {
runtime "org.mongodb:mongo-java-driver:2.10.0"
}
or you need to remove your exclusion of the mongo driver here:
compile (":mongodb:1.3.0"){
excludes "mongo-java-driver";
}
and replace it with:
compile ":mongodb:1.3.0"
If you take this second option, this will use the 2.11 version of the Mongo Java Driver, which is what this plugin code is expecting. Using a version of the driver that is older than 2.11 is likely to cause these sorts of issues.

Play 2.0 - Compilation of twitter bootstrap in test

I have a project where I want to compile twitter bootstrap as well as to prevent tests to be executed in parallel
def twitterBootstrapEntryPoints(base:File):PathFinder = {
(base / "app" / "assets" / "stylesheets" / "bootstrap" * "bootstrap.less") +++
(base / "app" / "assets" / "stylesheets" / "bootstrap" * "responsive.less") +++
(base / "app" / "assets" / "stylesheets" * "*.less")
}
val common = PlayProject(appName, appVersion,appDependencies, mainLang = SCALA).settings(
organization := appOrganization,
lessEntryPoints <<= baseDirectory(twitterBootstrapEntryPoints),
resolvers ++= commonResolvers).settings( inConfig(Test)(parallelExecution := false) : _* )
Edit:
To build twitter bootstrap, one should only compile bootstrap.less and responsive.less which import all the other files. in Compile everything works fine, when running in Test this does not work anymore, the compiler tries to compile all the .less files
This is what I see on the play console
[GottwareWeb] $ clean
[success] Total time: 0 s, completed 26 sept. 2012 17:44:07
[GottwareWeb] $ compile
[info] Updating {file:/G:/GottwareWeb/}GottwareWeb...
[info] Resolving org.hibernate.javax.persistence#hibernate-jpa-2.0-api;1.0.1.Fin
[info] Done updating.
[info] Compiling 34 Scala sources and 1 Java source to G:\GottwareWeb\target\sca
la-2.9.1\classes...
[success] Total time: 9 s, completed 26 sept. 2012 17:44:17
[GottwareWeb] $ test
[error] {file:/G:/GottwareWeb/}GottwareWeb/*:play-copy-assets: in G:\GottwareWeb
\app\assets\stylesheets\accordion.less - PlayException: Compilation error [varia
ble #baseLineHeight is undefined]
[error] {file:/G:/GottwareWeb/}GottwareWeb/compile:resources: in G:\GottwareWeb\
app\assets\stylesheets\accordion.less - PlayException: Compilation error [variab
le #baseLineHeight is undefined]
[error] Total time: 0 s, completed 26 sept. 2012 17:44:32
[GottwareWeb] $
Parallel execution of tests is set to false by default. You shouldn't have to include it in the configuration.
Documentation here: https://github.com/playframework/Play20/wiki/SBTSettings
In your setup, Play must be compiling all the less files in app/assets/stylesheets in production as well. Is this what you don't want? Or is it compiling everything in app/assets/stylesheets/bootstrap/ ?