Skip to content

PlayTroubleShooting

npcode edited this page Apr 15, 2013 · 3 revisions

sbt 0.11.3 에러

sbt 0.11.3 이 저장소에 없다고 하면서 안되길래, 다음과 같이 수정한 것이 원인이 아닐까 의심했다.

framework/build에서,

-PLAY_VERSION="2.0-SNAPSHOT"
+PLAY_VERSION="2.0.4"

framework/sbt/play.boot.properties에서,

-  version: 2.0-SNAPSHOT
+  version: 2.0.4

그래서 모든 수정을 원래대로 돌려놓으니(git stash) 놀랍게도 잘 동작했다. 그런데 이상한 것은 한번 잘 되기 시작하면 다시 2.0.4로 돌려놓아도 잘 된다는 점이다.

sbt.PlayExceptions$CompilationException: Compilation error [value LabelApp is not a member of object controllers.routes]

해결책: 콘트롤러 메소드는 반드시 static 이어야 한다.

github에서 받은 Play를 사용할 수 없다.

다음과 같은 에러가 출력되면서 콘솔이 실행되지 않는다.

This project uses Play 2.1-RC2!
Update the Play sbt-plugin version to 2.1-SNAPSHOT (usually in project/plugins.sbt)

일단 시키는 대로 해보면, sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.1-SNAPSHOT: not found 예외를 만나게 된다.

그냥 공식사이트에서 다운로드 받는 게 편하다.

컴파일 무한반복

Cannot load the JNotify native library (null)
Play will check file changes for each request, so expect degraded reloading performace.

play run으로 실행했을 때 무한히 컴파일을 반복하는 문제가 발생하는 경우가 있다. play start로 실행하면 그런 문제가 발생하지 않는다.

play clean-all하고 다시 빌드하면, 여전히 위의 메시지는 나타나지만 빌드가 무한반복되는 문제는 사라진다.

다음의 exception이 원인인 것으로 보인다.

Caused by: java.lang.RuntimeException: Error initializing fshook_inotify library. linux error code #24, man errno for more info
    at net.contentobjects.jnotify.linux.JNotify_linux.<clinit>(Unknown Source)
    ... 61 more

에러코드 #24는 EMFILE(Too many open files)인 것으로 보인다.

[IllegalStateException: No value]

다음과 같은 코드에서 에러 발생

Form<IssueComment> commentForm = new Form<IssueComment>(IssueComment.class)
    .bindFromRequest();
final IssueComment comment = commentForm.get();