using gwt with hibernate example

690 views
Skip to first unread message

Mic L

unread,
Mar 29, 2014, 9:30:06 AM3/29/14
to google-we...@googlegroups.com
HI,
I have found a nice article "using gwt with hibernate example". However, I have trouble to import this code into Eclipse. I always get the following warnings, but the app does not start:
[WARN] Server class 'org.eclipse.jetty.servlet.listener.ELContextCleaner' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/home/mic/apps/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/gwt-dev.jar' to the web app classpath for this session
   For additional info see: file:/home/mic/apps/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/doc/helpInfo/webAppClassPath.html
[WARN] No startup URLs supplied and no plausible ones found -- use -startupUrl

How is it possible to import the code into Eclipse and would ActiveJDBC solves Hibernates problems?

Thank you in advance.

Mic




Thomas Broyer

unread,
Mar 29, 2014, 11:20:30 AM3/29/14
to google-we...@googlegroups.com


On Saturday, March 29, 2014 2:30:06 PM UTC+1, Mic L wrote:
HI,
I have found a nice article "using gwt with hibernate example". However, I have trouble to import this code into Eclipse. I always get the following warnings, but the app does not start:
[WARN] Server class 'org.eclipse.jetty.servlet.listener.ELContextCleaner' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/home/mic/apps/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/gwt-dev.jar' to the web app classpath for this session
   For additional info see: file:/home/mic/apps/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/doc/helpInfo/webAppClassPath.html

This is a bug in 2.6.0 that will be fixed in 2.6.1. But it doesn't prevent apps form running.
 
[WARN] No startup URLs supplied and no plausible ones found -- use -startupUrl

When launching the app (https://developers.google.com/eclipse/docs/running_and_debugging_2_0) make sure there's a --startupUrl argument in the Arguments tab with a value of Musicstore.html (i.e. --startupUrl MusicStore.html). Note that it should go *before* the module's name.

Mic L

unread,
Mar 31, 2014, 8:00:03 AM3/31/14
to google-we...@googlegroups.com
Thank you it was that problem and now it works.

Daniel Plop

unread,
Apr 9, 2014, 7:59:13 AM4/9/14
to google-we...@googlegroups.com
I get following error when trying to add a record:

Starting Jetty on port 8888
   [WARN] Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.Long com.google.musicstore.client.MusicStoreService.saveRecord(com.google.musicstore.client.dto.RecordDTO)' threw an unexpected exception: java.lang.NoSuchMethodError: org.hibernate.SessionFactory.openSession()Lorg/hibernate/Session;
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:389)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:579)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Caused by: java.lang.NoSuchMethodError: org.hibernate.SessionFactory.openSession()Lorg/hibernate/Session;
at com.google.musicstore.server.MusicStoreServiceImpl.saveRecord(MusicStoreServiceImpl.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561)
... 22 more

I don't understand what could be the problem ? 

Davide Micheletti

unread,
Apr 9, 2014, 9:00:25 AM4/9/14
to google-we...@googlegroups.com
NoSuchMethodError
Have you added it into your server's interfaces??  
If yes, have you reloaded the server class?


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Daniel Plop

unread,
Apr 9, 2014, 10:13:04 AM4/9/14
to google-we...@googlegroups.com
What does "Have you added it into your server's interfaces?" mean. If you refer to the fact that I should add it to Interface "Service" and Interface "ServiceAsync". Yes I did.
What does "reload the server class" mean ?.
I basically followed all the steps from this tutorial http://www.gwtproject.org/articles/using_gwt_with_hibernate.html .To be mentioned that I used DTO as integration strategy.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages