2011-10-05 44 views
1

我有一個春天社會應用程序,我在部署谷歌App Engine的,但我的應用程序的工作流程的一個過程,我發現了以下錯誤:javax.net.ssl.KeyManagerFactory是有限制類錯誤與GAE

java.lang.NoClassDefFoundError: javax.net.ssl.KeyManagerFactory 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 org.apache.http.conn.ssl.SSLSocketFactory.createSSLContext(SSLSocketFactory.java:184) 
    at org.apache.http.conn.ssl.SSLSocketFactory.createDefaultSSLContext(SSLSocketFactory.java:209) 
    at org.apache.http.conn.ssl.SSLSocketFactory.<init>(SSLSocketFactory.java:333) 
    at org.apache.http.conn.ssl.SSLSocketFactory.getSocketFactory(SSLSocketFactory.java:165) 
    at org.springframework.social.support.HttpComponentsClientHttpRequestFactory$HttpComponentsClient_4_1.getInstance(HttpComponentsClientHttpRequestFactory.java:185) 
    at org.springframework.social.support.HttpComponentsClientHttpRequestFactory.<init>(HttpComponentsClientHttpRequestFactory.java:79) 
    at org.springframework.social.support.ClientHttpRequestFactorySelector$HttpComponentsClientRequestFactoryCreator$1.<init>(ClientHttpRequestFactorySelector.java:68) 
    at org.springframework.social.support.ClientHttpRequestFactorySelector$HttpComponentsClientRequestFactoryCreator.createRequestFactory(ClientHttpRequestFactorySelector.java:68) 
    at org.springframework.social.support.ClientHttpRequestFactorySelector.getRequestFactory(ClientHttpRequestFactorySelector.java:44) 
    at org.springframework.social.oauth2.ProtectedResourceClientFactory.create(ProtectedResourceClientFactory.java:56) 
    at org.springframework.social.oauth2.AbstractOAuth2ApiBinding.<init>(AbstractOAuth2ApiBinding.java:60) 
    at org.springframework.social.facebook.api.impl.FacebookTemplate.<init>(FacebookTemplate.java:107) 
    at saket.fb.controller.FaceBookController.attack(FaceBookController.java:35) 
    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 org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) 
    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436) 
    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424) 
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900) 
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827) 

我該如何克服這個問題?

我已經看到相關/類似的帖子/問題,但這些似乎並沒有在這裏回答這個問題。

回答

1

您無法在App Engine上打開自己的套接字 - SSL或其他。相反,您必須使用URLFetch API來提出外部請求。