无法启动gerrit服务

时间:2015-03-30 20:56:30

标签: gerrit

我正在使用github插件设置gerrit服务器。我无法使用以下命令启动服务:

sudo bin/gerrit.sh start

以下是生成的错误日志:

[2015-03-30 20:44:41,234] INFO     com.google.gerrit.server.cache.h2.H2CacheFactory : Enabling disk    cache /opt/gerrit/cache [2015-03-30 20:44:42,463] INFO     com.google.gerrit.server.config.ScheduleConfig : gc schedule    parameter "gc.interval" is not configured [2015-03-30 20:44:43,781]    WARN  com.google.gerrit.sshd.SshDaemon : Disabling cipher arcfour256:    invalid parameter passed to RC4 init -    org.bouncycastle.crypto.params.ParametersWithIV [2015-03-30    20:44:43,782] WARN  com.google.gerrit.sshd.SshDaemon : Disabling    cipher arcfour128: invalid parameter passed to RC4 init -    org.bouncycastle.crypto.params.ParametersWithIV [2015-03-30    20:44:43,816] WARN  com.google.gerrit.httpd.GitWebConfig : gitweb not    installed (no /usr/lib/cgi-bin/gitweb.cgi found) [2015-03-30    20:44:44,165] INFO  org.eclipse.jetty.util.log : Logging initialized    @7416ms [2015-03-30 20:44:44,721] INFO     com.google.gerrit.server.git.LocalDiskRepositoryManager : Defaulting    core.streamFileThreshold to 105m [2015-03-30 20:44:44,776] INFO     com.google.gerrit.server.plugins.PluginLoader : Loading plugins from    /opt/gerrit/plugins [2015-03-30 20:44:44,946] INFO     com.google.gerrit.server.plugins.PluginLoader : Loaded plugin    commit-message-length-validator, version v2.11-rc1 [2015-03-30    20:44:45,013] INFO  com.google.gerrit.server.plugins.PluginLoader :    Loaded plugin download-commands, version v2.11-rc1 [2015-03-30    20:44:45,495] INFO  com.google.gerrit.server.plugins.PluginLoader :    Loaded plugin github, version 2.12-SNAPSHOT [2015-03-30 20:44:45,659]    INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin    replication, version v2.11-rc1 [2015-03-30 20:44:45,709] INFO     com.google.gerrit.server.plugins.PluginLoader : Loaded plugin    reviewnotes, version v2.11-rc1 [2015-03-30 20:44:45,742] INFO     com.google.gerrit.server.plugins.PluginLoader : Loaded plugin    singleusergroup, version v2.11-rc1 [2015-03-30 20:44:46,114] INFO     com.google.gerrit.sshd.SshDaemon : Started Gerrit    SSHD-CORE-0.9.0-4-G5967CFD on *:29418 [2015-03-30 20:44:46,118] INFO     org.eclipse.jetty.server.Server : jetty-9.2.9.v20150224 [2015-03-30    20:44:46,701] WARN     org.eclipse.jetty.util.component.AbstractLifeCycle : FAILED    o.e.j.s.ServletContextHandler@36a1fd20{/,file:/root/.gerritcodereview/tmp/gerrit_5992762166866786573_app/gerrit_war/,STARTING}:    com.google.inject.ProvisionException: Unable to provision, see the    following errors:
       1) Error injecting constructor, java.lang.NoSuchFieldError: static_dir at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.<init>(VelocityStaticServlet.java:101)    at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.class(VelocityStaticServlet.java:47)    while locating    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet
       1 error com.google.inject.ProvisionException: Unable to provision, see the following errors:
       1) Error injecting constructor, java.lang.NoSuchFieldError: static_dir at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.<init>(VelocityStaticServlet.java:101)    at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.class(VelocityStaticServlet.java:47)    while locating    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet
       1 error  at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1018)
    at    com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1040)
    at    com.google.inject.servlet.ServletDefinition.init(ServletDefinition.java:110)
    at    com.google.inject.servlet.ManagedServletPipeline.init(ManagedServletPipeline.java:82)
    at    com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:103)
    at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:220)
    at    com.google.gerrit.httpd.plugins.HttpPluginServlet.load(HttpPluginServlet.java:187)
    at    com.google.gerrit.httpd.plugins.HttpPluginServlet.install(HttpPluginServlet.java:161)
    at    com.google.gerrit.httpd.plugins.HttpPluginServlet.init(HttpPluginServlet.java:141)
    at    com.google.inject.servlet.ServletDefinition.init(ServletDefinition.java:119)
    at    com.google.inject.servlet.ManagedServletPipeline.init(ManagedServletPipeline.java:82)
    at    
    at    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)     at    com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:166)
    at    com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:93)
    at    com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:50)
    at Main.main(Main.java:25) Caused by: java.lang.NoSuchFieldError:    static_dir     at    com.googlesource.gerrit.plugins.github.velocity.PluginVelocityRuntimeProvider.get(PluginVelocityRuntimeProvider.java:66)
    at    com.googlesource.gerrit.plugins.github.velocity.PluginVelocityRuntimeProvider.get(PluginVelocityRuntimeProvider.java:31)
    at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.<init>(VelocityStaticServlet.java:102)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native    Method)     at    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at    com.google.inject.internal.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:86)
    at    com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
    at    com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
    at    com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
    at    com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
    at    com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
    at    com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
    at com.google.inject.Scopes$1$1.get(Scopes.java:65)     at    com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
    at    com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
    at    com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1059)
    at    com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
    ... 41 more [2015-03-30 20:44:46,708] WARN     org.eclipse.jetty.util.component.AbstractLifeCycle : FAILED    org.eclipse.jetty.server.handler.RequestLogHandler@62cf86d6:    com.google.inject.ProvisionException: Unable to provision, see the    following errors:
       1) Error injecting constructor, java.lang.NoSuchFieldError: static_dir at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.<init>(VelocityStaticServlet.java:101)    at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.class(VelocityStaticServlet.java:47)    while locating    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet
       1 error com.google.inject.ProvisionException: Unable to provision, see the following errors:
       1) Error injecting constructor, java.lang.NoSuchFieldError: static_dir at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.<init>(VelocityStaticServlet.java:101)    at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.class(VelocityStaticServlet.java:47)    while locating    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet
       1 error  at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1018)
    at    com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1040)
    at    com.google.inject.servlet.ServletDefinition.init(ServletDefinition.java:110)
    at    com.google.inject.servlet.ManagedServletPipeline.init(ManagedServletPipeline.java:82)
    at    com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:103)
    at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:220)
    at    com.google.gerrit.httpd.plugins.HttpPluginServlet.load(HttpPluginServlet.java:187)
    at    com.google.gerrit.httpd.plugins.HttpPluginServlet.install(HttpPluginServlet.java:161)
    at    com.google.gerrit.httpd.plugins.HttpPluginServlet.init(HttpPluginServlet.java:141)
    at    com.google.inject.servlet.ServletDefinition.init(ServletDefinition.java:119)
    at    com.google.inject.servlet.ManagedServletPipeline.init(ManagedServletPipeline.java:82)
    at    com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:103)
    at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:220)
    at    org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:138)
    at    org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:852)
    at    org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)
    at    org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
    at    org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at    org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    at    org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    at    org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    at org.eclipse.jetty.server.Server.doStart(Server.java:354)     at    org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at    com.google.gerrit.pgm.http.jetty.JettyServer$Lifecycle.start(JettyServer.java:124)
    at    com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:74)
    at com.google.gerrit.pgm.Daemon.start(Daemon.java:292)  at    com.google.gerrit.pgm.Daemon.run(Daemon.java:204)     at    com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:64)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)     at    com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:166)
    at    com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:93)
    at    com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:50)
    at Main.main(Main.java:25) Caused by: java.lang.NoSuchFieldError:    static_dir     at    com.googlesource.gerrit.plugins.github.velocity.PluginVelocityRuntimeProvider.get(PluginVelocityRuntimeProvider.java:66)
    at    com.googlesource.gerrit.plugins.github.velocity.PluginVelocityRuntimeProvider.get(PluginVelocityRuntimeProvider.java:31)
    at    com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
    at    com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
    at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.<init>(VelocityStaticServlet.java:102)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native    Method)     at    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at    com.google.inject.internal.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:86)
    at    com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
    at    com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
    at    com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
    at    com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
    at    com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
    at    com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
    at com.google.inject.Scopes$1$1.get(Scopes.java:65)     at    com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
    at    com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
    at    com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1059)
    at    com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
    ... 41 more [2015-03-30 20:44:46,723] INFO     org.eclipse.jetty.server.ServerConnector : Started    ServerConnector@2ca132ad{HTTP/1.1}{0.0.0.0:8080} [2015-03-30    20:44:46,724] WARN     org.eclipse.jetty.util.component.AbstractLifeCycle : FAILED    org.eclipse.jetty.server.Server@1fba3fd6:    com.google.inject.ProvisionException: Unable to provision, see the    following errors:
       1) Error injecting constructor, java.lang.NoSuchFieldError: static_dir at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.<init>(VelocityStaticServlet.java:101)    at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.class(VelocityStaticServlet.java:47)    while locating    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet
       1 error com.google.inject.ProvisionException: Unable to provision, see the following errors:
       1) Error injecting constructor, java.lang.NoSuchFieldError: static_dir at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.<init>(VelocityStaticServlet.java:101)    at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.class(VelocityStaticServlet.java:47)    while locating    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet
       1 error  at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1018)
    at    com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1040)
    at    com.google.inject.servlet.ServletDefinition.init(ServletDefinition.java:110)
    at    com.google.inject.servlet.ManagedServletPipeline.init(ManagedServletPipeline.java:82)
    at    com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:103)
    at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:220)
    at    com.google.gerrit.httpd.plugins.HttpPluginServlet.load(HttpPluginServlet.java:187)
    at    com.google.gerrit.httpd.plugins.HttpPluginServlet.install(HttpPluginServlet.java:161)
    at    com.google.gerrit.httpd.plugins.HttpPluginServlet.init(HttpPluginServlet.java:141)
    at    com.google.inject.servlet.ServletDefinition.init(ServletDefinition.java:119)
    at    com.google.inject.servlet.ManagedServletPipeline.init(ManagedServletPipeline.java:82)
    at    com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:103)
    at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:220)
    at    org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:138)
    at    org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:852)
    at    org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)
    at    org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
    at    org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at    org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    at    org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    at    org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    at    org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:140)
    at    org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at    org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    at org.eclipse.jetty.server.Server.start(Server.java:387)   at    org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    at    org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    at org.eclipse.jetty.server.Server.doStart(Server.java:354)     at    org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at    com.google.gerrit.pgm.http.jetty.JettyServer$Lifecycle.start(JettyServer.java:124)
    at    com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:74)
    at com.google.gerrit.pgm.Daemon.start(Daemon.java:292)  at    com.google.gerrit.pgm.Daemon.run(Daemon.java:204)     at    com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:64)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)     at    com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:166)
    at    com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:93)
    at    com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:50)
    at Main.main(Main.java:25) Caused by: java.lang.NoSuchFieldError:    static_dir     at    com.googlesource.gerrit.plugins.github.velocity.PluginVelocityRuntimeProvider.get(PluginVelocityRuntimeProvider.java:66)
    at    com.googlesource.gerrit.plugins.github.velocity.PluginVelocityRuntimeProvider.get(PluginVelocityRuntimeProvider.java:31)
    at    com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
    at    com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:73)
    at    com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:66)
    at    com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:63)
    at    com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
    at    com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
    at    com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
    at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.<init>(VelocityStaticServlet.java:102)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native    Method)     at    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at    com.google.inject.internal.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:86)
    at    com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
    at    com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
    at    com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
    at    com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
    at    com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
    at    com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
    at com.google.inject.Scopes$1$1.get(Scopes.java:65)     at    com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
    at    com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
    at    com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1059)
    at    com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
    ... 41 more [2015-03-30 20:44:46,727] ERROR    com.google.gerrit.pgm.Daemon : Unable to start daemon    java.lang.IllegalStateException: Cannot start HTTP daemon   at    com.google.gerrit.pgm.http.jetty.JettyServer$Lifecycle.start(JettyServer.java:138)
    at    com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:74)
    at com.google.gerrit.pgm.Daemon.start(Daemon.java:292)  at    com.google.gerrit.pgm.Daemon.run(Daemon.java:204)     at    com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:64)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)     at    com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:166)
    at    com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:93)
    at    com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:50)
    at Main.main(Main.java:25) Caused by:    com.google.inject.ProvisionException: Unable to provision, see the    following errors:
       1) Error injecting constructor, java.lang.NoSuchFieldError: static_dir at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.<init>(VelocityStaticServlet.java:101)    at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.class(VelocityStaticServlet.java:47)    while locating    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet
       1 error  at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1018)
    at    com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1040)
    at    com.google.inject.servlet.ServletDefinition.init(ServletDefinition.java:110)
    at    com.google.inject.servlet.ManagedServletPipeline.init(ManagedServletPipeline.java:82)
    at    com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:103)
    at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:220)
    at    com.google.gerrit.httpd.plugins.HttpPluginServlet.load(HttpPluginServlet.java:187)
    at    com.google.gerrit.httpd.plugins.HttpPluginServlet.install(HttpPluginServlet.java:161)
    at    com.google.gerrit.httpd.plugins.HttpPluginServlet.init(HttpPluginServlet.java:141)
    at    com.google.inject.servlet.ServletDefinition.init(ServletDefinition.java:119)
    at    com.google.inject.servlet.ManagedServletPipeline.init(ManagedServletPipeline.java:82)
    at    com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:103)
    at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:220)
    at    org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:138)
    at    org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:852)
    at    org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)
    at    org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
    at    org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at    org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    at    org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    at    org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    at    org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:140)
    at    org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at    org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    at org.eclipse.jetty.server.Server.start(Server.java:387)   at    org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    at    org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    at org.eclipse.jetty.server.Server.doStart(Server.java:354)     at    org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at    com.google.gerrit.pgm.http.jetty.JettyServer$Lifecycle.start(JettyServer.java:124)
    ... 12 more Caused by: java.lang.NoSuchFieldError: static_dir   at    com.googlesource.gerrit.plugins.github.velocity.PluginVelocityRuntimeProvider.get(PluginVelocityRuntimeProvider.java:66)
    at    com.googlesource.gerrit.plugins.github.velocity.PluginVelocityRuntimeProvider.get(PluginVelocityRuntimeProvider.java:31)
    at    com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
    at    com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:73)
    at    com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:66)
    at    com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:63)
    at    com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
    at    com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
    at    com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
    at    com.googlesource.gerrit.plugins.github.velocity.VelocityStaticServlet.<init>(VelocityStaticServlet.java:102)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native    Method)     at    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at    com.google.inject.internal.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:86)
    at    com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
    at    com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
    at    com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
    at    com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
    at    com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
    at    com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
    at com.google.inject.Scopes$1$1.get(Scopes.java:65)     at    com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
    at    com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
    at    com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1059)
    at    com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
    ... 41 more

这是我的gerrit.config文件:

[gerrit]
    basePath = git
    canonicalWebUrl = http://euca-10-5-5-106.cirrus.cloud.cablelabs.com:8080/
[database]
    type = mysql
    hostname = localhost
    database = reviewdb
    username = gerrit
[index]
    type = LUCENE
    url = localhost:9983
[auth]
    type = HTTP
    httpHeader = GITHUB_USER
    logoutUrl = /oauth/reset
    httpExternalIdHeader = GITHUB_OAUTH_TOKEN
    loginUrl = /login
    loginText = Sign-in with GitHub
    registerPageUrl = "/#/register"
[sendemail]
    smtpServer = smtp.cablelabs.com
    smtpUser = gerrit-cablecloud@cablelabs.com
[container]
    user = root
    javaHome = /usr/java/jdk1.8.0_40/jre
[sshd]
    listenAddress = *:29418
[httpd]
    listenUrl = http://*:8080/
    filterClass = com.googlesource.gerrit.plugins.github.oauth.OAuthFilter
[cache]
    directory = cache
[github]
    url = https://github.com
    apiUrl = https://api.github.com
    clientId = de4255b13eedfe31c5c3

如果您需要有关环境的任何其他信息,请与我们联系。

0 个答案:

没有答案