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 122650

Summary: Spurious "Cannot find symbol" errors and no method completion within the editor
Product: java Reporter: jsight <jsight>
Component: SourceAssignee: Tomas Zezula <tzezula>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Project that contains the problem... the problem lines are in the "Main" class

Description jsight 2007-11-23 16:20:23 UTC
I have the following code in my class:
CalendarService calService = new CalendarService("GCalNotificationJavaClient");
        calService.setUserCredentials("jesse.sightler@gmail.com", "reig35");
        
        // Send the request and print the response
        URL feedUrl = new URL("http://www.google.com/calendar/feeds/default/allcalendars/full");
        CalendarFeed resultFeed = calService.getFeed(feedUrl, CalendarFeed.class);
        System.out.println("Your calendars:");
        System.out.println();
        for (int i = 0; i < resultFeed.getEntries().size(); i++) {
          CalendarEntry entry = resultFeed.getEntries().get(i);
          System.out.println("\t" + entry.getTitle().getPlainText());
        }


The code compiles fine, and the imports are all there, however, the editor shows "Cannot find symbol" errors on all 
method calls for the various calendar classes.  This is using the 1.15 calendar apis from google.

The two jars being brought in are:
gdata-calendar-1.0.jar
gdata-client-1.0.jar
Comment 1 jsight 2007-11-23 16:21:41 UTC
Created attachment 53413 [details]
Project that contains the problem... the problem lines are in the "Main" class
Comment 2 Jan Lahoda 2007-11-23 17:19:42 UTC
The problem seems to be that the gdata-core-1.0.jar is not on the editor's classpath (it was not explicitly added in the
library). The gdata-core-1.0.jar is specified in Class-Path: element of manifests of the other two jars (that were
explicitly added on the CP), so classes from gdata-core-1.0.jar can be resolved during runtime. Can be simply
workarounded by adding gdata-core-1.0.jar to the library.
Comment 3 jsight 2007-11-23 18:05:30 UTC
Ok, that makes sense.  I guess libraries should scan the manifest and pull these in as well?

In any casae, the workaround works fine.
Comment 4 Tomas Zezula 2007-11-26 16:13:23 UTC

*** This issue has been marked as a duplicate of 105927 ***