GWT 2.1.RC1 Expenses Sample Failure

252 views
Skip to first unread message

Esfand

unread,
Oct 12, 2010, 5:21:58 AM10/12/10
to Google Web Toolkit
The sample fails on the server-side because
somehow the EMF does not get initialized.

I've imported the sample into Eclipse 3.6 on
Windows 7 and running the LoadExpensesDB
module via Debug As menu item of Eclipse
Property Context Menu.

Can anybody please shed some light on how to
initialize the server-side DB and services?

The exception is:
[ERROR] javax.servlet.ServletContext log:
Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException:
Service method 'public abstract java.util.List
com.google.gwt.sample.expenses.client.DataGenerationService.getCounts()'
threw an unexpected exception: java.lang.ExceptionInInitializerError
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
378)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
581)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
207)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
243)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)

David Chandler (Google)

unread,
Oct 12, 2010, 10:36:59 AM10/12/10
to Google Web Toolkit
Esfand,

You need the RC1 version of the Google Plugin for Eclipse also. You
can download it here:

http://code.google.com/webtoolkit/download_2_1_rc1.html

Please post back if you're still having problems.

--
David Chandler
Developer Programs Engineer, Google Web Toolkit
Atlanta, GA USA

Esfand

unread,
Oct 12, 2010, 12:23:14 PM10/12/10
to Google Web Toolkit
Hi David. Thanks for your reply.

I am already using GPE 1.4.rc1-201010102248 with Eclipse 3.6

I am not using any of the jar files download by maven, instead I'm
using GAE/J 1.3.8-prerelease and GWT.2.1.0.RC1 distributed
via thezip-file ( http://code.google.com/webtoolkit/download_2_1_rc1.html
)
I tried GAE/J 1.3.7 with the same result.

I created the eclipse project files using mvn eclipse:eclipse to
make sure DataNeucleus gets a chance to do its enhance magic.

When I select "Debug As" to launch the app, a dialog box pops-up
containing the following two lines:
An error has occurred. See error log for more details.
Argument cannot be null
Regardless, the server starts and the browser displays the
buttons, etc.

Thanks again and please let me know if you need more info
for trouble-shooting.




On Oct 12, 5:36 pm, "David Chandler (Google)" <drfibona...@google.com>
wrote:

David Chandler (Google)

unread,
Oct 12, 2010, 3:50:13 PM10/12/10
to Google Web Toolkit
Hi Esfand,

At present, you also need to run mvn package to ensure that
DataNucleus enhancement (attached to compile goal in the pom) runs and
that the static webapp files are moved into place under the target
directory. This will be addressed in the release version of the
plugin. Does that resolve the issue for you?

Thank you,
/dmc

On Oct 12, 12:23 pm, Esfand <esha...@gmail.com> wrote:
> Hi David.  Thanks for your reply.
>
> I am already using GPE 1.4.rc1-201010102248 with Eclipse 3.6
>
> I am not using any of the jar files download by maven, instead I'm
> using GAE/J 1.3.8-prerelease  and  GWT.2.1.0.RC1 distributed
> via  thezip-file (http://code.google.com/webtoolkit/download_2_1_rc1.html

Esfand

unread,
Oct 12, 2010, 5:49:39 PM10/12/10
to Google Web Toolkit
In fact I did run 'mvn package' before 'mvn eclipse:eclipse'
based on your advice I read on this forum a few days ago.

I just ran the sample using 'mvn gwt:run' directly
(after running 'mvn pakage') In other words no Eclipse in
the way and interestingly the same error happened.

I'm using maven 3. I doubt it, but can it be the reason?



On Oct 12, 10:50 pm, "David Chandler (Google)"

Esfand

unread,
Oct 12, 2010, 5:58:26 PM10/12/10
to Google Web Toolkit
I forgot to mention that when running 'mvn gwt:run', I see a bunch
of errors and warnings such as the following:

[WARNING] Could not transfer metadata asm:asm/maven-metadata.xml from
local.repository (file:../../local.repository/trunk):
No connector available to access repository local.repository
(file:../../local.repository/trunk) of type legacy
using the available factories WagonRepositoryConnectorFactory

[WARNING] No files to run DataNucleus tool
'org.datanucleus.enhancer.DataNucleusEnhancer'

[ERROR] WARNING: Your working directory, (D:\opt\gwt-2.1.0.RC1\samples
\Expenses) is not equal to your
[ERROR] web application root (D:\opt\gwt-2.1.0.RC1\samples\Expenses
\target\expenses-0.1.0.BUILD-SNAPSHOT)
[ERROR] You will not be able to access files from your working
directory on the production server.

David Chandler (Google)

unread,
Oct 13, 2010, 3:39:10 PM10/13/10
to Google Web Toolkit
Esfand,

I'm able to mvn gwt:run the Expenses sample with the following POM
changes:

Change DataNucleus version back to 1.1.5
<datanucleus.version>1.1.5</datanucleus.version>

Upgrade gwt-maven-plugin to version 1.3.2.google (resolves the ASM
error below):
<artifactId>gwt-maven-plugin</artifactId>
<version>1.3.2.google</version>

Add xalan dependency:
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.1</version>
</dependency>

Change maven-gae-plugin version to 0.7.2 (latest)

Add Google snapshot repo to pick GWT 2.1RC:
<repository>
<id>google-maven-snapshot-repository</id>
<name>Google Maven Snapshot Repository</name>
<url>https://oss.sonatype.org/content/repositories/google-snapshots/
</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>

In expenses dir, copy files needed by the data
expenses> cp src/main/webapp *.txt .

expenses> mvn clean package

expenses> mvn gwt:run

You should then be able to browse to LoadExpensesDB.html to generate
sample data, then to Expenses.html to use the app.

I'm using Maven 2.2.1, FYI.

It is not yet possible to run from Eclipse, at least not easily, but
changes to Google Plugin for Eclipse for 2.1 GA should fix that.

Thanks for your patience!
--
David Chandler
Developer Programs Engineer, Google Web Toolkit
Atlanta, GA USA


Esfand

unread,
Oct 13, 2010, 4:48:10 PM10/13/10
to Google Web Toolkit
Thanks a lot David.

Apparently the gwt-maven-plugin 1.3.2 has a dependency on
org/codehaus/plexus/util/xml/XmlStreamReader

I get the following error:

[ERROR] Failed to execute
goal org.codehaus.mojo:gwt-maven-plugin:1.3.2.google:
compile (gwtcompile) on project expenses: Execution gwtcompile
of
goal org.codehaus.mojo:gwt-maven-plugin:1.3.2.google:compile
failed:
Unable to load the mojo 'compile' in the plugin
'org.codehaus.mojo:gwt-maven-plugin:1.3.2.google'.
A required class is missing: org/codehaus/plexus/util/xml/
XmlStreamReader
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.codehaus.mojo:gwt-maven-plugin:
1.3.2.google
[ERROR] strategy =
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

Thanks again


On Oct 13, 10:39 pm, "David Chandler (Google)"

David Chandler (Google)

unread,
Oct 13, 2010, 10:49:05 PM10/13/10
to Google Web Toolkit
Hi Esfand,

Do you mind trying again? Once upon a time, Maven would sometimes time
out waiting for plexus jars from central and running it again a few
minutes later would resolve... Failing that, could you try it with
Maven 2.2.1 just to rule out any issues related to Maven 3?

Thank you,
/dmc

Esfand

unread,
Oct 14, 2010, 12:53:32 AM10/14/10
to Google Web Toolkit
Not at all! I appreciate if you post the exact XML snippet for
adding the dependency. I'm not sure if I have the right info
especially the version of the package..

Thanks for your help.


On Oct 14, 5:49 am, "David Chandler (Google)" <drfibona...@google.com>

Esfand

unread,
Oct 14, 2010, 1:55:56 AM10/14/10
to Google Web Toolkit
Hi David,

I ran 'mvn clean package' with maven3 a couple of more tomes.
Same result happened.

Then I used Maven 2.2.1 same error (printed in a different
format happened) plus a couple of more warnings and errors.

Below are excerpts containing all the errors from the
printout. It seems that DataNeucleus expects to see the
resources folder under main with the log configuration file
in it. The other plugin needs XmlStreamReader class. I
had a quick web-search for XmlStreamReader. It is
apparently obsolete, but then there is another routine with
the same exact name under javax package.

Regards,
ES.


[WARNING] File encoding has not been set, using platform encoding
Cp1252, i.e. build is platform dependent!
[INFO] Compiling 58 source files to D:\opt\gwt-2.1.0.RC1\samples
\Expenses\target\expenses-0.1.0.BUILD-SNAPSHOT\WEB-INF\classes
log4j:WARN No appenders could be found for logger
(DataNucleus.Enhancer).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig
for more info.
[INFO] [datanucleus:enhance {execution: }]
[INFO] CP: D:\.m2\repository\org\datanucleus\datanucleus-core
\1.1.5\datanucleus-core-1.1.5.jar
[INFO] CP: D:\.m2\repository\org\datanucleus\datanucleus-rdbms
\1.1.5\datanucleus-rdbms-1.1.5.jar


log4j:ERROR Could not read configuration file from URL [file:D:/opt/
gwt-2.1.0.RC1/samples/Expenses/src/main/resources/log4j.properties].
java.io.FileNotFoundException: D:\opt\gwt-2.1.0.RC1\samples\Expenses
\src\main\resources\log4j.properties (The system cannot find the path
specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)



log4j:ERROR Ignoring configuration file [file:D:/opt/gwt-2.1.0.RC1/
samples/Expenses/src/main/resources/log4j.properties].
log4j:WARN No appenders could be found for logger
(DataNucleus.Enhancer).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig
for more info.
DataNucleus Enhancer (version 1.1.4) : Enhancement of classes
DataNucleus Enhancer : Classpath
>> D:\opt\apache-maven-2.2.1\boot\classworlds-1.1.jar
ENHANCED (PersistenceCapable) :
com.google.gwt.sample.expenses.server.domain.Employee
ENHANCED (PersistenceCapable) :
com.google.gwt.sample.expenses.server.domain.EntityCounter
ENHANCED (PersistenceCapable) :
com.google.gwt.sample.expenses.server.domain.Expense
ENHANCED (PersistenceCapable) :
com.google.gwt.sample.expenses.server.domain.Report
ENHANCED (PersistenceCapable) :
com.google.gwt.sample.expenses.server.domain.ReportBack
DataNucleus Enhancer completed with success for 5 classes. Timings :
input=146 ms, enhance=97 ms, total=243 ms. Consult the log for full
details


-----------------------------------------------------
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal
'org.codehaus.mojo:gwt-maven-plugin:1.3.2.google:compile': Unable to
load the mojo 'org.codehaus.mojo:gwt-maven-plugin:
1.3.2.google:compile' in the plugin 'org.codehaus.mojo:gwt-maven-
plugin'. A required class is missing: org/codehaus/plexus/util/xml/
XmlStreamReader org.codehaus.plexus.util.xml.XmlStreamReader
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------

DataSurfer

unread,
Oct 14, 2010, 4:30:18 PM10/14/10
to Google Web Toolkit
I am getting a similar error with 1.3.2.google:

[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Not compiling test sources
[INFO] [surefire:test {execution: default-test}]
[INFO] Tests are skipped.
-----------------------------------------------------
this realm = app0.child-container[org.codehaus.mojo:gwt-maven-plugin:
1.3.2.google]
urls[0] = file:/Users/datasurfer/.m2/repository/org/codehaus/mojo/gwt-
maven-plugin/1.3.2.google/gwt-maven-plugin-1.3.2.google.jar
urls[1] = file:/Users/datasurfer/.m2/repository/org/codehaus/plexus/
plexus-utils/1.1/plexus-utils-1.1.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry@a6c57a42
import: org.codehaus.classworlds.Entry@12f43f3b
import: org.codehaus.classworlds.Entry@20025374
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@92758522
import: org.codehaus.classworlds.Entry@ebf2705b
import: org.codehaus.classworlds.Entry@bb25e54
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8


this realm = plexus.core
urls[0] = file:/usr/local/apache-maven/lib/maven-2.2.1-uber.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry@a6c57a42
import: org.codehaus.classworlds.Entry@12f43f3b
import: org.codehaus.classworlds.Entry@20025374
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@92758522
import: org.codehaus.classworlds.Entry@ebf2705b
import: org.codehaus.classworlds.Entry@bb25e54
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8
-----------------------------------------------------
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal
'org.codehaus.mojo:gwt-maven-plugin:1.3.2.google:compile': Unable to
load the mojo 'org.codehaus.mojo:gwt-maven-plugin:
1.3.2.google:compile' in the plugin 'org.codehaus.mojo:gwt-maven-
plugin'. A required class is missing: org/codehaus/plexus/util/xml/
XmlStreamReader
org.codehaus.plexus.util.xml.XmlStreamReader
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 22 seconds
[INFO] Finished at: Thu Oct 14 16:19:07 EDT 2010
[INFO] Final Memory: 64M/125M
[INFO]
------------------------------------------------------------------------

David Chandler

unread,
Oct 15, 2010, 12:19:29 PM10/15/10
to Google Web Toolkit
The Expenses pom.xml has been updated in trunk:
http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/expenses/pom.xml

You should now be able to run "mvn gwt:run" to run in hosted mode or
"mvn package gae:run" to run in production mode. Hit
LoadExpensesDB.html first to load sample data, then Expenses.html to
use the app.

The project will import into Eclipse using m2eclipse or "mvn
eclipse:eclipse". To run from Eclipse with Run as | Web Application,
there's still a GPE fix coming...

--
David Chandler
Developer Programs Engineer, GWT

Esfand

unread,
Oct 15, 2010, 1:53:03 PM10/15/10
to Google Web Toolkit
Thnaks! This is going to be a very useful pom.xml file.
So long, greeting (sample.).

Just a reminder, the three .txt files from src/main/webapp
folder still needs to be moved to the project's root folder
in order for the sample to work.

By some minor change it even works with newly released
appengine-1.3.8 and Roo-1.1-RC1.

It can even work with the gwt-2.1.0-SNAPSHT form the
maven central. I just wonder how often this snapshot is
going to be updated. Hopefully with every GWT build of
the Hudson CI server.





On Oct 15, 7:19 pm, David Chandler <turboman...@gmail.com> wrote:
> The Expenses pom.xml has been updated in trunk:http://code.google.com/p/google-web-toolkit/source/browse/trunk/sampl...

coderinabstract

unread,
Oct 15, 2010, 10:41:57 PM10/15/10
to Google Web Toolkit
I am getting the following errors in eclipse..mac os10.6...java
version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)

This is with the updated pom on the gwt2.1RC1 package and updated
POM.xml and mvn eclipse:eclipse maven 2.2


Loading modules
com.google.gwt.sample.expenses.Expenses
Loading inherited module
'com.google.gwt.sample.expenses.ExpensesCommon'
Loading inherited module 'com.google.gwt.app.App'
[ERROR] Unable to find 'com/google/gwt/app/App.gwt.xml' on
your classpath; could be a typo, or maybe you forgot to include a
classpath entry for source?
[ERROR] Line 4: Unexpected exception while processing element
'inherits'


Doing mvn gwt:compile in the shell

[INFO] Preparing gwt:run
[INFO] [gae:unpack {execution: }]
[INFO] Extracting GAE SDK file: /Users/Cda/.m2/repository/com/google/
appengine/appengine-java-sdk/1.3.7/appengine-java-sdk-1.3.7.zip
[INFO] To path: /Users/Cda/.m2/repository/com/google/appengine/
appengine-java-sdk/1.3.7
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/Cda/Downloads/
gwt-2.1.0.RC1/samples/Expenses/src/main/resources
[INFO] [compiler:compile {execution: default-compile}]
[WARNING] File encoding has not been set, using platform encoding
MacRoman, i.e. build is platform dependent!
[INFO] Compiling 58 source files to /Users/Cda/Downloads/gwt-2.1.0.RC1/
samples/Expenses/target/expenses-0.1.0.BUILD-SNAPSHOT/WEB-INF/classes
log4j:WARN No appenders could be found for logger
(DataNucleus.Enhancer).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig
for more info.
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/Cda/Downloads/gwt-2.1.0.RC1/samples/Expenses/src/main/
java/com/google/gwt/sample/expenses/client/Expenses.java:[21,34]
cannot find symbol
symbol : class SimpleEventBus
location: package com.google.gwt.event.shared

[ERROR] /Users/Cda/Downloads/gwt-2.1.0.RC1/samples/Expenses/src/main/
java/com/google/gwt/sample/expenses/client/Expenses.java:[24,43]
cannot find symbol
symbol : class UserInformationProxy
location: package com.google.gwt.requestfactory.shared

[ERROR] /Users/Cda/Downloads/gwt-2.1.0.RC1/samples/Expenses/src/main/
java/com/google/gwt/sample/expenses/client/Expenses.java:[25,46]
package com.google.gwt.requestfactory.ui.client does not exist

[ERROR] /Users/Cda/Downloads/gwt-2.1.0.RC1/samples/Expenses/src/main/
java/com/google/gwt/sample/expenses/client/Expenses.java:[26,46]
package com.google.gwt.requestfactory.ui.client does not exist



……………………..MANY MORE ERRORS..REMOVED FOR READABILITY


/Users/Cda/Downloads/gwt-2.1.0.RC1/samples/Expenses/src/main/java/com/
google/gwt/sample/expenses/client/ExpenseDetails.java:[119,21] cannot
find symbol
symbol : class SafeHtml
location: interface
com.google.gwt.sample.expenses.client.ExpenseDetails.Template

/Users/Cda/Downloads/gwt-2.1.0.RC1/samples/Expenses/src/main/java/com/
google/gwt/sample/expenses/client/ExpenseDetails.java:[119,46] cannot
find symbol
symbol : class SafeHtml
location: interface
com.google.gwt.sample.expenses.client.ExpenseDetails.Template


[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Fri Oct 15 22:04:58 EDT 2010
[INFO] Final Memory: 65M/123M
[INFO]
------------------------------------------------------------------------
Cda-MacBook-Pro:Expenses Cda$

any thoughts...thank you in advance

coderinabstract

unread,
Oct 16, 2010, 2:52:24 AM10/16/10
to Google Web Toolkit
wiped out Maven local repo and reran and it WORKED!!!...still CANNOT
get it to run in eclipse, even after mvn eclipse:eclipse, importing
and running as WebApplication get following error..tried jvm flag and
that too didn't work.

Your SDK:
Release: 1.3.7
Timestamp: Wed Aug 25 12:40:01 EDT 2010
API versions: [1.0]

-----------
Please visit http://code.google.com/appengine for the latest SDK.
********************************************************

Unable to start embedded HTTP server
java.lang.RuntimeException: Unable to locate the App Engine agent.
Please use dev_appserver, KickStart, or set the jvm flag: "-
javaagent:<sdk_root>/lib/agent/appengine-agent.jar"[ERROR] shell
failed in doStartupServer method

at
com.google.appengine.tools.development.DevAppServerFactory.testAgentIsInstalled(DevAppServerFactory.java:
102)
at
com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:
77)
at
com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:
38)
at
com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:
79)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:431)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1053)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:795)
at com.google.gwt.dev.DevMode.main(DevMode.java:282)
Caused by: java.lang.NoClassDefFoundError: com/google/appengine/tools/
development/agent/AppEngineDevAgent
at
com.google.appengine.tools.development.DevAppServerFactory.testAgentIsInstalled(DevAppServerFactory.java:
98)
... 7 more
Caused by: java.lang.ClassNotFoundException:
com.google.appengine.tools.development.agent.AppEngineDevAgent
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 8 more

On Oct 15, 10:41 pm, coderinabstract <coderinabstr...@gmail.com>
wrote:
> log4j:WARN Seehttp://logging.apache.org/log4j/1.2/faq.html#noconfig

coderinabstract

unread,
Oct 16, 2010, 1:34:27 PM10/16/10
to Google Web Toolkit
...just realized that loadExpensesDB is not working with the following
error..
Oct 16, 2010 1:29:53 PM
com.google.appengine.tools.development.ApiProxyLocalImpl log
[ERROR] SEVERE: [1287250193991000] javax.servlet.ServletContext log:
Exception while dispatching incoming RPC call
[ERROR] com.google.gwt.user.server.rpc.UnexpectedException: Service
method 'public abstract java.util.List
com.google.gwt.sample.expenses.client.DataGenerationService.getCounts()'
threw an unexpected exception: java.lang.ExceptionInInitializerError
[ERROR] at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
378)
[ERROR] at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
581)
[ERROR] at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
207)
[ERROR] at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
243)
[ERROR] at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
[ERROR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:
713)
[ERROR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:
806)
[ERROR] at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:51
[ERROR] at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
[ERROR] at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
58)
[ERROR] at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
[ERROR] at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
[ERROR] at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
[ERROR] at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
122)
[ERROR] at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
[ERROR] at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
[ERROR] at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
[ERROR] at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
[ERROR] at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
[ERROR] at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
[ERROR] at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
70)
[ERROR] at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
[ERROR] at
com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:349)
[ERROR] at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
[ERROR] at org.mortbay.jetty.Server.handle(Server.java:326)
[ERROR] at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
[ERROR] at org.mortbay.jetty.HttpConnection
$RequestHandler.content(HttpConnection.java:938)
[ERROR] at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:
755)
[ERROR] at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
[ERROR] at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
[ERROR] at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
409)
[ERROR] at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:582)
[ERROR] Caused by: java.lang.ExceptionInInitializerError
[ERROR] at
com.google.gwt.sample.expenses.server.domain.Employee.entityManager(Employee.java:
59)
[ERROR] at
com.google.gwt.sample.expenses.server.domain.Employee.countEmployees(Employee.java:
39)
[ERROR] at
com.google.gwt.sample.expenses.server.DataGenerationServiceImpl.getCounts(DataGenerationServiceImpl.java:
169)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[ERROR] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
[ERROR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERROR] at
com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:
100)
[ERROR] at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
562)
[ERROR] ... 30 more
[ERROR] Caused by: javax.persistence.PersistenceException: Provider
error. Provider:
org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider
[ERROR] at
javax.persistence.Persistence.createFactory(Persistence.java:176)
[ERROR] at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:
112)
[ERROR] at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:
66)
[ERROR] at
com.google.gwt.sample.expenses.server.domain.EMF.<clinit>(EMF.java:26)
[ERROR] ... 39 more
[ERROR] Caused by: java.lang.NullPointerException
[ERROR] at
org.datanucleus.jpa.EntityManagerFactoryImpl.initialisePMF(EntityManagerFactoryImpl.java:
452)
[ERROR] at
org.datanucleus.jpa.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:
355)
[ERROR] at
org.datanucleus.store.appengine.jpa.DatastoreEntityManagerFactory.<init>(DatastoreEntityManagerFactory.java:
63)
[ERROR] at
org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider.createEntityManagerFactory(DatastorePersistenceProvider.java:
35)
[ERROR] at
javax.persistence.Persistence.createFactory(Persistence.java:172)
[ERROR] ... 42 more
[ERROR]




On Oct 16, 2:52 am, coderinabstract <coderinabstr...@gmail.com> wrote:
> wiped out Maven local repo and reran and it WORKED!!!...still CANNOT
> get it to run in eclipse, even after mvn eclipse:eclipse, importing
> and running as WebApplication get following error..tried jvm flag and
> that too didn't work.
>
> Your SDK:
> Release: 1.3.7
> Timestamp: Wed Aug 25 12:40:01 EDT 2010
> API versions: [1.0]
>
> -----------
> Please visithttp://code.google.com/appenginefor the latest SDK.
> ...
>
> read more »

Esfand

unread,
Oct 16, 2010, 3:10:48 PM10/16/10
to Google Web Toolkit
Hi CoderInAbstract,

I had this problem because the DataNucleus plugin
wasn't able to enhance the classes. It's very likely
that this is your problem too.

If that's the case:

1) Are you using the latest pom.xme from the trunk?
(The one David posted about)

2) Did you wiped-out your local maven repository before
running 'mvn clean package' ?

3) Did you copy the three text files to your project's root
folder? (where the pom.xml is)

4) Are you using the latest Google Plugin for Eclipse RC1?
(It's version is 1.4.0.rc1-201010102248)

By the way which OS are you using?

coderinabstract

unread,
Oct 17, 2010, 4:50:45 PM10/17/10
to Google Web Toolkit
Thanks...it works now outside eclipse in terminal...os used macosX
10.6

however when run mvn eclipse:eclipse command and import as
project...cant get it to run.

any steps as above from would be great to help..thanks in
advance....seems like after mvn gwt:run in command line, the same
project having mvn eclipse:eclipse doesn't work afer importing as
project in eclipse and running as webapplication, must be more to it.

Again..thank you

Esfand

unread,
Oct 18, 2010, 2:00:47 AM10/18/10
to Google Web Toolkit
Now the (almost) final GWT 2.1 version of the pom.xml
file is on the GWT SVN trunk ( http://bit.ly/pom-xml ). and
the instructions to import the sample to Eclipse and
running it is here ( http://bit.ly/pom-ins ). It is still points
to GAE 1.3.7 and Roo M2, but you can change them to
the latest and it works..

Regarding the import to Eclipse, don't use
'gwt eclipse:eclipse', instead import the pom.xml file
directly into Eclipse. For this, select
File / Import / Maven / Existing Maven Project
in Eclipse, This will create the .project, .classpath
and .settings for you.

The good news is that now, like normal Eclipse
development, we can use 'Run As' or 'Debug As' to run
the sample and it works (I mean GPE works now)

Cheers, /es


On Oct 17, 11:50 pm, coderinabstract <coderinabstr...@gmail.com>
wrote:

Esfand

unread,
Oct 18, 2010, 12:12:09 PM10/18/10
to Google Web Toolkit
I think I forgot to mention that in order to use the pom.xml
file from the trunk, you need to change the line

<gwt.version>2.1.0</gwt.version>
to:
<gwt.version>2.1-SNAPSHOT</gwt.version>

because the GWT 2.1.0 release is not in the repository yet.



On Oct 18, 9:00 am, Esfand <esha...@gmail.com> wrote:
> Now the (almost) final GWT 2.1 version of the pom.xml
> file is on the GWT SVN trunk (http://bit.ly/pom-xml).  and
> the instructions to import the sample to Eclipse and
> running  it is here (http://bit.ly/pom-ins).  It is still points

coderinabstract

unread,
Oct 18, 2010, 12:20:46 PM10/18/10
to Google Web Toolkit
Thanks...

After import as maven project...does not recognize automatically as
gwt project. Need to go to project properties and set it up on Eclipse
3.6.
WebToolkit and GAE setup needs to be manually setup.

Also, war file location needs to be adjusted...got it to run with src
\main\webapp or target and unchecked launch and deploye from
directory. Seems like almost there (Don't know if this is related to
Eclipse 3.6, but have not tried with Eclips 3.5). Any thoughts would
be appreciated..thank you.

However the following error occurs on startup
2010-10-18 12:07:43.963 java[12890:a07] [Java CocoaComponent
compatibility mode]: Enabled
2010-10-18 12:07:43.965 java[12890:a07] [Java CocoaComponent
compatibility mode]: Setting timeout for SWT to 0.100000
Initializing AppEngine server
2010-10-18 16:07:44.731:INFO::Logging to STDERR via
org.mortbay.log.StdErrLog
Oct 18, 2010 4:07:44 PM
com.google.apphosting.utils.config.AppEngineWebXmlReader
readAppEngineWebXml
INFO: Successfully processed /Users/Cda/Downloads/gwt-snapshot/trunk/
samples/expenses/src/main/webapp/WEB-INF/appengine-web.xml
Oct 18, 2010 4:07:44 PM
com.google.apphosting.utils.config.AbstractConfigXmlReader
readConfigXml
INFO: Successfully processed /Users/Cda/Downloads/gwt-snapshot/trunk/
samples/expenses/src/main/webapp/WEB-INF/web.xml
2010-10-18 16:07:44.819:INFO::jetty-6.1.x
2010-10-18 16:07:45.134:WARN::EXCEPTION
java.lang.ClassNotFoundException:
com.google.gwt.sample.expenses.server.DataGenerationServiceImpl
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:
151)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.mortbay.util.Loader.loadClass(Loader.java:91)
at org.mortbay.util.Loader.loadClass(Loader.java:71)
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
242)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:
185)
at
com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:
147)
at
com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:
219)
at
com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:
86)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:431)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1053)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:795)
at com.google.gwt.dev.DevMode.main(DevMode.java:282)
Oct 18, 2010 4:07:45 PM
com.google.appengine.tools.development.ApiProxyLocalImpl log
SEVERE: [1287418065136000] javax.servlet.ServletContext log:
unavailable
javax.servlet.UnavailableException:
com.google.gwt.sample.expenses.server.DataGenerationServiceImpl
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:79)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
242)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:
185)
at
com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:
147)
at
com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:
219)
at
com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:
86)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:431)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1053)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:795)
at com.google.gwt.dev.DevMode.main(DevMode.java:282)

2010-10-18 16:07:45.137:WARN::failed dataGeneration:
java.lang.NullPointerException
2010-10-18 16:07:45.213:WARN::Failed startup of context
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext@7e75d2{/,/
Users/Cda/Downloads/gwt-snapshot/trunk/samples/expenses/src/main/
webapp}
java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
256)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:
185)
at
com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:
147)
at
com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:
219)
at
com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:
86)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:431)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1053)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:795)
at com.google.gwt.dev.DevMode.main(DevMode.java:282)
2010-10-18 16:07:45.239:INFO::Started
SelectChann...@0.0.0.0:8888
Oct 18, 2010 4:07:45 PM
com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at http://localhost:8888/




On Oct 18, 2:00 am, Esfand <esha...@gmail.com> wrote:
> Now the (almost) final GWT 2.1 version of the pom.xml
> file is on the GWT SVN trunk (http://bit.ly/pom-xml).  and
> the instructions to import thesampleto Eclipse and
> running  it is here (http://bit.ly/pom-ins).  It is still points
> to GAE 1.3.7 and Roo M2, but you can change them to
> the latest and it works..
>
> Regarding the import to Eclipse, don't use
> 'gwt eclipse:eclipse', instead import the pom.xml file
> directly into Eclipse.  For this, select
> File / Import / Maven / Existing Maven Project
> in Eclipse, This will create the .project, .classpath
> and .settings for you.
>
> The good news is that now, like normal Eclipse
> development, we can use 'Run As' or 'Debug As' to run
> thesampleand it works (I mean GPE works now)

David Chandler (Google)

unread,
Oct 18, 2010, 12:44:34 PM10/18/10
to Google Web Toolkit
A new version of Google Plugin for Eclipse will ship with GWT 2.1
which will fix the Maven integration issues you're seeing. Until then,
you can run the Expenses sample with "mvn gwt:run"

--
David Chandler
Developer Programs Engineer, GWT

On Oct 18, 12:20 pm, coderinabstract <coderinabstr...@gmail.com>
wrote:
> SelectChannelConnec...@0.0.0.0:8888
> Oct 18, 2010 4:07:45 PM
> com.google.appengine.tools.development.DevAppServerImpl start
> INFO: The server is running athttp://localhost:8888/
> > > > 2) Did you wiped-out your...
>
> read more »

Esfand

unread,
Oct 18, 2010, 4:59:32 PM10/18/10
to Google Web Toolkit
Hi CoderInAbstract,

I'm also using Eclipse 3.6. I use Maven 3.0 but Maven 2.2.1
worked too. I did the same changes that you described too.
In addition, I ran 'clean package' using 'Run as maven build'
from within Eclipse before 'Run as WebApp'. I didn't get
any error and I'm able to set breakpoints and step through
the code. So, there must be a difference between
Windows and Mac in this respect.

Bad news is that, after reading David's post (just before
this one), I went ahead and changed some code and
then tried to run the program again, at that time Eclipse
totally hanged while DataNucleus was running. So, it is
possible to debug code as long as after any code
change, we run 'maven package' again.

Regards, /ES


On Oct 18, 7:44 pm, "David Chandler (Google)" <drfibona...@google.com>
wrote:
> ...
>
> read more »

coderinabstract

unread,
Oct 18, 2010, 8:36:36 PM10/18/10
to Google Web Toolkit
Thank you ....that worked!!..the only change from my comments above is
to have to set the Google webapp path in project properties to target/
expenses-0.1.0.BUILD-SNAPSHOT and check the launch and deploy from
this directory check box.

Again..thanks for all the tips on this subject in making this work.

On Oct 18, 4:59 pm, Esfand <esha...@gmail.com> wrote:
> Hi CoderInAbstract,
>
> I'm also using Eclipse 3.6. I use Maven 3.0 but Maven 2.2.1
> worked too.  I did the same changes that you described too.
> In addition, I ran 'clean package' using 'Run as maven build'
> from within Eclipse before 'Run as WebApp'.  I didn't get
> any error and I'm able to set breakpoints and step through
> the code.  So, there must be a difference between
> Windows and Mac in this respect.
>
> Bad news is that, after reading David's post (just before
> this one), I went ahead and changed some code and
> then tried to run the program again, at that time Eclipse
> totally hanged while DataNucleus was running.  So, it is
> possible to debug code as long as after any code
> change, we run 'maven package' again.
>
> Regards, /ES
>
> On Oct 18, 7:44 pm, "David Chandler (Google)" <drfibona...@google.com>
> wrote:
>
>
>
> > A new version of Google Plugin for Eclipse will ship with GWT 2.1
> > which will fix the Maven integration issues you're seeing. Until then,
> > you can run the Expensessamplewith "mvn gwt:run"
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages