Thursday, July 28, 2011

Re: gwt database connectivity

This code "Class.forName("oracle.jdbc.driver.OracleDriver");" is in your server side? if not, you can't do in client side

2011/7/28 vijayakumar veeraragavan <vijayakumar.veera87@gmail.com>
guys iam try connect to oracle database using GWT but show the
following error in the line
Class.forName("oracle.jdbc.driver.OracleDriver");



[ERROR] javax.servlet.ServletContext log: Exception while dispatching
incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract java.lang.String
org.db.client.GreetingService.greetServer(java.lang.String,org.db.client.GwtBean)'
threw an unexpected exception: java.lang.NoClassDefFoundError: Could
not initialize class oracle.jdbc.driver.OracleDriver
       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:
511)
       at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
       at
com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:
35)
       at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
       at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
58)
       at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
       at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
       at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
       at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
122)
       at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
       at
com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:
94)
       at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
       at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
       at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
       at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
       at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
       at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
       at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
70)
       at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
       at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:351)
       at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
       at org.mortbay.jetty.Server.handle(Server.java:326)
       at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
       at org.mortbay.jetty.HttpConnection
$RequestHandler.content(HttpConnection.java:938)
       at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
       at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
       at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
       at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
409)
       at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class
oracle.jdbc.driver.OracleDriver
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:169)
       at org.db.server.Dbconnection.createConnection(Dbconnection.java:19)
       at
org.db.server.GreetingServiceImpl.greetServer(GreetingServiceImpl.java:
36)
       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.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:
100)
       at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
569)
       ... 34 more

pls help and tell about proper way to connect

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment