2010-09-06 55 views
0

我建电梯项目使用此命令:Google App Engine + Scala2.8.0 + Lift 2,一切正常,但不起作用?

mvn archetype:generate -U \ 
    -DarchetypeGroupId=net.liftweb \ 
    -DarchetypeArtifactId=lift-archetype-basic \ 
    -DarchetypeVersion=2.0-scala280-SNAPSHOT \ 
    -DarchetypeRepository=http://scala-tools.org/repo-snapshots \ 
    -DremoteRepositories=http://scala-tools.org/repo-releases \ 
    -DgroupId=demo.helloworld \ 
    -DartifactId=helloworld \ 
    -Dversion=1.0-SNAPSHOT 

当我运行`命令mvn码头:运行,它的工作原理。 然后,我创建这个配置文件(的HelloWorld/src目录/主/ web应用/ WEB-INF/AppEngine上-web.xml中):

<?xml version="1.0" encoding="utf-8"?> 
    <appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> 
    <application>MY_APPLICATION-ID</application> 
    <version>3</version> 
    <system-properties> 
    <property name="in.gae.j" value="true" /> 
    </system-properties> 
    <sessions-enabled>true</sessions-enabled> 
    <static-files> 
    <exclude path="/**" /> 
    </static-files> 
</appengine-web-app> 

然后我运行此命令:mvn package 当我运行dev_appserver.sh helloworld/target/helloworld-1.0-SNAPSHOT,它工作在我的浏览器。 然后,我上传到Google App Engine服务器:appcfg.sh update helloworld/target/helloworld-1.0-SNAPSHOT,我得到:Update completed successfully. Success.。 但是当我去http://MY_APPLICATION-ID.appspot.com/我得到一个500服务器错误:

Error: Server Error The server encountered an error and could not complete your request.

If the problem persists, please report your problem and mention this error message and the query that caused it.

为什么?

+0

只是为了您的信息,我发现stax.net与斯卡拉/ SBT /电梯开发更加友好。只需上传创建的WAR文件SBT,任何一切都可以正常工作。 – 2010-09-07 01:02:48

回答

2

登录到https://appengine.google.com/并查看您的应用程序的日志。

在Main> Logs选项卡中,您可以看到产生错误的请求以及堆栈跟踪。这可能有助于找出问题所在。

+0

我在日志中看到NullPointerException – barroco 2010-09-07 07:25:05

2

哪个版本的电梯您使用?根据我的理解,Google应用引擎不运行全部字节码。 This article表示斯卡拉应用程序到应用程序引擎BT的成功端口包含了一些尖锐的句子:

David Pollak has verified that most of the Lift framework works on App Engine

Overall, it looks like the scalac compiler produces jars that are so close to Java's that App Engine just doesn't notice or care

现在,这篇文章是从2009年中期,所以我猜想,如果您使用最新的 Lift和Scala 2.8,可能会出现问题。我会试着问Lift forums,这是非常有帮助的。

+0

Lift版本是2.0。 – barroco 2010-09-07 07:25:41