If you are using the PubNub SDK in Google App Engine, you will need to enable it in your PNConfiguration instance.

PNConfiguration pnConfiguration = new PNConfiguration();
pnConfiguration.setSubscribeKey("yourSubscribeKey"); // required
pnConfiguration.setPublishKey("yourPublishKey"); 
pnConfiguration.setSecretKey("yourSecretKey");
pnConfiguration.setUuid("serverUUID");
pnConfiguration.setSecure(true);
pnConfiguration.setGoogleAppEngineNetworking(true);


Also note that you cannot subscribe from within Google App Engine (which is not typical for most server side use cases) because GAE does not allow long running connections.