我想让jenkins触发Sonar Runner的声纳分析,但我收到一条错误信息,我该怎么做,问题是什么,请帮助我,谢谢。 (我安装了jenkins,声纳和声纳跑步者)
错误明细; (来自詹金斯)
[workspace] $ "C:\Program Files (x86)\Jenkins\tools\Sonar_Runner\Sonar_Runner_2.0\bin\sonar- runner.bat" "-Dsonar.projectBaseDir=C:\Program Files (x86)\Jenkins\jobs\E-Power\workspace" - Dsonar.fxcop.assemblyDependencyDirectories=/bin/Debug -Dsonar.dotnet.version=4.0 - Dsources=C:/Users/eazakli/Desktop/sonar-runner-2.0/sonar-runner-2.0/test -Dsonar.language=cs - Dsonar.stylecop.mode=skip -Dsonar.gendarme.mode=skip -Dsonar.projectVersion=1.0 - Dsonar.gendarme.assemblies=build\DmgTech*.* -Dsonar.projectKey=EA:TESTEA -Dsonar.gallio.mode=skip - Dsonar.dotnet.4.0.sdk.directory=C:/WIndows/Microsoft.NET/Framework/v4.0.30319 "- Dsonar.fxcop.installDirectory=C:/Program Files/Microsoft FxCop 1.36" -Dsonar.projectName=E-POWER
C:\Program Files (x86)\Jenkins\tools\Sonar_Runner\Sonar_Runner_2.0
Runner configuration file: C:\Program Files (x86)\Jenkins\tools\Sonar_Runner\Sonar_Runner_2.0 \conf\sonar-runner.properties
Project configuration file: C:\Program Files (x86)\Jenkins\jobs\E-Power\workspace\sonar- project.properties
Runner version: 2.0
Java version: 1.6.0_35, vendor: Sun Microsystems Inc.
OS name: "Windows 7", version: "6.1", arch: "x86"
Default locale: "tr_TR", source code encoding: "windows-1254" (analysis is platform dependent)
Server: http://localhost:9000
Work directory: C:\Program Files (x86)\Jenkins\jobs\E-Power\workspace\.sonar
14:33:54.737 [main] WARN o.s.r.i.batch.SonarProjectBuilder - /!\ The 'sources' property is deprecated and is replaced by 'sonar.sources'. Don't forget to update your files.
14:33:56.420 WARN .c.p.DefaultDatabase - H2 database should be used for evaluation purpose only
14:33:56.421 INFO o.s.c.p.Database - Create JDBC datasource to url jdbc:h2:tcp://localhost/sonar
Total time: 8.119s
Final Memory: 2M/15M
Exception in thread "main" org.sonar.runner.RunnerException: org.picocontainer.PicoLifecycleException: PicoLifecycleException: method 'public org.sonar.core.persistence.MyBatis org.sonar.core.persistence.MyBatis.start()', instance 'org.sonar.core.persistence.MyBatis@1a4ded3, org.apache.ibatis.builder.BuilderException: Error resolving class . Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Integer'. Cause: java.lang.ClassNotFoundException: Cannot find class: Integer
at org.sonar.runner.Runner.delegateExecution(Runner.java:288)
at org.sonar.runner.Runner.execute(Runner.java:151)
at org.sonar.runner.Main.execute(Main.java:84)
at org.sonar.runner.Main.main(Main.java:56)
Caused by: org.picocontainer.PicoLifecycleException: PicoLifecycleException: method 'public org.sonar.core.persistence.MyBatis org.sonar.core.persistence.MyBatis.start()', instance 'org.sonar.core.persistence.MyBatis@1a4ded3, org.apache.ibatis.builder.BuilderException: Error resolving class . Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Integer'. Cause: java.lang.ClassNotFoundException: Cannot find class: Integer
at org.picocontainer.monitors.NullComponentMonitor.lifecycleInvocationFailed (NullComponentMonitor.java:77)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThrowReflectionLifecycleException (ReflectionLifecycleStrategy.java:132)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod (ReflectionLifecycleStrategy.java:115)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
at org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter (DefaultPicoContainer.java:1009)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1002)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:760)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:70)
at org.sonar.batch.bootstrap.Module.start(Module.java:82)
at org.sonar.batch.Batch.execute(Batch.java:104)
at org.sonar.runner.internal.batch.Launcher.executeBatch(Launcher.java:69)
at org.sonar.runner.internal.batch.Launcher.execute(Launcher.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.sonar.runner.Runner.delegateExecution(Runner.java:285)
... 3 more
Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class . Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Integer'. Cause: java.lang.ClassNotFoundException: Cannot find class: Integer
at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:94)
at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:83)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:128)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:121)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:111)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:88)
at org.sonar.core.persistence.MyBatis.loadMapper(MyBatis.java:177)
at org.sonar.core.persistence.MyBatis.loadMappers(MyBatis.java:154)
at org.sonar.core.persistence.MyBatis.start(MyBatis.java:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
... 21 more
Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Integer'. Cause: java.lang.ClassNotFoundException: Cannot find class: Integer
at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:109)
at org.apache.ibatis.builder.BaseBuilder.resolveAlias(BaseBuilder.java:115)
at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:92)
... 34 more
Caused by: java.lang.ClassNotFoundException: Cannot find class: Integer
at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:188)
at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:87)
at org.apache.ibatis.io.Resources.classForName(Resources.java:250)
at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:105)
... 36 more
Finished: SUCCESS
答案 0 :(得分:1)
以下错误往往表明Java环境的安装不正确:
java.lang.ClassNotFoundException: Cannot find class: Integer
你应该看看这个方向。
答案 1 :(得分:1)
以下 stack overflow thread与几乎相同的错误相关。
解决方案是将“添加Java附加参数添加到 conf / wrapper.conf ”,由@Erkut Evirgen提供
wrapper.java.additional.3=-Duser.language=en