在执行第三个命令时,SonarScanner执行过程中出错
- dotnet begin/k:";项目密钥">
- dotnet构建
- dotnet端
以下是异常的屏幕截图:
错误:SonarScan执行过程中出错信息:------------------------------------------------------------------------java.lang.ExceptionInInitializerError在com.sonar.sslr.api.typed.ActionParser.(ActionParser.java:59)网址:org.sonar.javascript.parser.JavaScriptParser。(JavaScriptParser.java:33)enter code here
网址:org.sonar.javascript.parser.JavaScriptParserBuilder.createParser(JavaScriptParser Builder.java:31)网址:org.sonar.plugins.javascript.JavaScriptSensor。(JavaScriptSensor.java:136)网址:org.sonar.plugins.javascript.JavaScriptSensor。(JavaScriptSensor.java:100)位于java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)位于java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:78)位于java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessor Impl.java:45)位于java.base/java.lang.reflect.CConstructor.newInstanceWithCaller(Constructor.java:499)位于java.base/java.lang.reflect.CConstructor.newInstance(Constructor.java:480)网址:org.picoccontainer.injectors.AbstractInjector.newInstance(AbstractInjecter.java:145)网址:org.picoccontainer.injectors.ConstrutorInjector$1.run(ConstructorInjector.java:342)网址:org.picocContainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.obstractinjector.java:270网址:org.picoccontainer.injectors.ConstrutorInjector.getComponentInstance(ConstructorInjector.java:364)位于org.picocContainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjection Factory.java:56)网址:org.picoccontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)网址:org.picoccontainer.behaviors.Stored.getComponentInstance(Stored.java:91)网址:org.picocContainer.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:606)网址:org.picocContainer.DefaultPicoContainer.getComponents(DefaultPicoContainer.java:587)网址:org.sonar.core.platform.ComponentContainer.getComponentsByType(ComponentContainer.java:290)网址:org.sonar.scanner.bbootstrap.AbstractExtensionDictionnary.completeScannerExtensions(AbstractExtensionsDictionnari.java:82)网址:org.sonar.scanner.bbootstrap.AbstractExtensionDictionary.getExtensions(AbstractExtensionsDictionary.java:77)网址:org.sonar.scanner.bbootstrap.AbstractExtensionDictionary.getFilteredExtensions(AbstractExtensionsDictionary.java:67)网址:org.sonar.scanner.sensor.ModuleSensorExtensionDictionary.selectSensors(ModuleSensor ExtensionDictionnary.java:40)网址:org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$0(ModuleSensersExecutor.java:52)网址:org.sonar.scanner.sensor.ModuleSensorsExecutiutor.withModuleStrategy(ModuleSensersExecutiutor.java:77)网址:org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensersExecutor.java:52)网址:org.sonar.scanner.scan.ModueScanContainer.doAfterStart(ModuleScanContainer.java:82)网址:org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)网址:org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)网址:org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:400)网址:org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:395)网址:org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:392)网址:org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:358)网址:org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)网址:org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)网址:org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)网址:org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)网址:org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)网址:org.sonar.batch.bootstrapper.batch.doExecute(batch.java:73)网址:org.sonar.batch.bootstrapper.batch.execute(batch.java:67)网址:org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)位于java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)位于java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)位于java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于java.base/java.lang.reflect.Method.ioke(Method.java:567)网址:org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)位于jdk.proxy1/jdk.proxy1.$Proxy0.execute(未知源)网址:org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)网址:org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)网址:org.sonarsource.scanner.cli.Main.execute(Main.java:112)网址:org.sonarsource.scanner.cli.Main.execute(Main.java:75)网址:org.sonarsource.scanner.cli.Main.Main(Main.java:61)由:net.sf.cglib.core.CodeGenerationException引起:java.lang.reflect.InaccessableObjectException-->无法使受保护的最终java.lang.Class java.lang.CClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)throws java.lang.CassFormatError可访问:模块java.base不"打开java.lang";至未命名模块@1bf39d06位于net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:464)位于net.sf.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:336)位于net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:93)位于net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:91)位于net.sf.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)位于java.base/java.util.concurrent.FFutureTask.run(FutureTask.java:264)位于net.sf.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61)位于net.sf.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)位于net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116)位于net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:291)位于net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:221)位于net.sf.cglib.core.KeyFactory.create(KeyFactory.java:174)位于net.sf.cglib.core.KeyFactory.create(KeyFactory.java:153)位于net.sf.cglib.proxy.Enhancer.(Enhancer.java:73)…还有53由以下原因引起:java.lang.reflect.InaccessableObjectException:无法使受保护的最终java.lang.Class java.lang.CClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)抛出java.lang.CclassFormatError可访问:模块java.base不"打开java.lang";至未命名模块@1bf39d06位于java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)位于java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)位于java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)位于java.base/java.lang.reflect.Method.setAccessible(Method.java:193)位于net.sf.cglib.core.ReflectUtils$1.run(ReflectUtils.java:61)位于java.base/java.security.AccessController.doPrivileged(AccessController.java:554)位于net.sf.cglib.core.ReflectUtils。(ReflectUtils.java:52)位于net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:243)位于net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)位于net.sf.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:329)…还有65错误:声纳扫描器未成功完成18:19:06.186后期处理失败。退出代码:1
声纳扫描器异常屏幕截图
我遇到了同样的问题,并通过恢复到openjdk 15.0.2(16.0是今天的最新版本,似乎造成了这个问题,我使用https://community.chocolatey.org/packages/openjdk#versionhistory)