My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 3229: I want to install gerrit on windows7, tomcat and mysql
1 person starred this issue and may be notified of changes. Back to list
Status:  AwaitingInformation
Owner:  ----


Sign in to add a comment
 
Reported by mkchan11...@gmail.com, Mar 5, 2015
I've installed gerrit on windows7, tomcat and mysql.

I think I've finished initialize gerrit and configure tomcat clearly but when I turn on tomcat, It still show me an error messages.

Error message is like below,

 Exception starting filter guiceFilter
com.google.inject.CreationException: Guice creation errors:

1) null returned by binding at com.google.gerrit.httpd.WebAppInitializer$3.configure(WebAppInitializer.java:241)
 but parameter 0 of com.google.gerrit.server.schema.ReviewDbDatabaseProvider.<init>() is not @Nullable
  while locating javax.sql.DataSource annotated with @com.google.inject.name.Named(value=ReviewDb)
    for parameter 0 at com.google.gerrit.server.schema.ReviewDbDatabaseProvider.<init>(ReviewDbDatabaseProvider.java:32)
  while locating com.google.gerrit.server.schema.ReviewDbDatabaseProvider
  at com.google.gerrit.server.schema.DatabaseModule.configure(DatabaseModule.java:31)
  while locating com.google.gwtorm.jdbc.Database<com.google.gerrit.reviewdb.server.ReviewDb>
  at com.google.gerrit.server.schema.DatabaseModule.configure(DatabaseModule.java:29)
  while locating com.google.gwtorm.server.SchemaFactory<com.google.gerrit.reviewdb.server.ReviewDb>

1 error
	at com.google.gerrit.httpd.WebAppInitializer.init(WebAppInitializer.java:156)
	at com.google.gerrit.httpd.WebAppInitializer.getInjector(WebAppInitializer.java:349)
	at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:47)
	at com.google.gerrit.httpd.WebAppInitializer.init(WebAppInitializer.java:356)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4830)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5510)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)


What should I do to resolve this error??
Mar 5, 2015
#1 mkchan11...@gmail.com
Additionally, can I get some materials for install gerrit on windows? I couldn't find any official guide or tutorial for install gerrit on windows.
Mar 5, 2015
Project Member #2 David.Os...@gmail.com
Can you share how you've registered the datasource?

Actually there was an attempt to provide installation instructions for your scenario, but this was never merged: [1].

[1] https://gerrit-review.googlesource.com/#/c/37072/12/Documentation/install-tomcat.txt
Status: AwaitingInformation
Mar 9, 2015
#3 mkchan11...@gmail.com
I mentioned about dataSource in context.xml at my tomcat server directory like below.

	<ResourceLink
		name="jdbc/ReviewDb"
		type="javax.sql.Datasource"
		driverClassName="com.mysql.jdbc.Driver"
		username="gerrit"
		password="gerrit"
		url="jdbc:mysql://localhost:3306/ReviewDb?autoReconnect=true"
		auth="Container"
	/>
and in conf/Catalina/localhost/gerrit.xml I wrote like below.
<?xml version="1.0" encoding="utf-8"?>  
<Context path="" docBase="C:/Users/SDS/Applications/CIServer/programs/gerrit/gerrit-2.9.4" />

docBase indicates where gerrit.war is located.

Can you notice me what should I do to fix my error??
	
Mar 9, 2015
Project Member #4 David.Os...@gmail.com
In the link i posted in my previous comment, the datasource is defined as:


<Context path="" docBase="C:\Program Files\gerrit\gerrit-X.X" debug="0"
             reloadable="false">
        <Resource
           name="jdbc/ReviewDb"
           type="javax.sql.DataSource"
           username="gerrit2"
           driverClassName="org.postgresql.Driver"
           password="secret"
           url="jdbc:postgresql://yourPsqlServer:5432/reviewdb"
        />
</Context>
Mar 9, 2015
#5 mkchan11...@gmail.com
I edited my config files and there isn't any errors when I run tomcat.
But I don't know how to run gerrit under tomcat. When I access gerrit url, browser show me just 404 error page.
I installed tomcat and gerrit following the guide you posted.
Can you help me about runnig gerrit?
Mar 10, 2015
Project Member #6 David.Os...@gmail.com
>Can you help me about runnig gerrit?

Copy gerrit.war to webapps directory in your tomcat installation. Start tomcat and access gerrit application under:

  http://localhost:8080/gerrit/

You can also copy gerrit.war to ROOT under tomcat's webapps directory. In this case you can access gerrit application under:

  http://localhost:8080/

Sign in to add a comment

Powered by Google Project Hosting