Re: Connecting to a oracle database with GWT

2011-07-21 Thread dreamer
Eclipse plugin is a real good friend to figure out RPC.

Just create new project choosing both app engine and gwt, creates a
nice working sample RPC , hello world.

Add few more methods for practice, then add few more servlets and call
from client.

On Jul 21, 3:03 am, Ryan McFall  wrote:
> 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  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.(
>
> > *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.buscarI 
> > ndicadorBanco(
>
> > *IndicadorBanco.java:75*)
>
> > at
> > com.carriers.chartapplication.server.indicador.negocio.IndicadorNegocio. > it>(
>
> > *IndicadorNegocio.java:44*)
>
> > at com.carriers.chartapplication.server.GreetingServiceImpl.(
>
> > *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

Re: Connecting to a oracle database with GWT

2011-07-21 Thread Ryan McFall
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  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.(
>
> *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.(
>
> *IndicadorNegocio.java:44*)
>
> at com.carriers.chartapplication.server.GreetingServiceImpl.(
>
> *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

Re: Connecting to a oracle database with GWT

2011-07-20 Thread Bruno Henrique
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.(

*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.(

*IndicadorNegocio.java:44*)

at com.carriers.chartapplication.server.GreetingServiceImpl.(

*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 

> 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 

Re: Connecting to a oracle database with GWT

2011-07-20 Thread Jeff Larsen
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.



Re: Connecting to a oracle database with GWT

2011-07-20 Thread Bruno Henrique
I have no problems with jdbc...I've already worked with this in desktop and
web applications (jsp, jsf)...my problem is using it with GWT...I don't know
how to do it...where I have to add the oracle library...

2011/7/20 Kevin Anderson 

>
> http://www.java-forums.org/java-tips/6116-using-jdbc-connect-oracle-database.html
>
> This is more of a java question then a GWT question. But the above gives
> you an example of how to do it. Though I personally prefer using something
> like spring to handle the oracle connection and then in my services just
> inject the connection.
>
> --
> 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/-/8k6xhdQKwY0J.
> 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.



Re: Connecting to a oracle database with GWT

2011-07-20 Thread Kayode Odeyemi
There's ODK4Spring connector. Download it and you are up to speed.

On 7/20/11, Kevin Anderson  wrote:
> http://www.java-forums.org/java-tips/6116-using-jdbc-connect-oracle-database.html
>
> This is more of a java question then a GWT question. But the above gives you
> an example of how to do it. Though I personally prefer using something like
> spring to handle the oracle connection and then in my services just inject
> the connection.
>
> --
> 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/-/8k6xhdQKwY0J.
> 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.
>
>


-- 
Odeyemi 'Kayode O.
http://www.sinati.com. t: @charyorde

-- 
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.



Re: Connecting to a oracle database with GWT

2011-07-20 Thread Kevin Anderson
http://www.java-forums.org/java-tips/6116-using-jdbc-connect-oracle-database.html

This is more of a java question then a GWT question. But the above gives you 
an example of how to do it. Though I personally prefer using something like 
spring to handle the oracle connection and then in my services just inject 
the connection.

-- 
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/-/8k6xhdQKwY0J.
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.



Connecting to a oracle database with GWT

2011-07-20 Thread Bruno Henrique
Hi people,

Can someone give an example how to configure and call a oracle db connection
using GWT.
I know that it must be done in the server side and I can get the data in
client side using RPC. But I don't know where to add the oracle library and
make the calls.

Tks!!!

-- 
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.