在Mac OS X上设置 - 播放framework2

时间:2015-12-26 09:28:44

标签: macos playframework typesafe-activator

我试图在OSX上设置playframe工作并遇到一些麻烦。

  1. 下载Typesafe Activator并设置为此过程。 https://www.playframework.com/documentation/2.4.x/
  2. "激活剂新测试" - > " cd test" - > "激活运行"
  3. 使用Safari访问localhost:9000以获取无法打开页面的消息
  4. 如下所示,有一些错误消息。
  5. 有什么想法可以解决这个问题吗?

        % activator run                                                                                                                                          +[master]
        [info] Loading project definition from /Users/w256/Library/Mobile Documents/com~apple~CloudDocs/000.now/vo/scala-getting-started/project
        [info] Updating {file:/Users/w256/Library/Mobile%20Documents/com~apple~CloudDocs/000.now/vo/scala-getting-started/project/}scala-getting-started-build...
        [info] Resolving org.fusesource.jansi#jansi;1.4 ...
        [info] Done updating.
        [info] Set current project to play-getting-started (in build file:/Users/w256/Library/Mobile%20Documents/com~apple~CloudDocs/000.now/vo/scala-getting-started/)
        [info] Updating {file:/Users/w256/Library/Mobile%20Documents/com~apple~CloudDocs/000.now/vo/scala-getting-started/}root...
        [info] Resolving jline#jline;2.12.1 ...
        [info] Done updating.
        [warn] There may be incompatibilities among your library dependencies.
        [warn] Here are some of the libraries that were evicted:
        [warn]  * io.netty:netty:3.10.1.Final -> 3.10.4.Final
        [warn] Run 'evicted' to see detailed eviction warnings
    
        --- (Running the application, auto-reloading is enabled) ---
    
        [info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
    
        (Server started, use Ctrl+D to stop and go back to the console...)
    
    
    
        [error] p.c.s.n.PlayDefaultUpstreamHandler - Exception caught in Netty
        java.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpRequest.headers()Lorg/jboss/netty/handler/codec/http/HttpHeaders;
            at play.core.server.netty.PlayDefaultUpstreamHandler.getHeaders(PlayDefaultUpstreamHandler.scala:320) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
            at play.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(PlayDefaultUpstreamHandler.scala:90) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
            at com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:62) ~[netty-http-pipelining.jar:na]
            at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:104) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:455) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:538) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:437) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[netty-3.5.7.Final.jar:na]
        [error] p.c.s.n.PlayDefaultUpstreamHandler - Exception caught in Netty
        java.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpRequest.headers()Lorg/jboss/netty/handler/codec/http/HttpHeaders;
            at play.core.server.netty.PlayDefaultUpstreamHandler.getHeaders(PlayDefaultUpstreamHandler.scala:320) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
            at play.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(PlayDefaultUpstreamHandler.scala:90) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
            at com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:62) ~[netty-http-pipelining.jar:na]
            at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:104) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:455) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:538) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:437) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[netty-3.5.7.Final.jar:na]
        [error] p.c.s.n.PlayDefaultUpstreamHandler - Exception caught in Netty
        java.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpRequest.headers()Lorg/jboss/netty/handler/codec/http/HttpHeaders;
            at play.core.server.netty.PlayDefaultUpstreamHandler.getHeaders(PlayDefaultUpstreamHandler.scala:320) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
            at play.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(PlayDefaultUpstreamHandler.scala:90) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
            at com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:62) ~[netty-http-pipelining.jar:na]
            at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:104) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:455) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:538) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:437) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[netty-3.5.7.Final.jar:na]
    

    "激活者ui"也会出现类似的错误。

        % activator ui                                                                                                                                           +[master]
        Found previous process id: 9525
        Local repository: activator-launcher-local @ file:/usr/local/Cellar/typesafe-activator/1.3.6/libexec/repository
        Local repository: activator-local @ file:/Users/w256/Downloads/activator-dist-1.3.7/repository
        Play server process ID is 12608
        [info] play - Application started (Prod)
        [info] play - Listening for HTTP on /127.0.0.1:8888
        [error] p.nettyException - Exception caught in Netty
        java.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpRequest.headers()Lorg/jboss/netty/handler/codec/http/HttpHeaders;
            at play.core.server.netty.PlayDefaultUpstreamHandler.getHeaders(PlayDefaultUpstreamHandler.scala:366) ~[play_2.11-2.3.9.jar:2.3.9]
            at play.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(PlayDefaultUpstreamHandler.scala:87) ~[play_2.11-2.3.9.jar:2.3.9]
            at com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:62) ~[netty-http-pipelining-1.1.2.jar:na]
            at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:104) ~[netty-3.5.7.Final.jar:na]
            at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.5.7.Final.jar:na]
    

    build.sbt就在这里。

    name := """play-getting-started"""
    version := "1.0-SNAPSHOT"
    lazy val root = (project in file(".")).enablePlugins(PlayScala)
    scalaVersion := "2.11.7"
    
    libraryDependencies ++= Seq(
      jdbc,
      cache,
      "org.postgresql" % "postgresql" % "9.4-1201-jdbc41",
      "org.jscience" % "jscience" % "4.3.1",
      ws,
      "com.typesafe.play" % "play-netty-server_2.11" % "2.4.3" force(),
      "io.netty" % "netty" % "3.10.4.Final" force(),
      "com.typesafe.netty" % "netty-http-pipelining" % "1.1.4" force()
    )
    
    libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _ )
    

0 个答案:

没有答案