I'm using the following:
I'm frequently running into this error:
21:32:00.836 [qtp1687101938-55] ERROR o.fusesource.scalate.TemplateEngine - Compilation failed:
error: error while loading CharSequence, class file '/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/rt.jar(java/lang/CharSequence.class)' is broken
(class java.lang.RuntimeException/bad constant pool tag 18 at byte 10)
error: error while loading ConcurrentMap, class file '/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/rt.jar(java/util/concurrent/ConcurrentMap.class)' is broken
(class java.lang.RuntimeException/bad constant pool tag 18 at byte 61)
two errors found
21:38:03.616 [qtp1687101938-56] ERROR o.fusesource.scalate.TemplateEngine - Compilation failed:
error: error while loading AnnotatedElement, class file '/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/rt.jar(java/lang/reflect/AnnotatedElement.class)' is broken
(class java.lang.RuntimeException/bad constant pool tag 18 at byte 76)
one error found
Currently I'm running into this when simply trying to call a .count()
on my MongoDB collection.
Upon Googling, it seems like it may be caused by dependency issues. The thing is, I'm using Scalatra just to serve an API and actually don't require any of the scalate stuff. I commented out all references to it, but I still get this. Could it be a dependency issue between the libraries I'm using?
In my company we had this problem with CharSequence. This is due to Scala 2.10.x does not work with Java 8. This was described in Scalas mailinglist. Switch back to Java 7.
Switching to Scala 2.10.4 solved the problem for me.
I have a similar problem on Java 1.8.0 working with Scala 2.10.4 and sbt 0.12.4. But when upgrading to sbt 0.13.7, the problem is solved.
I am seeing the same issue with software requiring Scala 2.9.2+ and Java 1.7 running on Scala 2.10.4 and Java 1.8. Changed to Java 7 via sudo update-alternatives --config java
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With