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.

Bug 131100

Summary: [saas][flickr] NPE while running javaclient
Product: webservices Reporter: Lukas Jungmann <jungi>
Component: ManagerAssignee: Peter Liu <petertliu>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Lukas Jungmann 2008-03-25 22:18:29 UTC
-drop flickr (groups_groupinfo) into java main class
-run project

=> results in NPE

problem is that the generated code is looking for a key in flicker.properties but there is
flickrphotoserviceauthenticator.properties instead...
Comment 1 Lukas Jungmann 2008-03-25 22:32:00 UTC
hmmm, even when I correct the name of the properties file and use correct API key, then I get following at the end:

Mar 25, 2008 10:29:32 PM org.netbeans.saas.flickr.FlickrPhotoServiceAuthenticator login
SEVERE: null
java.lang.StringIndexOutOfBoundsException: String index out of range: -6
        at java.lang.String.substring(String.java:1938)
        at org.netbeans.saas.flickr.FlickrPhotoServiceAuthenticator.getFrob(FlickrPhotoServiceAuthenticator.java:113)
        at org.netbeans.saas.flickr.FlickrPhotoServiceAuthenticator.login(FlickrPhotoServiceAuthenticator.java:60)
        at org.netbeans.saas.flickr.FlickrPhotoService.groupsGetInfo(FlickrPhotoService.java:39)
        at javaapplication1.Main.main(Main.java:28)
The SaasService returned: org.netbeans.saas.RestResponse@1ad77a7
BUILD SUCCESSFUL (total time: 1 second)


or IE:

Mar 25, 2008 10:31:17 PM org.netbeans.saas.flickr.FlickrPhotoServiceAuthenticator login
SEVERE: null
java.lang.StringIndexOutOfBoundsException: String index out of range: -6
        at java.lang.String.substring(String.java:1938)
        at org.netbeans.saas.flickr.FlickrPhotoServiceAuthenticator.getFrob(FlickrPhotoServiceAuthenticator.java:113)
        at org.netbeans.saas.flickr.FlickrPhotoServiceAuthenticator.login(FlickrPhotoServiceAuthenticator.java:60)
        at org.netbeans.saas.flickr.FlickrPhotoService.groupsGetInfo(FlickrPhotoService.java:39)
        at javaapplication1.Main.main(Main.java:28)
The SaasService returned: OK
BUILD SUCCESSFUL (total time: 1 second)
Comment 2 Lukas Jungmann 2008-03-25 22:39:54 UTC
btw: any specific reason for having
 System.out.println("The SaasService returned: "+result);

for flickr service and for google's geocode following:

 System.out.println("The SaasService returned: "+result.getDataAsString());
instead?
Comment 3 Peter Liu 2008-03-25 23:22:15 UTC
Lukas, do you have the latest build? I checked in the flickr changes around noon (PST) today so the issue you reported
should have all these issues fixed.
Comment 4 Peter Liu 2008-03-25 23:23:42 UTC
Here is the hg push that made this work:

http://hg.netbeans.org/main/rev/6fe67990298d
Comment 5 Lukas Jungmann 2008-03-25 23:28:08 UTC
there has not been any successful build on deadlock for more than 5hours, I'll switch to my own one and will see...
Comment 6 Lukas Jungmann 2008-03-26 01:05:24 UTC
yup, you're right, this is fixed in the latest build