netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Tomcat source files, opened from Tomcat server source folder, are littered with “cannot find symbol” error

Open stevaber opened this issue 1 year ago • 0 comments

Apache NetBeans version

Apache NetBeans 21

What happened

I registered Tomcat 9 server into NetBeans 21. I added source folder during server registration. Source folder is "java" folder extracted from Tomcat source code distributions zip file. I create Ant based web project with JSF 2.2 library (javax.faces-2.2.20.jar). In debugger I can open java source files through call stack , also I can open java source files through Libraries folder in NetBeans Project window. In debugger brake point and steps through the code are synchronized with Tomcat source files, meaning that debugger finds rights source files. The problem is that all the class references in those Tomcat source files which refers to symbols(class’s) from other Tomcat files in same source folder reports with “cannot find symbol”. Also, which is more annoying, shortcut “go to source” does not work for every class reference in the same Tomcat source folder.

NetBaans source bug

Tomcat registration

Language / Project Type / NetBeans Component

Java Ant Web project

How to reproduce

Install NetBeans from file “Apache-NetBeans-21-bin-windows-x64.exe”. Extract Tomcat 9 server from “apache-tomcat-9.0.86.zip” into windows user root folder e.g. “C:\Users\Stevan\apache-tomcat-9.0.86”. Extract “java” folder from “apache-tomcat-9.0.86-src.zip” into Tomcat server folder e.g. “C:\Users\Stevan\apache-tomcat-9.0.86\java”. Register Tomcat 9 web server into NetBeans with adding source folder e.g. “C:\Users\Stevan\apache-tomcat-9.0.86\java”.

Did this work correctly in an earlier version?

Apache NetBeans 20

Operating System

Windows 10 Pro, AMD 64, 32GB ram, 22H2 os build 19045.4170

JDK

jdk-17_windows-x64_bin Java HotSpot(TM) 64-Bit Server VM (build 17.0.9+11-LTS-201, mixed mode, sharing)

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

Problem occurs immidiately

Are you willing to submit a pull request?

No

stevaber avatar Mar 30 '24 09:03 stevaber