It looks like you're trying to access the JDBC code from within the client. This doesn't work with GWT.
To do this, you need to use an RPC method between the client and the server, and communicate with Oracle on the server side. You can use GWT-RPC or RequestFactory to handle the RPC calls. Ryan On Jul 20, 2:02 pm, Bruno Henrique <f203...@gmail.com> wrote: > Can someone give an simple example how to use oracle with GWT, using RPC? > I tried to do something here, but I got the error: > > java.lang.NoClassDefFoundError: java.net.Socket is a restricted class. > Please see the Google App Engine developer's guide for more details. > > at com.google.appengine.tools.development.agent.runtime.Runtime.reject( > > *Runtime.java:51*) > > at oracle.net.nt.TcpNTAdapter.connect(Unknown Source) > > at oracle.net.nt.ConnOption.connect(Unknown Source) > > at oracle.net.nt.ConnStrategy.execute(Unknown Source) > > at oracle.net.resolver.AddrResolution.resolveAndExecute(Unknown Source) > > at oracle.net.ns.NSProtocol.establishConnection(Unknown Source) > > at oracle.net.ns.NSProtocol.connect(Unknown Source) > > at oracle.jdbc.ttc7.TTC7Protocol.connect( > > *TTC7Protocol.java:1774*) > > at oracle.jdbc.ttc7.TTC7Protocol.logon( > > *TTC7Protocol.java:215*) > > at oracle.jdbc.driver.OracleConnection.<init>( > > *OracleConnection.java:362*) > > at oracle.jdbc.driver.OracleDriver.getConnectionInstance( > > *OracleDriver.java:536*) > > at oracle.jdbc.driver.OracleDriver.connect( > > *OracleDriver.java:328*) > > at java.sql.DriverManager.getConnection(Unknown Source) > > at java.sql.DriverManager.getConnection(Unknown Source) > > at > com.carriers.chartapplication.server.indicador.banco.IndicadorBanco.buscarIndicadorBanco( > > *IndicadorBanco.java:75*) > > at > com.carriers.chartapplication.server.indicador.negocio.IndicadorNegocio.<init>( > > *IndicadorNegocio.java:44*) > > at com.carriers.chartapplication.server.GreetingServiceImpl.<init>( > > *GreetingServiceImpl.java:16*) > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0( > > *Native Method*) > > at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) > > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) > > at java.lang.reflect.Constructor.newInstance(Unknown Source) > > at java.lang.Class.newInstance0(Unknown Source) > > at java.lang.Class.newInstance(Unknown Source) > > at org.mortbay.jetty.servlet.Holder.newInstance( > > *Holder.java:153*) > > at org.mortbay.jetty.servlet.ServletHolder.initServlet( > > *ServletHolder.java:428*) > > at org.mortbay.jetty.servlet.ServletHolder.getServlet( > > *ServletHolder.java:339*) > > at org.mortbay.jetty.servlet.ServletHolder.handle( > > *ServletHolder.java:487*) > > 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:97*) > > 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:212*) > > 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*) > > 2011/7/20 Jeff Larsen <larse...@gmail.com> > > > with GWT you have client and server code. The question you're asking is > > similar to asking where to put the oracle library when using JQuery. GWT > > compiles to javascript and while it has some server side plumbing, that is > > there just to facilitate client/server communication. The answer is you put > > the oracle jar inside your server and only reference it from your server > > side classes. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Web Toolkit" group. > > To view this discussion on the web visit > >https://groups.google.com/d/msg/google-web-toolkit/-/aDrqg9PQ6OEJ. > > > 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. -- 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.