Re: GWT Hibernate integration EROR : Exception while dispatching incoming RPC call

726 views
Skip to first unread message

Rob

unread,
Jun 20, 2012, 6:02:06 PM6/20/12
to google-we...@googlegroups.com

Rob Whiteside

unread,
Jun 20, 2012, 6:54:29 PM6/20/12
to google-we...@googlegroups.com
Looks like a classpath problem.  I don't think you have all your hibernate jars in place.  Do you have a slf4j-api in your WEB-INF/lib?

On Wednesday, June 13, 2012 12:17:17 AM UTC-7, Rahul Gamit wrote:

Hello i have followed https://developers.google.com/web-toolkit/articles/using_gwt_with_hibernate tutorial to integrate gwt and hibernate.
I have used DTO approach for integration, but whenever i am running the application i am getting the following error.

Exception while dispatching incoming RPC call

Here is the entire stack trace,

[WARN] Server class 'org.hibernate.Session' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/D:/Eclipse%20Workspaces/GwtMvpProject/newlib/hibernate3.jar' to the web app classpath for this session
   For additional info see: file:/D:/Development%20Tools/eclipse-jee-indigo-SR2-win32-x86_64/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201205021203-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'org.dom4j.DocumentException' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/D:/Eclipse%20Workspaces/GwtMvpProject/newlib/dom4j-1.6.1.jar' to the web app classpath for this session
   For additional info see: file:/D:/Development%20Tools/eclipse-jee-indigo-SR2-win32-x86_64/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201205021203-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
Starting Jetty on port 8888
   [WARN] Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract void com.google.employee.client.EmployeeService.addContact(com.google.employee.client.DTO.ContactDTO)' threw an unexpected exception: java.lang.ExceptionInInitializerError
    at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:385)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:588)
    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.ExceptionInInitializerError
    at com.google.employee.util.HibernateUtil.<clinit>(HibernateUtil.java:17)
    at com.google.employee.server.EmployeeServiceImpl.addContact(EmployeeServiceImpl.java:59)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
    ... 22 more
Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
    at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:151)
    at com.google.employee.util.HibernateUtil.<clinit>(HibernateUtil.java:13)
    ... 28 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:372)
    at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
    at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
    ... 30 more
[ERROR] 500 - POST /gwtmvpproject/employeeService (127.0.0.1) 57 bytes
   Request headers
      Host: 127.0.0.1:8888
      User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
      Accept-Language: en-us,en;q=0.5
      Accept-Encoding: gzip, deflate
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
      Connection: keep-alive
      Referer: http://127.0.0.1:8888/GwtMvpProject.html?gwt.codesvr=127.0.0.1:9997
      X-GWT-Permutation: HostedMode
      X-GWT-Module-Base: http://127.0.0.1:8888/gwtmvpproject/
      Content-Type: text/x-gwt-rpc; charset=utf-8
      Content-Length: 217
      Pragma: no-cache
      Cache-Control: no-cache
   Response headers
      Content-Type: text/plain
if anyone is having idea about this please help me ..

Thanks Rahul Gamit

Nikola Markovic

unread,
Jun 21, 2012, 2:57:38 AM6/21/12
to google-we...@googlegroups.com
Also, make sure you got all the required jars copied into the WEB-INF\lib folder.

harish saharan

unread,
Jun 23, 2012, 8:43:27 AM6/23/12
to google-we...@googlegroups.com
Paste all your hibernate jars in your web-inf/lib folder .............
Reply all
Reply to author
Forward
0 new messages