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

Cannot resolve method 'ofVirtual' in 'Thread' #137

Open
Sartner opened this issue Dec 26, 2023 · 1 comment
Open

Cannot resolve method 'ofVirtual' in 'Thread' #137

Sartner opened this issue Dec 26, 2023 · 1 comment

Comments

@Sartner
Copy link

Sartner commented Dec 26, 2023

CleanShot 2023-12-26 at 21 50 41
From demo/fiber/mysql_sync_stress_demo

I can found 'Thread.ofVirtual()' method in project src, but can't found in Kona-8 installed with sdkman.

OS Version: mac m1 14.1.2

Kona Version: installed by sdkman
openjdk version "1.8.0_392"
OpenJDK Runtime Environment (Tencent Kona 8.0.16) (build 1.8.0_392-b1)
OpenJDK 64-Bit Server VM (Tencent Kona 8.0.16) (build 25.392-b1, mixed mode)

❯ sdk use java 8.0.392-kona
❯ java -version
openjdk version "1.8.0_392"
OpenJDK Runtime Environment (Tencent Kona 8.0.16) (build 1.8.0_392-b1)
OpenJDK 64-Bit Server VM (Tencent Kona 8.0.16) (build 25.392-b1, mixed mode)
❯ cd ~/Downloads/TencentKona-8-KonaFiber/demo/fiber/mysql_sync_stress_demo
❯ mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< org.example:mysql-demo >-----------------------
[INFO] Building mysql-demo 1.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ mysql-demo ---
[INFO] skip non existing resourceDirectory /Users/Sartner/Downloads/TencentKona-8-KonaFiber/demo/fiber/mysql_sync_stress_demo/src/main/resource
[INFO]
[INFO] --- compiler:3.11.0:compile (default-compile) @ mysql-demo ---
[INFO] Changes detected - recompiling the module! :source
[INFO] Compiling 3 source files with javac [debug target 1.8] to target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/Sartner/Downloads/TencentKona-8-KonaFiber/demo/fiber/mysql_sync_stress_demo/src/main/java/SyncDatabaseDemo.java:[191,29] 找不到符号
  符号:   方法 ofVirtual()
  位置: 类 java.lang.Thread
[ERROR] /Users/Sartner/Downloads/TencentKona-8-KonaFiber/demo/fiber/mysql_sync_stress_demo/src/main/java/SyncDatabaseDemo.java:[193,29] 找不到符号
  符号:   方法 ofPlatform()
  位置: 类 java.lang.Thread
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.740 s
[INFO] Finished at: 2023-12-26T21:57:54+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project mysql-demo: Compilation failure: Compilation failure:
[ERROR] /Users/Sartner/Downloads/TencentKona-8-KonaFiber/demo/fiber/mysql_sync_stress_demo/src/main/java/SyncDatabaseDemo.java:[191,29] 找不到符号
[ERROR]   符号:   方法 ofVirtual()
[ERROR]   位置: 类 java.lang.Thread
[ERROR] /Users/Sartner/Downloads/TencentKona-8-KonaFiber/demo/fiber/mysql_sync_stress_demo/src/main/java/SyncDatabaseDemo.java:[193,29] 找不到符号
[ERROR]   符号:   方法 ofPlatform()
[ERROR]   位置: 类 java.lang.Thread
[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
❯ mvn compile -Duser.language=en
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< org.example:mysql-demo >-----------------------
[INFO] Building mysql-demo 1.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ mysql-demo ---
[INFO] skip non existing resourceDirectory /Users/Sartner/Downloads/TencentKona-8-KonaFiber/demo/fiber/mysql_sync_stress_demo/src/main/resource
[INFO]
[INFO] --- compiler:3.11.0:compile (default-compile) @ mysql-demo ---
[INFO] Changes detected - recompiling the module! :source
[INFO] Compiling 3 source files with javac [debug target 1.8] to target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/Sartner/Downloads/TencentKona-8-KonaFiber/demo/fiber/mysql_sync_stress_demo/src/main/java/SyncDatabaseDemo.java:[191,29] 找不到符号
  符号:   方法 ofVirtual()
  位置: 类 java.lang.Thread
[ERROR] /Users/Sartner/Downloads/TencentKona-8-KonaFiber/demo/fiber/mysql_sync_stress_demo/src/main/java/SyncDatabaseDemo.java:[193,29] 找不到符号
  符号:   方法 ofPlatform()
  位置: 类 java.lang.Thread
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.594 s
[INFO] Finished at: 2023-12-26T21:58:25+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project mysql-demo: Compilation failure: Compilation failure:
[ERROR] /Users/Sartner/Downloads/TencentKona-8-KonaFiber/demo/fiber/mysql_sync_stress_demo/src/main/java/SyncDatabaseDemo.java:[191,29] 找不到符号
[ERROR]   符号:   方法 ofVirtual()
[ERROR]   位置: 类 java.lang.Thread
[ERROR] /Users/Sartner/Downloads/TencentKona-8-KonaFiber/demo/fiber/mysql_sync_stress_demo/src/main/java/SyncDatabaseDemo.java:[193,29] 找不到符号
[ERROR]   符号:   方法 ofPlatform()
[ERROR]   位置: 类 java.lang.Thread
[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
@johnshajiang
Copy link
Collaborator

SDKMAN doesn't care Kona JDK Fiber releases.
You need to download them by manual, e.g.
https://github.com/Tencent/TencentKona-8/releases/tag/Fiber-8.0.13-GA

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

2 participants