No, an exception never was thrown that called a System.exit(). I just
put System.exit() at the beginning of the script to see what would
happen.
ERROR Failed to execute Groovy script ircblit.groovy
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
file:/usr/share/tomcat/webapps/gitblit/WEB-INF/data/groovy/ircblit.groovy:
426: unable to resolve class MarkupBuilder
@ line 426, column 16.
def builder = new MarkupBuilder(writer)
There was a lot more similar errors.
Actually it seemed to have killed Apache Tomcat all together. I could
not browse another webapp or gitblit. I looked at the catolina.out:
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:208)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:499)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:371)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:458)
I've found a solution that works. I redefined the methods that would
call exit() return type's from void to boolean. If the method that
makes a connection to the server fails, it returns false. Then return;
is called from the constructor.
http://expectusafterlun.ch/gitblit/blob/?f=src/main/distrib/data/groovy/ircblit.groovy&r=IRCBlit.git&h=HEAD
I'm still needing help to get the git information, so that I can send
it to the irc channel with msgChannel() or noticeChannel(). Thanks.