Re: [appengine-java] Re: Channel API (Java) doesn't work locally, but in production mode.

2011-06-17 Thread Zerot Samsa
FINALLY!
We were able to fix the problem :)
First of all we migrated to 1.5.0
Then we noticed that the exception I mentioned in my last post was caused by
some jar files in the target folder, namely:
appengine-api-labs
appengine-api-stubs
appengine-testing
So we excluded those jars from being compiled into the target folder (we
only need them for local unit testing.)
After this steps were made the channel was finally working.
Moishe, thanks for your help :)
Kind regards,
Z


On Thu, Jun 16, 2011 at 5:18 PM, Zerot Samsa zerotsa...@gmail.com wrote:

 Well...
 i've tried simplyfing the channelId, but that didn't solve the problem
 So we migrated to version 1.5.0.
 As a result we now do not get the application key is null... exception,
 but instead we get another exception when creating the channel:

 [ERROR] 2011-06-16 15:05:01.426:WARN::/_ah/channel/dev
 [ERROR] java.lang.ClassCastException:
 com.google.appengine.tools.development.ApiProxyLocalImpl cannot be cast to
 com.google.appengine.tools.development.ApiProxyLocal
 [ERROR] at
 com.google.appengine.api.channel.dev.LocalChannelServlet.getLocalChannelService(LocalChannelServlet.java:81)
 [ERROR] at
 com.google.appengine.api.channel.dev.LocalChannelServlet.doGet(LocalChannelServlet.java:89)
 [ERROR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
 [ERROR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
 [ERROR] at
 com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:66)
 [ERROR] at
 com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
 [ERROR] at
 com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 [ERROR] at
 com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:35)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 [ERROR] at
 com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 [ERROR] at
 com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 [ERROR] at
 com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 [ERROR] at
 com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:94)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
 [ERROR] at
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
 [ERROR] at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
 [ERROR] at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
 [ERROR] at
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
 [ERROR] at
 com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
 [ERROR] at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
 [ERROR] at
 com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:351)
 [ERROR] at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
 [ERROR] at org.mortbay.jetty.Server.handle(Server.java:326)
 [ERROR] at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
 [ERROR] at
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
 [ERROR] at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
 [ERROR] at
 org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
 [ERROR] at
 org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
 [ERROR] at
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
 [ERROR] at
 org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)


 However running gwt-gae-channel sample project works.
 One difference we have noticed is that our token looks different than the
 gwt-gae-channel sample project token.
 Example of our token: channel--j5okj1-test
 gwt-gae-channel token: channel-j5okj1-test
 As you see our token has one hyphen more.

 Any ideas?
 Thanks,
 Z

 On Wed, Jun 15, 2011 at 9:15 PM, Zerot Samsa zerotsa...@gmail.com wrote:

 Thanks for the quick reply.
 At least now I get what's 

Re: [appengine-java] Re: Channel API (Java) doesn't work locally, but in production mode.

2011-06-16 Thread Zerot Samsa
Well...
i've tried simplyfing the channelId, but that didn't solve the problem
So we migrated to version 1.5.0.
As a result we now do not get the application key is null... exception,
but instead we get another exception when creating the channel:

 [ERROR] 2011-06-16 15:05:01.426:WARN::/_ah/channel/dev
 [ERROR] java.lang.ClassCastException:
 com.google.appengine.tools.development.ApiProxyLocalImpl cannot be cast to
 com.google.appengine.tools.development.ApiProxyLocal
 [ERROR] at
 com.google.appengine.api.channel.dev.LocalChannelServlet.getLocalChannelService(LocalChannelServlet.java:81)
 [ERROR] at
 com.google.appengine.api.channel.dev.LocalChannelServlet.doGet(LocalChannelServlet.java:89)
 [ERROR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
 [ERROR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
 [ERROR] at
 com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:66)
 [ERROR] at
 com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
 [ERROR] at
 com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 [ERROR] at
 com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:35)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 [ERROR] at
 com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 [ERROR] at
 com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 [ERROR] at
 com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 [ERROR] at
 com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:94)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 [ERROR] at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
 [ERROR] at
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
 [ERROR] at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
 [ERROR] at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
 [ERROR] at
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
 [ERROR] at
 com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
 [ERROR] at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
 [ERROR] at
 com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:351)
 [ERROR] at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
 [ERROR] at org.mortbay.jetty.Server.handle(Server.java:326)
 [ERROR] at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
 [ERROR] at
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
 [ERROR] at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
 [ERROR] at
 org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
 [ERROR] at
 org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
 [ERROR] at
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
 [ERROR] at
 org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)


However running gwt-gae-channel sample project works.
One difference we have noticed is that our token looks different than the
gwt-gae-channel sample project token.
Example of our token: channel--j5okj1-test
gwt-gae-channel token: channel-j5okj1-test
As you see our token has one hyphen more.

Any ideas?
Thanks,
Z

On Wed, Jun 15, 2011 at 9:15 PM, Zerot Samsa zerotsa...@gmail.com wrote:

 Thanks for the quick reply.
 At least now I get what's happening under the hood ;)
 I will try to simplify the client id and will inform you about the result.

 We are using SDK 1.4.2
 Do you think that might be the problem?
 If so, we will try to migrate to 1.5.

 Thanks so far.
 I will post the result of simplyfing the client when I get to do it.



 On Wed, Jun 15, 2011 at 8:09 PM, Moishe mois...@google.com wrote:

 First, what version of the SDK are you using? It looks like you're
 using something before 1.5.0 (based on the text of the error message)
 -- can you try with 1.5.0?

 Basically the logic that's 

Re: [appengine-java] Re: Channel API (Java) doesn't work locally, but in production mode.

2011-06-15 Thread Zerot Samsa
Any ideas? This problem is starting to get really frustrating :(
Help would be very appreciated :)

On Mon, Jun 13, 2011 at 3:24 PM, Zerot Samsa zerotsa...@gmail.com wrote:

 Yes, that's the value returned by ChannelService.createChannel(channelId),
 where channelId is the email address of an user, which explains the @.
 Should we use something else as the client id and/or remove all special
 characters of the clientId?
 Thanks.


 On Mon, Jun 13, 2011 at 2:49 PM, Moishe mois...@google.com wrote:

 That token looks malformed to me. The dev appserver tokens shouldn't
 have an @ in them. Is that the value directly returned by
 ChannelService.createChannel() or is it modified in some way?

 --
 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
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 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 google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Channel API (Java) doesn't work locally, but in production mode.

2011-06-15 Thread Zerot Samsa
Thanks for the quick reply.
At least now I get what's happening under the hood ;)
I will try to simplify the client id and will inform you about the result.

We are using SDK 1.4.2
Do you think that might be the problem?
If so, we will try to migrate to 1.5.

Thanks so far.
I will post the result of simplyfing the client when I get to do it.


On Wed, Jun 15, 2011 at 8:09 PM, Moishe mois...@google.com wrote:

 First, what version of the SDK are you using? It looks like you're
 using something before 1.5.0 (based on the text of the error message)
 -- can you try with 1.5.0?

 Basically the logic that's happening here is:

  - the application calls create channel
  - the dev appserver gins up a token consisting of a random string
 plus the application-provided client id
  - the dev appserver adds this token to a hashmap of token - clientid
  - the dev appserver returns the token

 Later, when the client connects, this happens:

  - the client makes a post to /_ah/channel/dev?
 command=connectchannel={{token}}
  - the dev appserver intercepts this request and looks up the
 channel query param in the hashmap of token - clientid

 What seems to be happening in your case is that the dev appserver
 can't extract the channel query param based on the application key
 is null error. All I can think of is that there's something in the
 token that's preventing the query params from being parsed correctly.
 As a test, can you try simplifying your client id? (I can't read the
 whole thing because Groups thinks it's an email address and elides it)

 --
 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
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 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 google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Channel API (Java) doesn't work locally, but in production mode.

2011-06-13 Thread Zerot Samsa
Yes, that's the value returned by ChannelService.createChannel(channelId),
where channelId is the email address of an user, which explains the @.
Should we use something else as the client id and/or remove all special
characters of the clientId?
Thanks.

On Mon, Jun 13, 2011 at 2:49 PM, Moishe mois...@google.com wrote:

 That token looks malformed to me. The dev appserver tokens shouldn't
 have an @ in them. Is that the value directly returned by
 ChannelService.createChannel() or is it modified in some way?

 --
 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
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 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 google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Channel API (Java) doesn't work locally, but in production mode.

2011-06-12 Thread Zerot Samsa
Server side log when creating the channel:

Channel for player 'agpjaXR5dGFnd2Vicg0LEgd2MV9Vc2VyGAEM' has been created.

Token='channel--evv68b-a@a.a'


Client side log of the http request:
Headers:
Request URL:
http://127.0.0.1:/_ah/channel/dev?command=connectchannel=channel--evv68b-a@a.a
Request Method:GET
Status Code:500 Channel for application key null not found.
Request Headers

 Accept:*/*
 Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
 Accept-Encoding:gzip,deflate,sdch
 Accept-Language:de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
 Connection:keep-alive
 Cookie:JSESSIONID=1rvcszjuw6ain; sid=5851170229948939395; email=a%40a.a;
 password=DMF1ucDxtqgxw5niaXcmYQ%3D%3D
 Host:127.0.0.1:
 Referer:
 http://127.0.0.1:/citytag_standalone_source.html?gwt.codesvr=127.0.0.1:9997
 User-Agent:Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.30 (KHTML, like
 Gecko) Chrome/12.0.742.91 Safari/534.30
 Query String Parametersview URL encoded
 command:connect
 channel:channel--evv68b-a@a.a
 Response Headers
 Cache-Control:must-revalidate,no-cache,no-store
 Content-Length:4576
 Content-Type:text/html; charset=iso-8859-1
 Server:Jetty(6.1.x)

Content:

 html
 head
 meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1/
 titleError 500 Channel for application key null not found./title
 /head
 bodyh2HTTP ERROR 500/h2
 pProblem accessing /_ah/channel/dev. Reason:
 preChannel for application key null not found./pre/ph3Caused
 by:/h3precom.google.appengine.api.channel.dev.LocalChannelFailureException:
 Channel for application key null not found.
 at
 com.google.appengine.api.channel.dev.ChannelManager.getChannel(ChannelManager.java:58)
 at
 com.google.appengine.api.channel.dev.ChannelManager.getClientChannel(ChannelManager.java:73)
 at
 com.google.appengine.api.channel.dev.ChannelManager.connectClient(ChannelManager.java:122)
 at
 com.google.appengine.api.channel.dev.LocalChannelServlet.doGet(LocalChannelServlet.java:64)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
 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.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:66)
 at
 com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
 at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
 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
 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.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)
 /pre
 hr /ismallPowered by Jetty:///small/ibr/

 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 /body
 /html


Hope that helps or are there any other logs you would be interested in?
Is there any way to get more low-level log information?

Thanks!

On Tue, Jun 7,