Open GoogleCodeExporter opened 9 years ago
Note that that stack trace came from using eclipse's ant builder. This one I
get from running ant standalone:
com.googlecode.gwt.test.exceptions.GwtTestPatchException: Error while scanning
package 'com.googlecode.gwt.test.internal.patchers'
at com.googlecode.gwt.test.internal.ClassesScanner.scanPackages(ClassesScanner.java:68)
at com.googlecode.gwt.test.internal.ConfigurationLoader.visitPatchClasses(ConfigurationLoader.java:197)
at com.googlecode.gwt.test.internal.ConfigurationLoader.<init>(ConfigurationLoader.java:57)
at com.googlecode.gwt.test.internal.GwtFactory.<init>(GwtFactory.java:87)
at com.googlecode.gwt.test.internal.GwtFactory.initializeIfNeeded(GwtFactory.java:45)
at com.googlecode.gwt.test.internal.junit.AbstractGwtRunner.<init>(AbstractGwtRunner.java:30)
at com.googlecode.gwt.test.GwtRunner.<init>(GwtRunner.java:19)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
Caused by: com.googlecode.gwt.test.exceptions.GwtTestPatchException: Cannot
find class in the classpath :
'com.googlecode.gwt.test.internal.patchers.AbstractHasDataPatcher'
at com.googlecode.gwt.test.internal.GwtClassPool.getClass(GwtClassPool.java:27)
at com.googlecode.gwt.test.internal.ClassesScanner.visitClass(ClassesScanner.java:107)
at com.googlecode.gwt.test.internal.ClassesScanner.scanClassesFromJarFile(ClassesScanner.java:99)
at com.googlecode.gwt.test.internal.ClassesScanner.scanPackages(ClassesScanner.java:62)
Original comment by rco...@gmail.com
on 23 Oct 2012 at 6:27
gwt.unit.tests:
[echo] Classpath = C:\Users\xxx\src;
C:\Users\xxx\build\war\WEB-INF\classes;
C:\Users\xxx\libs\java\logging\slf4j-api-1.6.6.jar;
C:\Users\xxx\libs\java\logging\slf4j-simple-1.6.6.jar;
C:\Users\xxx\libs\java\gwt-2.4.0\gwt-user.jar;
C:\Users\xxx\libs\java\gwt-2.4.0\gwt-dev.jar;
C:\Users\xxx\libs\java\gwt-2.4.0\gwt-servlet.jar;
C:\Users\xxx\libs\java\gwt-2.4.0\gwt-servlet-deps.jar;
C:\Users\xxx\libs\java\gwt-2.4.0\validation-api-1.0.0.GA.jar;
C:\Users\xxx\libs\java\gwt-2.4.0\validation-api-1.0.0.GA-sources.jar;
C:\Users\xxx\build\junit;
C:\Users\xxx\libs\java\gwt-testing\gwt-test-utils-0.41.jar;
C:\Users\xxx\libs\java\junit\junit-4.10.jar;
C:\Users\xxx\libs\java\junit\ant-junit4.jar;
C:\Users\xxx\libs\java\powermock-easymock\cglib-nodep-2.2.2.jar;
C:\Users\xxx\libs\java\powermock-easymock\easymock-3.1.jar;
C:\Users\xxx\libs\java\powermock-easymock\javassist-3.16.1-GA.jar;
C:\Users\xxx\libs\java\powermock-easymock\objenesis-1.2.jar;
C:\Users\xxx\libs\java\powermock-easymock\powermock-easymock-1.4.12-full.jar
[junit] dir attribute ignored if running in the same VM
[junit] Running xxx.searchportal.client.SearchServiceTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.063 sec
Original comment by rco...@gmail.com
on 23 Oct 2012 at 6:56
Okay, I found what caused this stack trace. I had an @Ignore attached to the
test. I guess I did that to avoid the build error I must have forgotten about.
So, without the @Ignore on the test, the ant build runs with test-utils-0.38
in the classpath. So, eclipse and ant both behave well with identical
classpaths.
However, changing the test-utils from 0.38 to 0.41 causes the build to fail,
with this stack trace:
com.googlecode.gwt.test.exceptions.GwtTestException: Error while generating
gwt-test-utils prerequisites
at com.googlecode.gwt.test.internal.GwtFactory.<init>(GwtFactory.java:113)
at com.googlecode.gwt.test.internal.GwtFactory.initializeIfNeeded(GwtFactory.java:45)
at com.googlecode.gwt.test.internal.junit.AbstractGwtRunner.<init>(AbstractGwtRunner.java:30)
at com.googlecode.gwt.test.GwtRunner.<init>(GwtRunner.java:19)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous log
entries)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:278)
at com.google.gwt.dev.cfg.ModuleDefLoader$2.load(ModuleDefLoader.java:217)
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:324)
at com.google.gwt.dev.cfg.ModuleDefLoader.createSyntheticModule(ModuleDefLoader.java:107)
at com.googlecode.gwt.test.internal.GwtFactory.createModuleDef(GwtFactory.java:158)
at com.googlecode.gwt.test.internal.GwtFactory.<init>(GwtFactory.java:105)
To repeat, the ONLY change between a working build and a non-working build is
the change from gwt-test-utils-0.38.jar to gwt-test-utils-0.41.jar.
Original comment by rco...@gmail.com
on 23 Oct 2012 at 7:45
Could you please give the lastest 0.42-SNAPSHOT version a try ? I fixed some
classpath issue a few days ago.
Original comment by gael.laz...@gmail.com
on 25 Oct 2012 at 3:19
Tried the new 0.42 released library and received the same exception.
Specifically, the error is thrown in the GwtFactory on line 158,
ModuleDefLoader.createSyntheticModule(GwtTreeLogger.get(),
"com.googlecode.gwt.test.Aggregator", inherits, false)
throws:
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:278)
at com.google.gwt.dev.cfg.ModuleDefLoader$2.load(ModuleDefLoader.java:217)
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:324)
at com.google.gwt.dev.cfg.ModuleDefLoader.createSyntheticModule(ModuleDefLoader.java:107)
at com.googlecode.gwt.test.internal.GwtFactory.createModuleDef(GwtFactory.java:158)
at com.googlecode.gwt.test.internal.GwtFactory.<init>(GwtFactory.java:105)
at com.googlecode.gwt.test.internal.GwtFactory.initializeIfNeeded(GwtFactory.java:45)
at com.googlecode.gwt.test.internal.junit.AbstractGwtRunner.<init>(AbstractGwtRunner.java:30)
at com.googlecode.gwt.test.GwtRunner.<init>(GwtRunner.java:19)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:48)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
The final stack trace looks like:
com.googlecode.gwt.test.exceptions.GwtTestException: Error while generating
gwt-test-utils prerequisites
at com.googlecode.gwt.test.internal.GwtFactory.<init>(GwtFactory.java:113)
at com.googlecode.gwt.test.internal.GwtFactory.initializeIfNeeded(GwtFactory.java:45)
at com.googlecode.gwt.test.internal.junit.AbstractGwtRunner.<init>(AbstractGwtRunner.java:30)
at com.googlecode.gwt.test.GwtRunner.<init>(GwtRunner.java:19)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:48)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous log
entries)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:278)
at com.google.gwt.dev.cfg.ModuleDefLoader$2.load(ModuleDefLoader.java:217)
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:324)
at com.google.gwt.dev.cfg.ModuleDefLoader.createSyntheticModule(ModuleDefLoader.java:107)
at com.googlecode.gwt.test.internal.GwtFactory.createModuleDef(GwtFactory.java:158)
at com.googlecode.gwt.test.internal.GwtFactory.<init>(GwtFactory.java:105)
... 21 more
Original comment by rco...@gmail.com
on 29 Oct 2012 at 2:51
When a UnableToCompleteException is throws, the actual error message is logged
by a TreeLogger object from the GWT compiler API. gwt-test-utils provides an
implemention of the TreeLogger interface which redirects logged error to slf4j.
You could add a specific appender for the com.googlecode.gwt.test.GwtTreeLogger
logger so you would have the original error message (which by default is
redirected to System.out).
Could you copy past this error message ?
Original comment by gael.laz...@gmail.com
on 29 Oct 2012 at 2:57
Sorry if Im preaching to the converted but another way is just click on the
exception stack trace in eclipse and setup a breakpoint on the gwt logger and
take a peek at its error buffer..
This extends generally to all debugging...
Original comment by benjamin...@gmail.com
on 9 Nov 2012 at 4:42
K, I'm back working on this project and am looking for help solving my problem.
I upgraded to gwt 2.5 and test-utils-0.43 and have spent some time looking at
the build log that I now write to. I have set my log4j category thus:
log4j.appender.R = org.apache.log4j.RollingFileAppender
log4j.appender.R.File = build/build.log
log4j.appender.R.layout = org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d [%t] %p %c - %m %n
log4j.category.com.googlecode.gwt.test = ALL, R
When I run my testrunner using ant, I see this stacktrace:
com.googlecode.gwt.test.exceptions.GwtTestPatchException: Error while scanning
package 'com.googlecode.gwt.test.internal.patchers'
at com.googlecode.gwt.test.internal.ClassesScanner.scanPackages(ClassesScanner.java:68)
at com.googlecode.gwt.test.internal.ConfigurationLoader.visitPatchClasses(ConfigurationLoader.java:285)
at com.googlecode.gwt.test.internal.ConfigurationLoader.<init>(ConfigurationLoader.java:64)
at com.googlecode.gwt.test.internal.GwtFactory.<init>(GwtFactory.java:87)
at com.googlecode.gwt.test.internal.GwtFactory.initializeIfNeeded(GwtFactory.java:45)
at com.googlecode.gwt.test.internal.junit.AbstractGwtRunner.<init>(AbstractGwtRunner.java:30)
at com.googlecode.gwt.test.GwtRunner.<init>(GwtRunner.java:19)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
Caused by: com.googlecode.gwt.test.exceptions.GwtTestPatchException: Cannot
find class in the classpath :
'com.googlecode.gwt.test.internal.patchers.AbstractHasDataPatcher'
at com.googlecode.gwt.test.internal.GwtClassPool.getClass(GwtClassPool.java:27)
at com.googlecode.gwt.test.internal.ClassesScanner.visitClass(ClassesScanner.java:107)
at com.googlecode.gwt.test.internal.ClassesScanner.scanClassesFromJarFile(ClassesScanner.java:99)
at com.googlecode.gwt.test.internal.ClassesScanner.scanPackages(ClassesScanner.java:62)
and my output looks like:
2013-03-08 13:53:39,541 [main] DEBUG
com.googlecode.gwt.test.internal.ConfigurationLoader - Load config file
file:/C:/Users/rcoe/workspace/cadmportal/build/junit/META-INF/gwt-test-utils.pro
perties
2013-03-08 13:53:39,542 [main] DEBUG
com.googlecode.gwt.test.internal.ConfigurationLoader - File loaded and
processed
file:/C:/Users/rcoe/workspace/cadmportal/build/junit/META-INF/gwt-test-utils.pro
perties
2013-03-08 13:53:39,542 [main] DEBUG
com.googlecode.gwt.test.internal.ConfigurationLoader - Load config file
jar:file:/C:/Users/rcoe/workspace/cadmportal/libs/java/gwt-test-utils-0.43/gwt-t
est-utils-0.43.jar!/META-INF/gwt-test-utils.properties
2013-03-08 13:53:39,544 [main] DEBUG
com.googlecode.gwt.test.internal.ConfigurationLoader - File loaded and
processed
jar:file:/C:/Users/rcoe/workspace/cadmportal/libs/java/gwt-test-utils-0.43/gwt-t
est-utils-0.43.jar!/META-INF/gwt-test-utils.properties
2013-03-08 13:53:39,549 [main] DEBUG
com.googlecode.gwt.test.internal.ClassesScanner - Scan package
com.googlecode.gwt.test.internal.patchers
2013-03-08 13:53:39,551 [main] DEBUG
com.googlecode.gwt.test.internal.ClassesScanner - Load classes from jar
/C:/Users/rcoe/workspace/cadmportal/libs/java/gwt-test-utils-0.43/gwt-test-utils
-0.43.jar
Any ideas would be appreciated.
Original comment by rco...@gmail.com
on 8 Mar 2013 at 7:19
Same exception when using maven.
Works fine from Intellij.
Original comment by john.hewison
on 7 May 2013 at 1:56
Original issue reported on code.google.com by
rco...@gmail.com
on 23 Oct 2012 at 6:22