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.
Created attachment 151823 [details] messages.log It appears the IDE cache or whatever relevant data gets corrupted with a maven project that compiles fine. In this case (I had others with the same project and other projects), the declared junit test dependency is ignored: red hint on import statement: "package org.junit does not exist" There are errors in the log file: INFO [org.netbeans.api.java.source.ElementHandle]: Resolved type is null for kind = CLASS INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=junit.framework.Assert ] INFO [org.netbeans.api.java.source.ElementHandle]: Resolved type is null for kind = CLASS INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=org.junit.Assert ] INFO [org.netbeans.api.java.source.ElementHandle]: Resolved type is null for kind = CLASS INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=junit.framework.TestCase ] INFO [org.netbeans.api.java.source.ElementHandle]: Resolved type is null for kind = CLASS INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=junit.framework.Assert ] INFO [org.netbeans.api.java.source.ElementHandle]: Resolved type is null for kind = CLASS INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=org.junit.Assert ] INFO [org.netbeans.api.java.source.ElementHandle]: Resolved type is null for kind = CLASS INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=junit.framework.TestCase ] INFO [org.netbeans.modules.java.editor.imports.ComputeImports]: Cannot resolve type element "ElementHandle[kind=INTERFACE; sigs=junit.framework.Test ]". INFO [org.netbeans.modules.java.editor.imports.ComputeImports]: Cannot resolve type element "ElementHandle[kind=ANNOTATION_TYPE; sigs=org.junit.Test ]". INFO [org.netbeans.modules.java.editor.imports.ComputeImports]: Cannot resolve type element "ElementHandle[kind=ANNOTATION_TYPE; sigs=org.junit.BeforeClass ]". INFO [org.netbeans.api.java.source.ElementHandle]: Resolved type is null for kind = CLASS INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=junit.framework.Assert ] INFO [org.netbeans.api.java.source.ElementHandle]: Resolved type is null for kind = CLASS Prior to this, I had a network connection problem and the build failed because of it, but that was resolved. I would expect that the IDE can recover from this, or that I could use an action to initiate recovery. I tried menu action "Reload POM", "Clean and build". I closed and re-opened the project. No improvement. I am fairly confident that I can fix this by closing NetBeans and deleting the NetBeans cache, but NetBeans engineers have previously advised that this would be too radical an action and I agree, because it takes too long for the IDE to get back into a responsive state. I have seen it re-loading maven indexes from the web and so on, where it took an hour until the IDE became responsive again. I am very frustrated about this as I have seen this issue for years.
Please can you try it with dev build. In the dev build the Navigator has a view Classpath containing the file classpath. Can you paste the classpath in the issue. Thanks
any updates on this?