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 50983 - "Invalid package declaration" shown for valid packages
Summary: "Invalid package declaration" shown for valid packages
Status: CLOSED INVALID
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-29 19:02 UTC by jskubick
Modified: 2006-03-24 09:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jskubick 2004-10-29 19:02:58 UTC
(Build 200410181322, installed by unzipping daily
build core files over existing nb4b2 directory,
launching ide, killing ide when it hangs,
relaunching, then installing all the associated
.nbm files and restarting).

A new "class library" project "foo" is created,
and the newly-created project directory
("c:\projects\foo") is imported into a CVS
repository's "projects" project as the subproject
"foo" (currently, the only subproject of the
'projects' project) .

Versioning manager is used to check out the
newly-imported 'foo' project into
c:\cvs\projects\foo (c:\cvs is the cvs work dir,
projects\foo is the project).

Netbeans is told to open a new project:
c:\cvs\projects\foo

in theory, so far so good.

The directory c:\cvs\projects\foo\src\org\foo is
created, and a bunch of class sourcefiles whose
package is org.foo are copied into it.

Netbeans is told to clean and build main project.

As expected, compilation fails because the log4j
jarfile isn't found. It's added to the compile
path, and another attempt is made to clean and
build the main project.

Building apparently succeeds (the "uncompiled"
icon vanishes from the file tree next to the
classfiles), but pointing at them produces the
error message "Invalid package declaration: org.foo".

Leave Netbeans sitting alone for an hour and go to
lunch, just in case the synchronization thread is
way behind.

Return from lunch, and note that Netbeans still
thinks the package declaration is invalid.

Create a new java class ("FooClass.java") in the
same directory using Netbeans. Note that it has no
package declared.

Note that pointing at FooClass doesn't produce an
"invalid package declaration" error, even though
every other file does. 

Attempt to clean and rebuild. All of the files
compile fine EXCEPT FooClass.

Confirm that the IDE still thinks that the classes
it technically just compiled have invalid package
declarations, and the one file it couldn't compile
 has a valid one.
Comment 1 jskubick 2004-10-29 19:17:22 UTC
uninstalled daily build of 4.0 and reinstalled 4.0b2 to see whether
it's just an issue with the daily build.

The problem doesn't seem to exist in 4.0b2 (build 200409220845).

Thus, it was apparently introduced sometime between 200409220845 and
200410181322.
Comment 2 Jesse Glick 2004-10-29 19:46:59 UTC
Never install a build on top of another build; arbitrary problems
could result from there being stale files left around. Unpack to a
clean directory.

If you can still reproduce this problem in a *clean* installation of a
NB dev build, please reopen with steps to reproduce from scratch and
we will take a look.
Comment 3 Marian Mirilovic 2005-07-12 10:08:02 UTC
closed