You have to explicitly throw any exceptions in all service methods.

Jim
http://www.gwtorm.com For GWT ORM
http://code.google.com/p/dreamsource-orm/downloads/list

On May 15, 9:52 am, Raul <raahoo...@gmail.com> wrote:
> Hello all,
>
> At present I am trying to integrate GWT Hibernate and MySQL in
> Tomcat5. I am using Hibernate to access my database in a servlet as
>
> public class DBConnectionImpl extends RemoteServiceServlet implements
> DBConnection {
>        private Session session;
>
>         public DBConnectionImpl() {
>                 try {
>                         session = 
> HibernateUtil.getSessionFactory().openSession();
>                 } catch (Exception ex) {
>                         ex.printStackTrace();
>                 }
>         }
>
> }
>
> I have configured all the necessary Hibernate requirements like
> hybernate.cfg.xml, web.xml, context.xml and all necessary java
> classes.
>
> But when I want to connect with my database through a rpc call it
> shows me error like:
>
> May 15, 2009 7:00:44 PM org.apache.catalina.core.ApplicationContext
> log
> SEVERE: Exception while dispatching incoming RPC call
> com.google.gwt.user.server.rpc.UnexpectedException: Service method
> 'public abstract com.duke.irb.client.data.User
> com.duke.irb.client.dao.DBConnection.authenticateUser
> (java.lang.String,java.lang.String)' threw an unexpected exception:
> java.lang.UnsupportedOperationException: Not supported by
> BasicDataSource
>         at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure
> (RPC.java:360)
>         at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
> (RPC.java:546)
>         at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
> (RemoteServiceServlet.java:166)
>         at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
> (RemoteServiceServlet.java:86)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:269)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:188)
>         at org.apache.catalina.core.StandardWrapperValve.invoke
> (StandardWrapperValve.java:213)
>         at org.apache.catalina.core.StandardContextValve.invoke
> (StandardContextValve.java:174)
>         at org.apache.catalina.core.StandardHostValve.invoke
> (StandardHostValve.java:127)
>         at org.apache.catalina.valves.ErrorReportValve.invoke
> (ErrorReportValve.java:117)
>         at org.apache.catalina.core.StandardEngineValve.invoke
> (StandardEngineValve.java:108)
>         at org.apache.catalina.connector.CoyoteAdapter.service
> (CoyoteAdapter.java:174)
>         at org.apache.coyote.http11.Http11Processor.process
> (Http11Processor.java:874)
>         at org.apache.coyote.http11.Http11BaseProtocol
> $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:
> 665)
>         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
> (PoolTcpEndpoint.java:528)
>         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
> (LeaderFollowerWorkerThread.java:81)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
> (ThreadPool.java:689)
>         at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.UnsupportedOperationException: Not supported by
> BasicDataSource
>         at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection
> (BasicDataSource.java:899)
>         at org.hibernate.connection.DatasourceConnectionProvider.getConnection
> (DatasourceConnectionProvider.java:89)
>         at org.hibernate.jdbc.ConnectionManager.openConnection
> (ConnectionManager.java:446)
>         at org.hibernate.jdbc.ConnectionManager.getConnection
> (ConnectionManager.java:167)
>         at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)
>         at org.hibernate.transaction.JDBCTransaction.begin
> (JDBCTransaction.java:85)
>         at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:
> 1353)
>         at com.duke.irb.server.DBConnectionImpl.authenticateUser
> (DBConnectionImpl.java:30)
>         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:527)
>         ... 18 more
>
> Please help me out in solving this issue.
>
> I will provide more information further if needed.
>
> I am new to both GWT and Hibernate... :-)
>
> Thanks in advance
> Raul
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to