java.lang.NoClassDefFoundError: org/json/JSONException when attempting to use Source Maps - gwt

The long awaited Super Dev Mode came and I attempted to use it. After building GWT trunk I created a test app and compiled it successfully. I then added this to the module XML file with the intent to enable Source Maps for Chrome:
<!-- Allows debugging without DevMode -->
<set-property name="compiler.useSourceMaps" value="true">
<when-property-is name="user.agent" value="safari" />
</set-property>
I then tried to compile the application. The output was the following:
Compiling module com.hsi.gwt.test.sdm.Hello_sdm
Compiling 6 permutations
Compiling permutation 0...
Compiling permutation 1...
Compiling permutation 2...
Compiling permutation 3...
Compiling permutation 4...
Compiling permutation 5...
Source Maps Enabled
Compile of permutations succeeded
Linking into /Users/bbrudnoy/Workspaces/indigo-hsi/hello-sdm/war/hello_sdm
Invoking Linker Export CompilationResult symbol maps
[ERROR] Failed to link
java.lang.NoClassDefFoundError: org/json/JSONException
at com.google.gwt.thirdparty.debugging.sourcemap.SourceMapGeneratorV3.mergeMapSection(SourceMapGeneratorV3.java:243)
at com.google.gwt.core.linker.SymbolMapsLinker.link(SymbolMapsLinker.java:299)
at com.google.gwt.core.ext.linker.impl.StandardLinkerContext.invokeLinkForOnePermutation(StandardLinkerContext.java:372)
at com.google.gwt.dev.Link.finishPermutation(Link.java:491)
at com.google.gwt.dev.Link.doSimulatedShardingLink(Link.java:453)
at com.google.gwt.dev.Link.link(Link.java:200)
at com.google.gwt.dev.Compiler.run(Compiler.java:262)
at com.google.gwt.dev.Compiler.run(Compiler.java:198)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
at com.google.gwt.dev.Compiler.main(Compiler.java:177)
Caused by: java.lang.ClassNotFoundException: org.json.JSONException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 12 more
What am I missing?

If you use Maven then add the following to your pom.xml file. It should help you overcome that problem.
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>

EDIT: this is fixed in GWT 2.5
This is a known issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=7397
As a quick workaround, you can add the gwt-servlet-deps.jar to the classpath.
BTW, Super Dev Mode will automatically generate source maps, you don't need to enable them in your module (but for now you have to enable Super Dev Mode and use the xsiframe linker)

Related

Including nonfree module in eclipse openCV 3.0 project

I want to use some functionality from nonfree library so I added javacv to my maven project and I have installed opencv_contrib package.
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacv</artifactId>
<version>1.1</version>
</dependency>
As a result I have opencv_xfeatures2d.class as a part of opencv-3.0.0-1.1.jar library.
I have following import:
import static org.bytedeco.javacpp.opencv_xfeatures2d.*;
in my project. The library is added properly because following
SURF surf = new SURF();
line (ctrl + left mouse button) it redirects me to proper function inside opencv_xfeatures2d file. But when I try to compile project I get following error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no
jniopencv_xfeatures2d in java.library.path at
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864) at
java.lang.Runtime.loadLibrary0(Runtime.java:870) at
java.lang.System.loadLibrary(System.java:1122) at
org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:597) at
org.bytedeco.javacpp.Loader.load(Loader.java:438) at
org.bytedeco.javacpp.Loader.load(Loader.java:381) at
org.bytedeco.javacpp.opencv_xfeatures2d.(opencv_xfeatures2d.java:19)
at java.lang.Class.forName0(Native Method) at
java.lang.Class.forName(Class.java:348) at
org.bytedeco.javacpp.Loader.load(Loader.java:413) at
org.bytedeco.javacpp.Loader.load(Loader.java:381) at
org.bytedeco.javacpp.opencv_xfeatures2d$SURF.(opencv_xfeatures2d.java:489)
at mypr.rec.Clsm.Cmpr(Clsm.java:18) at
mypr.mn.Main.main(Main.java:21) Caused by:
java.lang.UnsatisfiedLinkError:
/tmp/javacpp8449996504597/libjniopencv_xfeatures2d.so:
/usr/local/lib/libopencv_calib3d.so.3.0: undefined symbol:
ippicvJumpIndexForMergedLibs at
java.lang.ClassLoader$NativeLibrary.load(Native Method) at
java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938) at
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821) at
java.lang.Runtime.load0(Runtime.java:809) at
java.lang.System.load(System.java:1086) at
org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:580) ... 10 more
The strange thing is that it says about jniopencv_xfeatures2d instead of opencv_xfeatures2d. What am I doing wrong?

Eclipse cant find some of the JUnit files

I have a maven project with spring. And we also have alot of JUnit test classes. We are using Eclipse. Every now and then - quite often actually - eclipse shows some (not all) of the test classes as red... Claiming it cant find imports. Looking at Eclipse error log, I can see alot of these error messages (but for different test-classes ofc).
What is happening? My collegue who works with the same project does not get this error. We are using Eclipse Juno SR2.
org.eclipse.core.runtime.CoreException: File not found: C:\xxx\target\test-classes\com\yyy\vet\zzz\service\TradeWashTest.class.
at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55)
at org.eclipse.core.internal.filesystem.local.LocalFile.openInputStream(LocalFile.java:377)
at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:797)
at org.eclipse.core.internal.resources.File.getContents(File.java:289)
at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsByteArray(Util.java:1132)
at org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.writeClassFileCheck(IncrementalImageBuilder.java:888)
at org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.writeClassFileContents(IncrementalImageBuilder.java:830)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.writeClassFile(AbstractImageBuilder.java:857)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.acceptResult(AbstractImageBuilder.java:188)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:510)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:365)
at org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.compile(IncrementalImageBuilder.java:329)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:302)
at org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.build(IncrementalImageBuilder.java:134)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildDeltas(JavaBuilder.java:265)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:193)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: java.io.FileNotFoundException: C:\dev\xxx\target\test-classes\com\yyy\vet\zzz\service\TradeWashTest.class (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at org.eclipse.core.internal.filesystem.local.LocalFile.openInputStream(LocalFile.java:368)
... 26 more
The problem could be in the jars dependencies (especially if you're using mocks). You need to perform two steps to figure out what the problem is:
1.Run unit tests using maven (in case it works you can go to step2);
2. Look into jars order in the Eclipse (projects setting-> java build path-> order and settings).
In case you said that it works for your colleague you need to compare order of your jars with jar's order of you colleague

Unable to find 'com/extjs/gxt/ui/GXT.gwt.xml' in GXT sample application

I'm trying to run a sample application using GXT (ExtJS + GWT) as described in the tutorial at
http://www.sencha.com/learn/setting-up-your-first-ext-gwt-project-in-eclipse
When I try to run the application in eclipse, I get the error
Loading modules
com.hello.gxt.HelloGXT
Loading inherited module 'com.extjs.gxt.ui.GXT'
[ERROR] Unable to find 'com/extjs/gxt/ui/GXT.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] Line 15: Unexpected exception while processing element 'inherits'
My build path looks like this
and the build path of the run configuration looks like this
Here's the source: https://dl.dropbox.com/u/11776689/2012_09_27_HelloGXT.zip
How can I fix the problem?
'Update 29.09.2012': The former error is fixed, but now I get another one:
Loading modules
com.hello.gxt.HelloGXT
Loading inherited module 'com.sencha.gxt.ui.GXT'
Loading inherited module 'com.sencha.gxt.data.Data'
Loading inherited module 'com.sencha.gxt.core.Core'
[ERROR] Unexpected error while processing XML
java.lang.NoClassDefFoundError: com/google/gwt/core/ext/Generator
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClassOrNull(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Change your *.gwt.xml file from:
<inherits name="com.extjs.gxt.ui.GXT" />
to
<inherits name='com.sencha.gxt.ui.GXT' />
The tutorial you used is definitely for version 2.0. From GXT 3.0, the namespace changed to com.sencha.gxt...
UPDATE - to answer the next issue:
I think you are missing gwt-dev.jar
See this for reference: http://www.sencha.com/forum/showthread.php?73617-GWT-1.64-Class-not-found-exception-GXT-module-declaration-is.

Why do i need Scala compiler at runtime? (Play2/Salat with Scalap dependency)

I'm using Scala / Mongo / Casbah / Salat / Play2 and when i try to use Salat it seems it has a dependency to Scalap.
It works fine when running the application with play run but with play start i get the following stack:
[info] application - Can't create user
java.lang.NoClassDefFoundError: scala/tools/nsc/util/ClassPath$JavaContext
at scala.tools.scalap.scalax.rules.scalasig.ScalaSigParser$.scalaSigFromAttribute(ScalaSig.scala:35) ~[scalap-2.9.1.jar:na]
at scala.tools.scalap.scalax.rules.scalasig.ScalaSigParser$.parse(ScalaSig.scala:38) ~[scalap-2.9.1.jar:na]
at com.novus.salat.util.ScalaSigUtil$$anonfun$parseScalaSig0$2.apply(ScalaSigUtil.scala:73) ~[salat-util_2.9.1-0.0.8-SNAPSHOT.jar:0.0.8-SNAPSHOT]
at com.novus.salat.util.ScalaSigUtil$$anonfun$parseScalaSig0$2.apply(ScalaSigUtil.scala:73) ~[salat-util_2.9.1-0.0.8-SNAPSHOT.jar:0.0.8-SNAPSHOT]
at scala.Option.map(Option.scala:133) ~[scala-library.jar:na]
at com.novus.salat.util.ScalaSigUtil$.parseScalaSig0(ScalaSigUtil.scala:73) ~[salat-util_2.9.1-0.0.8-SNAPSHOT.jar:0.0.8-SNAPSHOT]
Caused by: java.lang.ClassNotFoundException: scala.tools.nsc.util.ClassPath$JavaContext
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[na:1.7.0_01]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_01]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_01]
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0_01]
at java.lang.ClassLoader.loadClass(ClassLoader.java:423) ~[na:1.7.0_01]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) ~[na:1.7.0_01]
scala/tools/nsc/util/ClassPath$JavaContext is in the Scala compiler project so i added the SBT dependency:
"org.scala-lang" % "scala-compiler" % "2.9.1"
Now it works fine with play start too.
But is it normal to have to run my project with a runtime dependency to the scala compiler?
And why does it work with play run without the scala compiler dependency? Is it automatically embedded when not running in production mode?
Thanks
Actually Scalap depends on the Scala compiler:
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
<version>2.9.0.RC4</version>
</dependency>
</dependencies>
http://www.jarvana.com/jarvana/inspect-pom/org/scala-lang/scalap/2.9.0.RC4/scalap-2.9.0.RC4.pom
I was having the problem because temporary my dependencies were handled manually and not by SBT.
Now i manage them by SBT and it works fine... but the compiler is still retrieved as a transitive dependency with Salat as initial dependency...
It's strange to have the compiler at runtime but it works...
This happens for two reasons:
If you are working in dev mode, your classes are continuosly recompiled. So you need a compiler.
If you use the stage mode, the classes are compiled once forever, but this is done internally . If not you would have to provide a reference to the scala compiler, which could replace the scala compiler dependency.

How to include an external jar in a GWT module?

I would like to use the org.apache.commons.validator.GenericValidator class in a view class of my GWT web app. I have read that I have to implicitely tell that I intend to use this external library. I thought adding the next line into my App.gwt.xml would work.
<inherits name='org.apache.commons.validator.GenericValidator'/>
I get the next error:
Loading inherited module 'org.apache.commons.validator.GenericValidator'
[ERROR] Unable to find 'org/apache/commons/validator/GenericValidator.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] Line 13: Unexpected exception while processing element 'inherits'
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:239)
at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:354)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:223)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:270)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:327)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)
at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:398)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:257)
at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:169)
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:283)
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141)
at com.google.gwt.dev.Compiler.run(Compiler.java:184)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
at com.google.gwt.dev.Compiler.main(Compiler.java:159)
[ERROR] Failure while parsing XML
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.gwt.dev.util.xml.DefaultSchema.onHandlerException(DefaultSchema.java:56)
at com.google.gwt.dev.util.xml.Schema.onHandlerException(Schema.java:66)
at com.google.gwt.dev.util.xml.Schema.onHandlerException(Schema.java:66)
at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:233)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:270)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:327)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)
at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:398)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:257)
at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:169)
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:283)
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141)
at com.google.gwt.dev.Compiler.run(Compiler.java:184)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
at com.google.gwt.dev.Compiler.main(Compiler.java:159)
[ERROR] Unexpected error while processing XML
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:351)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)
at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:398)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:257)
at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:169)
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:283)
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141)
at com.google.gwt.dev.Compiler.run(Compiler.java:184)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
at com.google.gwt.dev.Compiler.main(Compiler.java:159)
I have commons.validator-1.3.1.jar in war/WEB-INF/lib
I am using eclipse with Google Plugin.
Anyone knows how it works?
The syntax <inherits name='package.SomeModule'/> is only for special GWT modules, built to be used with GWT, not generics Java libraries (docs). A quick test to see if a jar/library is built to be used with GWT is to see if it includes a module file. If you look at the error you posted the top line reads:
Loading inherited module 'org.apache.commons.validator.GenericValidator'
[ERROR] Unable to find 'org/apache/commons/validator/GenericValidator.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
You can see that commons.validator is missing the required module file. You can still use this library on the server side (no restrictions there). For client side, chances are GWT doesn't emulate the required parts of Java - for more information see the docs.
Alternatively you can add the GWT module XML file to your project. I've had to do this in the past.
This is not "ideal", but it saves you from having to repackage the jars.
In this case, you could create a file named "Commons.gwt.xml" and put it in a /org/apache/commons directory in your local source path. The file would contain:
<module>
<source path="validator"/>
</module>
Then, you would just need to add the line <inherits name="org.apache.commons.Common"> to your application.
What you would need to do if this was your library would be to add in a XXX.gwt.xml file for each package that you want GWT to be able to compile to. This is how you would add in a shared jar for instance into a GWT frontend of a multi-tiered (and multi-server) app. You can take any of the GWT libraries and unzip their jars to see what I mean, there will be a file called XXX.gwt.xml one level above all packages that GWT needs to be able to use to compile.
In the past I have taken and re-packaged some of these open source libraries, which you could do here. This is problematic since then you really need to source control your version of the library, and would have to manually merge any new changes (or just redo the XXX.gwt.xml file entries and repackage).
So this is not the best case scenario (but sometimes you're looking for miss right now and not miss right), is there no way around this just using core GWT and Java? I know the pre-fab libraries are great, but is the dependency with the extra work worth the time savings in you particular case?
I hope that helps.