Codigami / face4j

face4j is a java library for facebook's new graph API
http://face4j.org
24 stars 6 forks source link

getCurrentUser() throw Exception on first load? #20

Open henryhks opened 12 years ago

henryhks commented 12 years ago

I found that when I deploy my project on tomcat The following exception is thrown in the FIRST time I call getCurrentUser() with a valid access token:

...... OAuthAccessToken fbaccessToken = new OAuthAccessToken(accessToken); Facebook facebook = new Facebook(fbaccessToken); User user = facebook.getCurrentUser(); ......

java.lang.NullPointerException at java.util.Properties$LineReader.readLine(Properties.java:435) at java.util.Properties.load0(Properties.java:354) at java.util.Properties.load(Properties.java:342) at com.face4j.facebook.http.APICaller.getHttpClient(APICaller.java:56) at com.face4j.facebook.http.APICaller.getData(APICaller.java:115) at com.face4j.facebook.Facebook.pullData(Facebook.java:991) at com.face4j.facebook.Facebook.getUser(Facebook.java:87) at com.face4j.facebook.Facebook.getCurrentUser(Facebook.java:75)

But in the SECOND time the exception will not be thrown

nischal commented 12 years ago

Does it happen all the time? You mean every time you restart your server you get that exception?