Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error os OSX: JmxUtils.java:[23,21] error: cannot find symbol #17

Open
raarts opened this issue Nov 28, 2017 · 8 comments
Open

Build error os OSX: JmxUtils.java:[23,21] error: cannot find symbol #17

raarts opened this issue Nov 28, 2017 · 8 comments

Comments

@raarts
Copy link

raarts commented Nov 28, 2017

Java amateur alert!

raarts$ mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building kafdrop 2.2.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kafdrop ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:copy-resources (prepare-dockerfile) @ kafdrop ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ kafdrop ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 11 resources
[INFO] Copying 13 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ kafdrop ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 37 source files to /Users/raarts/work/nv/rapi-elixir/Kafdrop/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/raarts/work/nv/rapi-elixir/Kafdrop/src/main/java/com/homeadvisor/kafdrop/util/JmxUtils.java:[23,21] error: cannot find symbol
[ERROR]  package sun.management
/Users/raarts/work/nv/rapi-elixir/Kafdrop/src/main/java/com/homeadvisor/kafdrop/util/JmxUtils.java:[36,46] error: cannot find symbol
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.757 s
[INFO] Finished at: 2017-11-28T14:31:00+01:00
[INFO] Final Memory: 27M/91M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project kafdrop: Compilation failure: Compilation failure:
[ERROR] /Users/raarts/work/nv/rapi-elixir/Kafdrop/src/main/java/com/homeadvisor/kafdrop/util/JmxUtils.java:[23,21] error: cannot find symbol
[ERROR]  package sun.management
[ERROR] /Users/raarts/work/nv/rapi-elixir/Kafdrop/src/main/java/com/homeadvisor/kafdrop/util/JmxUtils.java:[36,46] error: cannot find symbol
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
@dhayha
Copy link
Contributor

dhayha commented Nov 28, 2017

What version of Java are you using?

@raarts
Copy link
Author

raarts commented Nov 29, 2017

$ java --version
java 9.0.1
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

@cforce
Copy link

cforce commented Dec 21, 2018

java version "11.0.1" 2018-10-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)

@dhayha
Copy link
Contributor

dhayha commented Dec 21, 2018

The sun.management package has gone away with Java 9 and above. I haven't (yet) found an appropriate replacement to using he sun.management.Agent class to get the fully resolved JMX properties.

@satyajeetcmm
Copy link

Any update on this.

@Casa-Cloud
Copy link

Hello, Any update on this, I am getting the same error on my window 10 machine

JAVA version:-
java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) Client VM (build 25.161-b12, mixed mode)

Error:-
$ mvn clean package
...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project kafdrop: Compilation failure: Compilation failure:
[ERROR] \Users\AlokAdhao\Desktop\IBM\kafdrop\Kafdrop\src\main\java\com\homeadvisor\kafdrop\util\JmxUtils.java:[23,21] error: cannot find symbol
[ERROR] \Users\AlokAdhao\Desktop\IBM\kafdrop\Kafdrop\src\main\java\com\homeadvisor\kafdrop\util\JmxUtils.java:[36,46] error: cannot find symbol

@ekoutanov
Copy link

You won't be able to utilise sun.management unless you permit it explicitly using the --add-exports JVM option.
This is unlikely going to get fixed in Kafdrop 2.x, as there is no real development taking place. Consider updating to the next major version – Kafdrop 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants