Are you using Java 7? If so, you need to downgrade to Java 6. This is a
known bug (you can see a similar stacktrace from Oracle:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7145592 the only
workaround listed is to use Java 6).
If I recall correctly, App Engine only supports Java 5 & 6, not 7.
If you're not using Java 7, you'll have to post more of your code. Or
deploy your app to App Engine production and see if the problem fixes
itself; you may have an issue with your local dev environment.
-Vinny P
On Friday, October 12, 2012 10:37:10 AM UTC-5, Mario Buonomo wrote:
>
> Hi, I've a problem with fetch URL using appengine..
>
> the problem is on url.openStream() (nullpointerexception) but url is not
> null
>
> this is my code:
>
> try {
> URL url = new URL(site);
> BufferedReader reader = new BufferedReader(new
> InputStreamReader(url.openStream()));
> String line;
> while ((line = reader.readLine()) != null) {
> }
> reader.close();
> } catch (MalformedURLException e) {
> } catch (Exception e) {
> }
>
> the error is:
> java.lang.NullPointerException
> at java.util.Collections.addAll(Unknown Source)
> at sun.security.ssl.AbstractTrustManagerWrapper.<init>(Unknown Source)
> at sun.security.ssl.SSLContextImpl.chooseTrustManager(Unknown Source)
> at sun.security.ssl.SSLContextImpl.engineInit(Unknown Source)
> at javax.net.ssl.SSLContext.init(Unknown Source)
> at
> com.google.appengine.api.urlfetch.dev.LocalURLFetchService.createNonvalidatingScheme(LocalURLFetchService.java:241)
> at
> com.google.appengine.api.urlfetch.dev.LocalURLFetchService.createHttpClient(LocalURLFetchService.java:263)
> at
> com.google.appengine.api.urlfetch.dev.LocalURLFetchService.getNonValidatingClient(LocalURLFetchService.java:508)
> at
> com.google.appengine.api.urlfetch.dev.LocalURLFetchService.access$100(LocalURLFetchService.java:82)
> at
> com.google.appengine.api.urlfetch.dev.LocalURLFetchService$7.run(LocalURLFetchService.java:422)
> at
> com.google.appengine.api.urlfetch.dev.LocalURLFetchService$7.run(LocalURLFetchService.java:409)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> com.google.appengine.api.urlfetch.dev.LocalURLFetchService.doPrivilegedExecute(LocalURLFetchService.java:409)
> at
> com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch(LocalURLFetchService.java:377)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.callInternal(ApiProxyLocalImpl.java:527)
> at
> com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:481)
> at
> com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:458)
> at java.util.concurrent.Executors$PrivilegedCallable$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.util.concurrent.Executors$PrivilegedCallable.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
>
> the same in a simple java app work fine..
>
> I had test in local
> can you help me?
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-appengine/-/CyH4G7qfdqcJ.
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?hl=en.