This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
-d'n'd some facebook or flickr service into a JSP/Servlet -fill in required auth. properties -build project -run a servlet/jsp => if the callback for the application is not set up correctly then run fails with: "java.io.IOException: Failed to get a valid authentication token." which very often is not true and it can be very hard for the user to find a real problem It would be good to improve this error message to include possible cause of the problem. The message could be for example: "java.io.IOException: Failed to get a valid authentication token. Does your FaceBook Callback URL point to FacebookSocialNetworkingServiceCallback?", similarly for flickr service(s).
Lukas, how did you get the IOException? For me, if the callback is not properly set up with Facebook, you'll get an error page in the browser. It never gets redirected back to our code, so I am afraid no error message will help here.
In the server log, there I can see (if I set ie www.nb.org for callback URL at facebook): java.io.IOException: Failed to get a valid session key. at org.netbeans.saas.facebook.FacebookSocialNetworkingServiceAuthenticator.getSessionKey(FacebookSocialNetworkingServiceAuthenticator.java:61) at org.netbeans.saas.facebook.FacebookSocialNetworkingService.friendsGetLists(FacebookSocialNetworkingService.java:43) at test.GenericResource.getXml(GenericResource.java:56) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ...
It turns out the IOException you see in the server log has nothing to do with facebook callback registration. In fact, you will see the IOException even in the case when you have everything set up correctly. What is going on here is that the first time we try to log in, we will send a redirect to the login page. However, the original thread will continue executing and fail and get an IOException since we haven't logged in yet. The exception is harmless but it would be nice if we fail more gracefully or figure out a way to short circuit the original thread. The fix for this will be involved and risky so I am not going to attempt it for 6.1. Since the exception is harmless, I am lowering the priority to P3 and will try to fix this in a future release.
ok, I agree with P3
Need to understand details deeply. At least fix is risky as it states. So it is not for current release.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss