Hudson – clock of the subversion server appears to be out of sync.

WARNING: clock of the subversion server appears to be out of sync. This can result in inconsistent check out behavior.

This message seems pretty clear, to fix this we have to configure ntp. Let’s install the required packages :

apt-get install ntp ntpdate
 vim /etc/ntp.conf 

add server ntp.belnet.be

# pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
# pick a different set every time it starts up.  Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
#server 0.debian.pool.ntp.org iburst dynamic
#server 1.debian.pool.ntp.org iburst dynamic
#server 2.debian.pool.ntp.org iburst dynamic
#server 3.debian.pool.ntp.org iburst dynamic
server ntp.belnet.be

...

Restart ntp,

/etc/init.d/ntp restart

You can check your configuration and see the servers with which you are synchronized with the following :

ntpq -p
remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
holem.belnet.be 193.190.198.43   2 u    2   64    1    9.181  -15.619   0.001

More on : http://www.debianadmin.com/ntp-server-and-client-configuration-in-debian.html

Advertisements

NoClassDefFoundError com.google.gwt.dev.Compiler while building on Hudson

While compiling a maven webapp using GWT on Hudson, I’ve got the following issue :

[ERROR] Exception in thread "main" java.lang.NoClassDefFoundError: com/google/gwt/dev/Compiler
[ERROR] Caused by: java.lang.ClassNotFoundException: com.google.gwt.dev.Compiler
[ERROR]  at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
[ERROR]  at java.security.AccessController.doPrivileged(Native Method)
[ERROR]  at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[ERROR]  at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
[ERROR]  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[ERROR]  at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
[ERROR]  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

This can be solved by telling gwt-maven-plugin to use a localWorker. Here is the config for pom.xml :

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>gwt-maven-plugin</artifactId>
  <version>1.3-SNAPSHOT</version>
  <executions>
    <execution>
      <goals>
        <goal>compile</goal>
        <goal>generateAsync</goal>
        <goal>test</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <runTarget>mypage.html</runTarget>
    <extraJvmArgs>-Xmx512m</extraJvmArgs>
    <generateDirectory>src/main/java</generateDirectory>
    <localWorkers>1</localWorkers>
  </configuration>
</plugin>

Then, you will happily see :

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------