1

我正在尝试在 Eclipse 中使用 play-2.2.0 创建子项目,但根据以下详细信息我面临错误:

[error] a.a.ActorSystemImpl - Uncaught error from thread [play-akka.actor.
default-dispatcher-2] shutting down JVM since 'akka.jvm-exit-on-fatal-error' 
is enabled
java.lang.NoSuchMethodError: views.html.main$.apply(Lcom.abc.core/sys/models/
Users;Lcom.abc.core/sys/models/Roles;Lplay/api/templates/Html;Lplay/api/templ
ates/Html;)Lplay/api/templates/Html;
    at com.abc.core.sys.views.html.index$.apply(index.template.scala:37)
~[classes/:na]
    at com.abc.core.sys.views.html.index$.render(index.template.scala:62)
~[classes/:na]
    at com.abc.core.sys.views.html.index.render(index.template.scala) ~[classes/:na]
    at com.abc.core.sys.controllers.Application.main(Application.java:144) 
~[classes/:na]

路线

# Home page
GET     /                           controllers.Application.index()
# Map static resources from the /public folder to the /assets URL path
GET     /assets/*file               controllers.Assets.at(path="/public", file)
# Delegate routes to sub-modules
-> / core.Routes

核心路由

# Home page
GET     /                           com.abc.core.sys.controllers.Application.index()
GET     /core                       com.abc.core.sys.controllers.Application.main()

com.abc.core.sys.controllers 包中的 Application.main()

public static Result main() {
  return ok(index.render(Form.form(Register.class),
  Form.form(Login.class)));
}

index.scala.html

@(signupForm: play.data.Form[com.abc.core.sys.controllers.Application.Register], loginForm: play.data.Form[com.abc.core.sys.controllers.Application.Login])


@main(null) {   
  <div class="span3">
  </div>
  <div class="span8">
     <div class="well">
        @login(loginForm)
     </div>    
     <div class="well">
        @account.signup.createFormOnly(signupForm)
     </div>
   </div>    
}

main.scala.html

@(user: com.abc.core.sys.models.Users = null)(content: Html)

<!DOCTYPE html>

<html>
<head>
    <title>PORTAL</title>
    <link rel="stylesheet" media="screen"  href="@routes.Assets.at("stylesheets/main.css")">
    <link rel="shortcut icon" type="image/png" href="@routes.Assets.at("images/favicon.png")">
    <script src="@routes.Assets.at("javascripts/jquery-1.9.0.min.js")" type="text/javascript"></script>
</head>
<body>
    @content
</body>
</html>

当我尝试访问时出现错误localhost:9000/core。如何解决这个问题?

4

0 回答 0