title: GWT validation error during gwt compile - No source code available
body: <p>I am trying to get gwt validation working using the hibernate validator. I have followed the steps from <a href="http://code.google.com/p/google-web-toolkit/wiki/BeanValidation" rel="nofollow">http://code.google.com/p/google-web-toolkit/wiki/BeanValidation</a> and configured my project according to the sample validation project at <a href="http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/validation/" rel="nofollow">http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/validation/</a></p>
  
  <p>My .gwt.xml file contains:</p>
  
  <pre><code>&lt;inherits name="org.hibernate.validator.HibernateValidator" /&gt;
  </code></pre>
  
  <p>and my custom validation factory:</p>
  
  <pre><code>&lt;replace-with class="my.package.here.client.validation.ValidatorFactory"&gt;
  &lt;when-type-is class="javax.validation.ValidatorFactory" /&gt;
  &lt;/replace-with&gt;     
  </code></pre>
  
  <p>Validation works perfect both on client and server side in dev mode, but when trying to gwt compile I get:</p>
  
  <pre><code>gwtc-production:
       [java] Compiling module my.package.MyModule
       [java]    Validating newly compiled units
       [java]       [ERROR] Errors in 'jar:file:/hibernate-validator-4.2.0.Final-sources.jar!/org/hibernate/validator/constraints/impl/FutureValidatorForReadableInstant.java'
       [java]          [ERROR] Line 32: No source code is available for type org.joda.time.ReadableInstant; did you forget to inherit a required module?
       [java]       [ERROR] Errors in 'jar:file:/hibernate-validator-4.2.0.Final-sources.jar!/org/hibernate/validator/constraints/impl/FutureValidatorForReadablePartial.java'
       [java]          [ERROR] Line 32: No source code is available for type org.joda.time.ReadablePartial; did you forget to inherit a required module?
       [java]       [ERROR] Errors in 'jar:file:/hibernate-validator-4.2.0.Final-sources.jar!/org/hibernate/validator/constraints/impl/PastValidatorForReadableInstant.java'
       [java]       [ERROR] Errors in 'jar:file:/hibernate-validator-4.2.0.Final-sources.jar!/org/hibernate/validator/constraints/impl/SafeHtmlValidator.java'
       [java]          [ERROR] Line 22: The import org.jsoup cannot be resolved
       [java]          [ERROR] Line 23: The import org.jsoup cannot be resolved
       [java]          [ERROR] Line 35: Whitelist cannot be resolved to a type
       [java]          [ERROR] Line 40: Whitelist cannot be resolved to a type
       [java]          [ERROR] Line 40: Whitelist cannot be resolved
       [java]          [ERROR] Line 43: Whitelist cannot be resolved to a type
       [java]          [ERROR] Line 43: Whitelist cannot be resolved
       [java]          [ERROR] Line 46: Whitelist cannot be resolved to a type
       [java]          [ERROR] Line 46: Whitelist cannot be resolved
       [java]          [ERROR] Line 49: Whitelist cannot be resolved to a type
       [java]          [ERROR] Line 49: Whitelist cannot be resolved
       [java]          [ERROR] Line 52: Whitelist cannot be resolved to a type
       [java]          [ERROR] Line 52: Whitelist cannot be resolved
       [java]          [ERROR] Line 55: Whitelist cannot be resolved to a type
       [java]          [ERROR] Line 62: Jsoup cannot be resolved
       [java]          [ERROR] Line 62: Whitelist cannot be resolved to a type
       [java]       [ERROR] Errors in 'jar:file:gwt-user.jar!/org/hibernate/validator/super/org/hibernate/validator/engine/PathImpl.java'
       [java]          [ERROR] Line 72: The constructor NodeImpl(String) is undefined
       [java]          [ERROR] Line 84: The constructor NodeImpl(Path.Node) is undefined
       [java]          [ERROR] Line 95: The constructor NodeImpl(Path.Node) is undefined
       [java]          [ERROR] Line 202: The constructor NodeImpl(String) is undefined
       [java]          [ERROR] Line 204: The method setInIterable(boolean) is undefined for the type NodeImpl
       [java]          [ERROR] Line 209: The method setIndex(Integer) is undefined for the type NodeImpl
       [java]          [ERROR] Line 212: The method setKey(String) is undefined for the type NodeImpl
       [java]    [ERROR] Aborting compile due to errors in some input files
  </code></pre>
  
  <p>There is obviously some source jar I'm missing. I have (among others) on my classpath:</p>
  
  <pre><code>hibernate-validator-4.2.0.Final.jar
  hibernate-validator-4.2.0.Final-sources.jar
  </code></pre>
  
  <p>I have also tried adding <code>joda-time-2.1.jar</code>, <code>joda-time-2.1-sources.jar</code>, <code>jsoup-1.6.3.jar</code> and <code>jsoup-1.6.3-sources.jar</code>.</p>
  
  <p>Shouldn't inheriting the org.hibernate.validator.HibernateValidator take care of the super sources so I don't need to provide the sources? Can anyone see what I'm missing?</p>