1

I'm trying to install Play 2.2 on a fresh MacBook Pro with Java 7. Scala has already been installed. Here's what I get:

Okihara-MacBook-Pro:Extensions okihara$ play help
Exception in thread "main" java.lang.IncompatibleClassChangeError: Expected static method scala.Array$.unapplySeq(Ljava/lang/Object;)Lscala/Option;
    at xsbt.boot.Boot$.main(Boot.scala:14)
    at xsbt.boot.Boot.main(Boot.scala)

I saw Issue getting SBT to work on Mac OS X but there's no conclusive answer. I tried running the Scala REPL and that seems to work well too.

I only used Play on Linux before, this is my first attempt to install it on OS X.

Where should I look?

EDIT As done in the other SO question, I get the above message with the scala-* jars in the Library/Java/Extensions folder. If I remove them, I get:

Okihara-MacBook-Pro:Extensions okihara$ play
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.ivy.core.RelativeUrlResolver.$init$$6ce060cb(Lscala/collection/mutable/HashTable$HashUtils;)V
    at scala.collection.mutable.HashMap.<init>(HashMap.scala:39)
    at scala.collection.mutable.HashMap.<init>(HashMap.scala:55)
    at scala.collection.mutable.Map$.empty$7fee4dfc(Map.scala:68)
    at scala.collection.generic.MutableMapFactory.newBuilder(MutableMapFactory.scala:29)
    at scala.collection.generic.GenMapFactory.apply$41cb962a(GenMapFactory.scala:47)
    at scala.sys.SystemProperties$.propertyHelp$lzycompute(SystemProperties.scala:62)
    at scala.sys.SystemProperties$.noTraceSupression$lzycompute(SystemProperties.scala:80)
    at scala.sys.SystemProperties$.noTraceSupression(SystemProperties.scala:80)
    at scala.util.control.NoStackTrace$.<init>(NoStackTrace.scala:31)
    at scala.util.control.NoStackTrace$.<clinit>(NoStackTrace.scala)
    at scala.util.control.BreakControl.fillInStackTrace(Breaks.scala:93)
    at java.lang.Throwable.<init>(Throwable.java:250)
    at scala.util.control.BreakControl.<init>(Breaks.scala:93)
    at scala.util.control.Breaks.<init>(Breaks.scala:28)
    at scala.collection.Traversable$.<init>(Traversable.scala:96)
    at scala.collection.Traversable$.<clinit>(Traversable.scala)
    at scala.package$.<init>(package.scala:46)
    at scala.package$.<clinit>(package.scala)
    at scala.Predef$.<init>(Predef.scala:90)
    at scala.Predef$.<clinit>(Predef.scala)
    at scala.Array$.unapplySeq(Array.scala:443)
    at xsbt.boot.Boot$.main(Boot.scala:14)
    at xsbt.boot.Boot.main(Boot.scala)
Community
  • 1
  • 1
VH-NZZ
  • 5,248
  • 4
  • 31
  • 47
  • Have you (and/or are you interested in) installing [Typesafe Activator](https://typesafe.com/activator)? I installed that without issue on my Mac. (Similarly, however, I installed Play 2.1 on my Mac without issue doing nothing more than following the instructions). – Greg Kopff Mar 18 '14 at 01:18
  • Thanks, you're my only beacon of hope. I'll fall back on the activator as a last resort. Where did you install play and scala? And did you export anything particular (PATH, CLASSPATH, ...)? Also, are you running Java 7? – VH-NZZ Mar 18 '14 at 03:11
  • I have Java 7 installed, and I do not have Java 6 installed. I unpacked the [Play 2.1.5 zip](http://downloads.typesafe.com/play/2.1.5/play-2.1.5.zip) to `/Users/foo/devel` (creating a `play-2.1.5` subdir). I symlinked `play` to `play-2.1.5`. I have JAVA_HOME exported as: `export JAVA_HOME=\`/usr/libexec/java_home -v 1.7\``; I have PLAY_HOME exported as `export PLAY_HOME=/Users/foo/devel/play`. I have `PLAY_HOME` on my PATH. After adjusting `~/.bash_profile`, don't forget to do `source ~/.bash_profile` to re-read it. – Greg Kopff Mar 18 '14 at 03:26
  • 1
    I did not have Scala installed separately when I did this (Play takes care of the Scala side of things automatically - certainly this is true if you're writing the controllers in Java and only using Scala for the templates, which was true in my case). – Greg Kopff Mar 18 '14 at 03:31
  • Thanks, your last comment regarding Play shipped with its required libraries put me on the right track. – VH-NZZ Mar 18 '14 at 08:22

1 Answers1

1

Removing ivy-*.jar from /Library/Java/Extensions solved the issue.

FWIW, I also have no scala*.jar in the extensions folder and I'm running Java 1.7.0_21. Play is symlinked as advised. HTH.

VH-NZZ
  • 5,248
  • 4
  • 31
  • 47