How can I get the "Expenses" sample up and running?

345 views
Skip to first unread message

Warren Tang

unread,
Jul 25, 2011, 2:43:31 AM7/25/11
to google-we...@googlegroups.com
I have trouble to run the "Expenses" sample in GWT's samples folder. The sample appeared in Google I/O sessions a few times.

I'm not familiar with App Engine, but this is what I've done:
  1. create an new Eclipse project and then overwrite the src and war with those from the Expenses sample.
  2. add App Engine support and specified the application id/name I got by creating a new application in appengine.google.com.
  3. compile "LoadExpensesDB.gwt.xml" (which I assume is used to fill appengine with some sample data.).The permunations completed but at the beginning of the log their are some errors:
    Compiling module com.google.gwt.sample.expenses.LoadExpensesDB
       Validating newly compiled units
          [ERROR] Errors in 'file:/D:/work/learning/gwt/Expenses/java/com/google/gwt/sample/expenses/shared/EmployeeProxy.java'
             [ERROR] Line 25: com.google.gwt.sample.expenses.server.domain.Employee cannot be resolved to a type
          [ERROR] Errors in 'file:/D:/work/learning/gwt/Expenses/java/com/google/gwt/sample/expenses/shared/EmployeeRequest.java'
             [ERROR] Line 22: The import com.google.gwt.sample.expenses.server.domain.Employee cannot be resolved
             [ERROR] Line 29: Employee cannot be resolved to a type
    ... ...
  4. When I run the module I got
       HTTP ERROR: 503  SERVICE_UNAVAILABLE
    The log in hosted getty says:
    00:00:00.008 [WARN] failed GaeAuthFilter
    javax.servlet.UnavailableException: com.google.gwt.sample.gaerequest.server.GaeAuthFilter    
      at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:79)    
      at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:81)
Regards,
Warren

David Chandler

unread,
Jul 25, 2011, 10:52:58 AM7/25/11
to google-we...@googlegroups.com
The Expenses sample is designed to be used with Maven. See
README-MAVEN.txt in the samples/expenses folder and follow
instructions there.

/dmc

> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/XS1mzZlPuT8J.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-tool...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

--
David Chandler
Developer Programs Engineer, GWT+GAE
w: http://code.google.com/
b: http://turbomanage.wordpress.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

Warren Tang

unread,
Jul 25, 2011, 10:12:58 PM7/25/11
to google-we...@googlegroups.com
Hi David,

I'm really thankful for your patience for answering this starter's question. 

I imported the project into eclipse from according to the readme file. Maven had an issue finding the gwt-servlet2.2.jar. I fixed it by changing the GWT version to 2.3.0 in pom.xml, and adding GWT SDK and Appengine SDK to the classpath. The project was then built successfully. But when I run it in the dev mode, the following error appears in eclipse's console view:

Exception in thread "main" java.lang.NoSuchMethodError: org.mortbay.thread.Timeout.<init>(Ljava/lang/Object;)V
at org.mortbay.io.nio.SelectorManager$SelectSet.<init>(SelectorManager.java:306)
at org.mortbay.io.nio.SelectorManager.doStart(SelectorManager.java:223)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:303)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at org.mortbay.jetty.Server.doStart(Server.java:233)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:667)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:500)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1055)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:804)
at com.google.gwt.dev.DevMode.main(DevMode.java:309)

I've no idea what it means. 

Besides, it should need my appengine credentials in order to fill data into appengine, right? How can I configure it? 

--

Warren Tang

unread,
Jul 25, 2011, 10:19:45 PM7/25/11
to google-we...@googlegroups.com
I'm using Windows 7 64bit / Eclipse 3.7 64bit / Latest SDKs.

Warren Tang

unread,
Aug 1, 2011, 2:04:02 AM8/1/11
to google-we...@googlegroups.com
It works now though I don't know why.
Reply all
Reply to author
Forward
0 new messages