Hello All,

 I tried using Chat System within App Engine i am using own side server and
Database. So Plz suggess me how to go through this.

Thanks

On 5 February 2011 11:58, lovegoogle <[email protected]> wrote:

> Thank you Fabrizio. That was very helpful.
> I did exactly what you suggested and it works fine.
> Downloaded the source from the trunk and compiled it into the app.
> I am able to send SMS now.
>
> Cheers!
> Sinu
>
> On Feb 2, 11:12 pm, Fabrizio Accatino <[email protected]> wrote:
> > I think your lib uses not whitelisted java API or blocked java API
> >    java.security.AccessControlException: access denied
> > (java.lang.RuntimePermission
> > setFactory)
> >
> > Following your stacktrace the problem comes from
> > java.net.HttpURLConnection.setFollowRedirect
> > The method is called by
> > com.techventus.server.voice.Voice.get(Voice.java:1144)
> > I searched using Google... is this your lib?
> http://code.google.com/p/google-voice-java ?
> >
> > If yes, download the latest source code and compile it. The latest
> version
> > of Voice.java does not contain the call to
> > java.net.HttpURLConnection.setFollowRedirect.
> > It was replaced some revisions ago.
> http://code.google.com/p/google-voice-java/source/diff?spec=svn137&ol...http://code.google.com/p/google-voice-java/source/browse/trunk/src/co.
> ..
> >
> > The jar in the download area was not updated. So you need to download the
> > source code and compile it by yourself.
> >
> >    Fabrizio
> >
> >
> >
> >
> >
> >
> >
> > On Wed, Feb 2, 2011 at 5:34 PM, lovegoogle <[email protected]> wrote:
> > > Hello All,
> >
> > > I tried using google voice within App Engine and it fails to execute
> > > because of the custom Security Manager that App Engine uses.
> > > From the stack trace, it looks like it is failing during the Http
> > > Connection it needs to make to send SMS.
> > > My goal is to use SMS feature within my application.
> >
> > > I tried running the same code outside of App Engine runtime, using
> > > just my JDK as a console app and it works fine.
> > > The restriction is imposed by App Engine.
> >
> > > Is there any way to get around it or Google Voice is a no no within
> > > App Engine.
> > > I would assume that Google Voice is a trusted code since its part of
> > > google APIs.
> >
> > > Any pointers will really help me...Thanks.
> >
> > > Sinu
> >
> > > Here is the code
> > >
> -------------------------------------------------------------------------
> > >                try
> > >                {
> > >                        log.info("going to log in");
> > >                        Voice voice = new Voice(email, password);
> > >                        log.info("logged in");
> > >                        voice.sendSMS(phonenum, message);
> > >                        log.info("sms sent");
> > >                        return true;
> > >                }
> > >                catch(Exception e)
> > >                {
> > >                        e.printStackTrace();
> > >                        return false;
> > >                }
> > >
> -------------------------------------------------------------------------
> >
> > > Here is the stack trace..
> >
> > >
> -------------------------------------------------------------------------
> > > going to log in
> > >https://www.google.com/accounts/ClientLogin- OK
> > > Logged in to Google - Auth token received
> > > java.security.AccessControlException: access denied
> > > (java.lang.RuntimePermission setFactory)
> > >        at
> >
> > >
> java.security.AccessControlContext.checkPermission(AccessControlContext.jav
> a:
> > > 323)
> > >        at
> > > java.security.AccessController.checkPermission(AccessController.java:
> > > 546)
> > >        at
> java.lang.SecurityManager.checkPermission(SecurityManager.java:
> > > 532)
> > >        at com.google.appengine.tools.development.DevAppServerFactory
> > > $CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
> > >        at
> java.lang.SecurityManager.checkSetFactory(SecurityManager.java:
> > > 1612)
> > >        at
> > > java.net.HttpURLConnection.setFollowRedirects(HttpURLConnection.java:
> > > 249)
> > >        at com.techventus.server.voice.Voice.get(Voice.java:1144)
> > >        at com.techventus.server.voice.Voice.getGeneral(Voice.java:361)
> > >        at com.techventus.server.voice.Voice.init(Voice.java:262)
> > >        at com.techventus.server.voice.Voice.<init>(Voice.java:211)
> > >        at
> > > com.sinusekhar.cloudapps.zumba.dao.MobileDAO.sendSMS(MobileDAO.java:
> > > 15)
> > >        at
> org.apache.jsp.zumba.jsp.play_jsp._jspService(play_jsp.java:64)
> > >        at
> > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> > >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> > >        at
> > >
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
> > > 377)
> > >        at
> > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:
> > > 313)
> > >        at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
> > >        at
> > > com.google.appengine.tools.development.PrivilegedJspServlet.access
> > > $101(PrivilegedJspServlet.java:23)
> > >        at com.google.appengine.tools.development.PrivilegedJspServlet
> > > $2.run(PrivilegedJspServlet.java:59)
> > >        at java.security.AccessController.doPrivileged(Native Method)
> > >        at
> >
> > >
> com.google.appengine.tools.development.PrivilegedJspServlet.service(Privile
> gedJspServlet.java:
> > > 57)
> > >        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.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi
> lter.java:
> > > 58)
> > >        at org.mortbay.jetty.servlet.ServletHandler
> > > $CachedChain.doFilter(ServletHandler.java:1157)
> > >        at
> >
> > >
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans
> actionCleanupFilter.java:
> > > 43)
> > >        at org.mortbay.jetty.servlet.ServletHandler
> > > $CachedChain.doFilter(ServletHandler.java:1157)
> > >        at
> >
> > >
> com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile
> Filter.java:
> > > 122)
> > >        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(DevAppEn
> gineWebAppContext.java:
> > > 70)
> > >        at
> > > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> > > 152)
> > >        at com.google.appengine.tools.development.JettyContainerService
> > > $ApiProxyHandler.handle(JettyContainerService.java:349)
> > >        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.headerComplete(HttpConnection.java:923)
> > >        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
> > >        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)
> > > [WARN] No file found for: /favicon.ico
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Google App Engine for Java" group.
> > > To post to this group, send email to
> > > [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<google-appengine-java%[email protected]><google-appengine-java%2B
> [email protected]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>


-- 
Amrendra Tripathi
New Delhi-92
9873075473

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to