Socket permission on Hosted Mode

16 views
Skip to first unread message

Tarlis Portela

unread,
Nov 4, 2009, 2:11:36 PM11/4/09
to google-we...@googlegroups.com
Hi all,

My GWT application use Db4o (some object oriented database), and it use sockets to connect the database server. Besides my application works running in apache tomcat, when a try to runs on Hosted Mode I got the error: 

Caused by: 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 com.db4o.config.PlainSocketFactory.createSocket(PlainSocketFactory.java:18)
at com.db4o.foundation.network.NetworkSocket.<init>(NetworkSocket.java:23)
at com.db4o.Db4o.openClient(Db4o.java:180)
at com.db4o.Db4o.openClient(Db4o.java:144)
at com.db4o.Db4o.openClient(Db4o.java:110)
at br.com.oxcrawl.server.controller.core.database.db4o.Db4oFactory.<init>(Db4oFactory.java:46)
at br.com.oxcrawl.server.controller.core.database.interfaces.Factory.getInstance(Factory.java:28)
at br.com.oxcrawl.server.controller.core.application.LoginAction.doServerAction(LoginAction.java:29)
at br.com.tarlis.actioncontrol.server.controller.core.action.GenericServerAction.doAction(GenericServerAction.java:66)
at br.com.tarlis.actioncontrol.server.controller.core.service.ActionServiceImpl.doAction(ActionServiceImpl.java:54)
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:527)
... 27 more

I know that is because the hosted mode do not allow access to the file system and socket connection. However, I was looking for a way to allow socket connections from hosted mode, somekind of configuration. But I don't find anything on web. If you know a way to do this, help me please.

Thanks,
--
Tarlis Portela

Vietec Vida e Tecnologia Sistemas Ltda
E-mail - tar...@vietec.com.br
Site - www.vietec.com.br
Fone - (46) 3220-2668
Fone - (46) 3220-2624

Rua Elisa Rosa Colla Padoan, 45, Sala 108.
85503-390
Pato Branco - PR

Tarlis Portela

unread,
Nov 4, 2009, 2:18:10 PM11/4/09
to google-we...@googlegroups.com

Isaac Truett

unread,
Nov 4, 2009, 2:39:04 PM11/4/09
to google-we...@googlegroups.com
Hosted (now "Dev") mode does allow sockets from server classes. App
Engine does not allow sockets. You need to uncheck App Engine in your
project properties in Eclipse.
Reply all
Reply to author
Forward
0 new messages