简体   繁体   中英

Play framework runtime error on OS X

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)

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM