davideuler / gitblit

Automatically exported from code.google.com/p/gitblit
Apache License 2.0
0 stars 0 forks source link

authority.cmd missing, launching it manually fails #467

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Changed the base folder setting in WEB-INF\web.xml (see further)
2. According to http://gitblit.com/setup_go.html step 3 there should be a 
authority.cmd somewhere in the distribution, but there is not.
3. So I ran "java -cp gitblit.jar com.gitblit.authority.Launcher" instead. 
Turns out by trial & error it needs a much larger classpath. Assuming working 
dir is WEB-INF\lib it should include:
* bcprov-jdk15on-1.49.jar
* bcpkix-jdk15on-1.49.jar
* slf4j-api-1.7.5.jar
* slf4j-log4j12-1.7.5.jar
* log4j-1.*.jar
* javax.mail-1.5.1.jar
* [EclipseHome]\plugins\org.eclipse.jgit_2.0.*.jar
* ..\.. (for the graphics, otherwise you get NullPointerExceptions)
4. I had to decompile GitblitAuthority.class with JAD in order to figure out 
the real cause of NullPointerExceptions
5. Guessed it needed a file certs\authority.conf in my base folder, so I 
created one manually and put in a duration value.

What is the expected output? What do you see instead?

1. Procedure to change the basefolder is not properly described in 
documentation you see first, that is http://gitblit.com/setup_go.html
The deprecated version on http://gitblit.com/setup.html was much better!

2. After fixing classpath issues I got an exception stack trace:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at com.gitblit.authority.GitblitAuthority$7.actionPerformed(GitblitAuthority.java:589)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.AbstractButton.doClick(Unknown Source)
        at javax.swing.AbstractButton.doClick(Unknown Source)
        at com.gitblit.authority.GitblitAuthority.load(GitblitAuthority.java:334)
        at com.gitblit.authority.GitblitAuthority.initialize(GitblitAuthority.java:190)
        at com.gitblit.authority.GitblitAuthority$1.run(GitblitAuthority.java:160)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$200(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

The cause is a missing file certs\authority.conf 

What version of the product are you using? On what operating system?
* Using gitblit-1.6.0.war (latest stable release to my knowledge) on Windows 7.

Please provide any additional information below.

Original issue reported on code.google.com by bertk...@gmail.com on 18 Jul 2014 at 12:11

GoogleCodeExporter commented 9 years ago
The main problem I think you are having is that you are reading the setup 
instructions for the GO build (complete, integrated stack based on Jetty) but 
you are using the WAR build (you provide a servlet container like Tomcat, etc). 
 The initial setup is slightly different.

http://gitblit.com/setup_war.html

The Authority may only be used with GO and the proper launch scripts are 
included in the GO binaries.

Original comment by James.Mo...@gmail.com on 18 Jul 2014 at 4:11

GoogleCodeExporter commented 9 years ago

Original comment by James.Mo...@gmail.com on 12 Aug 2014 at 7:14