windows 2012 上的 sonarqube,发生了非法的反射访问操作

sonarqube on windows 2012, An illegal reflective access operation has occurred

我在 windows 2012 年 运行 sonarqube 没有 SQL 数据库,但我收到此错误:

SonarQube installed.
--> Wrapper Started as Console
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
2018.08.21 16:01:49 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Users\teamcityuser\Desktop\sonarqube\sonarqube-7.3\temp
2018.08.21 16:01:49 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2018.08.21 16:01:49 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from 
[C:\Users\teamcityuser\Desktop\sonarqube\sonarqube-7.3\elasticsearch]: 
C:\Program Files\Java\jre-10.0.2\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -Xms512m -Xmx512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\Users\teamcityuser\Desktop\sonarqube\sonarqube-7.3\elasticsearch -cp lib/* org.elasticsearch.bootstrap.Elasticsearch -Epath.conf=C:\Users\teamcityuser\Desktop\sonarqube\sonarqube-7.3\temp\conf\es
2018.08.21 16:01:49 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2018.08.21 16:01:49 INFO  app[][o.e.p.PluginsService] no modules loaded
2018.08.21 16:01:49 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/C:/Users/teamcityuser/Desktop/sonarqube/sonarqube-7.3/lib/common/netty-common-4.1.13.Final.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2018.08.21 16:01:58 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2018.08.21 16:01:58 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [C:\Users\teamcityuser\Desktop\sonarqube\sonarqube-7.3]: C:\Program Files\Java\jre-10.0.2\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\Users\teamcityuser\Desktop\sonarqube\sonarqube-7.3\temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*;C:\Users\teamcityuser\Desktop\sonarqube\sonarqube-7.3\lib\jdbc\h2\h2-1.3.176.jar org.sonar.server.app.WebServer C:\Users\teamcityuser\Desktop\sonarqube\sonarqube-7.3\temp\sq-process1965346097759412139properties
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/C:/Users/teamcityuser/Desktop/sonarqube/sonarqube-7.3/lib/common/netty-common-4.1.13.Final.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2018.08.21 16:02:36 INFO  app[][o.s.a.SchedulerImpl] Process[web] is up
2018.08.21 16:02:36 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='ce', ipcIndex=3, logFilenamePrefix=ce]] from [C:\Users\teamcityuser\Desktop\sonarqube\sonarqube-7.3]: C:\Program Files\Java\jre-10.0.2\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\Users\teamcityuser\Desktop\sonarqube\sonarqube-7.3\temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*;C:\Users\teamcityuser\Desktop\sonarqube\sonarqube-7.3\lib\jdbc\h2\h2-1.3.176.jar org.sonar.ce.app.CeServer C:\Users\teamcityuser\Desktop\sonarqube\sonarqube-7.3\temp\sq-process9239565289637734744properties
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/C:/Users/teamcityuser/Desktop/sonarqube/sonarqube-7.3/lib/common/netty-common-4.1.13.Final.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2018.08.21 16:02:42 INFO  app[][o.s.a.SchedulerImpl] Process[ce] is up
2018.08.21 16:02:42 INFO  app[][o.s.a.SchedulerImpl] SonarQube is up

这只是一个警告。你看到它是因为你使用 Java 9 或更高版本,它引入了模块的概念。该概念还提供了将访问事件限制为注释为 public 的方法的可能性。 在您的情况下,您使用 Java 9 或更高版本的 SonarQube 版本不支持 Java 模块。 您的 SonarQube 版本使用反射来访问 java.nio.DirectByteBuffer,它是内部 JVM class,其他模块不能直接访问。 但是由于 Java 模块引入导致的这种访问限制是一个很大的变化 Java 9 仅在非法反射访问的情况下显示警告。 因此,如果 SonarQube 在您的情况下工作正常,您可以继续工作,但升级到下一个 Java 版本可能会破坏它。 如果您不希望这些警告出现在日志中,您可以尝试将 SonarQube 版本升级到与 Java 9 兼容的版本或更高版本。