views:

168

answers:

3

I build a lift project with this command:

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

When I run `mvn jetty:run, it works. Then I create this configuration file (helloworld/src/main/webapp/WEB-INF/appengine-web.xml):

<?xml version="1.0" encoding="utf-8"?>
  <appengine-web-app xmlns="http://appengine.google.com/ns/1.0"&gt;
  <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>

Then I run this command: mvn package When I run dev_appserver.sh helloworld/target/helloworld-1.0-SNAPSHOT, it works in my browser. Then, I upload to Google App Engine server with: appcfg.sh update helloworld/target/helloworld-1.0-SNAPSHOT and I get: Update completed successfully. Success.. But when I go to http://MY_APPLICATION-ID.appspot.com/ I get a 500 server error:

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.

Why?

+2  A: 

Login to https://appengine.google.com/ and check out the logs of your application.

In the Main > Logs tab, you can see the requests which generated an error, along with the stack trace. This might be helpful to figure out what the problem is.

Franck
I see NullPointerException in log
isola009
+2  A: 

Which version of Lift are you using? Google app engine does not run all bytecode, from what I understand. This article indicates the successful port of a scala app to the app engine bt contains a few pointed sentences:

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

and

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

Now, this article is from mid-2009, so I would guess that if you are using the latest Lift and scala 2.8, there may be problems. I would try asking on the Lift forums, which are very helpful.

oxbow_lakes
Lift version is 2.0.
isola009
+1  A: 

I recommend reading this thread: Lift 2.0, Scala 2.8, and AppEngine

AWhitford