I'm attempting to implement the following solution as described in the answer to the following stack overflow question (I'm the one who asked the original question):
http://stackoverflow.com/questions/16100925/gwt-test-utils-unit-fail-when-run-with-jacocoWhen I then try and run the tests using the extended GwtRunner I get the following exception in the first test that fails:
Exception in thread "Timer-0" com.googlecode.gwt.test.exceptions.GwtTestConfigurationException: Cannot find 'web.xml' file ' for GWT module
at com.googlecode.gwt.test.internal.utils.WebXmlUtils.getWebXmlAsStream(WebXmlUtils.java:93)
at com.googlecode.gwt.test.internal.utils.WebXmlUtils.<init>(WebXmlUtils.java:52)
at com.googlecode.gwt.test.internal.utils.WebXmlUtils.get(WebXmlUtils.java:41)
at com.googlecode.gwt.test.internal.handlers.WebXmlRemoteServiceCreateHandler.findService(WebXmlRemoteServiceCreateHandler.java:42)
at com.googlecode.gwt.test.rpc.RemoteServiceCreateHandler.create(RemoteServiceCreateHandler.java:83)
at com.googlecode.gwt.test.internal.handlers.GwtTestGWTBridge.create(GwtTestGWTBridge.java:97)
at com.google.gwt.core.client.GWT.create(GWT.java:97)
at uk.co.card.gwt.retailpost.client.RetailPOSTServiceAsync$Util.getInstance(RetailPOSTServiceAsync.java:154)
at uk.co.card.gwt.retailpost.client.dialog.CardViewV2Dialog$1.doCall(CardViewV2Dialog.java:216)
at uk.co.card.gwt.client.helper.AsyncCallSequence$1.run(AsyncCallSequence.java:98)
at com.googlecode.gwt.test.internal.patchers.TimerPatcher$2.run(TimerPatcher.java:86)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Exception in thread "Timer-1" com.googlecode.gwt.test.exceptions.GwtTestConfigurationException: Cannot find 'web.xml' file ' for GWT module
at com.googlecode.gwt.test.internal.utils.WebXmlUtils.getWebXmlAsStream(WebXmlUtils.java:93)
at com.googlecode.gwt.test.internal.utils.WebXmlUtils.<init>(WebXmlUtils.java:52)
at com.googlecode.gwt.test.internal.utils.WebXmlUtils.get(WebXmlUtils.java:41)
at com.googlecode.gwt.test.internal.handlers.WebXmlRemoteServiceCreateHandler.findService(WebXmlRemoteServiceCreateHandler.java:42)
at com.googlecode.gwt.test.rpc.RemoteServiceCreateHandler.create(RemoteServiceCreateHandler.java:83)
at com.googlecode.gwt.test.internal.handlers.GwtTestGWTBridge.create(GwtTestGWTBridge.java:97)
at com.google.gwt.core.client.GWT.create(GWT.java:97)
at uk.co.card.gwt.retailpost.client.RetailPOSTServiceAsync$Util.getInstance(RetailPOSTServiceAsync.java:154)
at uk.co.card.gwt.retailpost.client.dialog.CardViewV2Dialog$1.doCall(CardViewV2Dialog.java:216)
at uk.co.card.gwt.client.helper.AsyncCallSequence$1.run(AsyncCallSequence.java:98)
at com.googlecode.gwt.test.internal.patchers.TimerPatcher$2.run(TimerPatcher.java:86)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Exception in thread "Timer-3" com.googlecode.gwt.test.exceptions.GwtTestConfigurationException: Cannot find 'web.xml' file ' for GWT module
at com.googlecode.gwt.test.internal.utils.WebXmlUtils.getWebXmlAsStream(WebXmlUtils.java:93)
at com.googlecode.gwt.test.internal.utils.WebXmlUtils.<init>(WebXmlUtils.java:52)
at com.googlecode.gwt.test.internal.utils.WebXmlUtils.get(WebXmlUtils.java:41)
at com.googlecode.gwt.test.internal.handlers.WebXmlRemoteServiceCreateHandler.findService(WebXmlRemoteServiceCreateHandler.java:42)
at com.googlecode.gwt.test.rpc.RemoteServiceCreateHandler.create(RemoteServiceCreateHandler.java:83)
at com.googlecode.gwt.test.internal.handlers.GwtTestGWTBridge.create(GwtTestGWTBridge.java:97)
at com.google.gwt.core.client.GWT.create(GWT.java:97)
at uk.co.card.gwt.retailpost.client.RetailPOSTServiceAsync$Util.getInstance(RetailPOSTServiceAsync.java:154)
at uk.co.card.gwt.retailpost.client.dialog.CardViewV2Dialog$1.doCall(CardViewV2Dialog.java:216)
at uk.co.card.gwt.client.helper.AsyncCallSequence$1.run(AsyncCallSequence.java:98)
at com.googlecode.gwt.test.internal.patchers.TimerPatcher$2.run(TimerPatcher.java:86)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Each subsequent test then fails with:
java.lang.RuntimeException: com.googlecode.gwt.test.internal.patchers.TimerPatcher class is frozen
at javassist.CtClassType.checkModify(CtClassType.java:287)
at javassist.CtClassType.setModifiers(CtClassType.java:431)
at com.googlecode.gwt.test.internal.AutomaticPatcher.<init>(AutomaticPatcher.java:51)
at com.googlecode.gwt.test.internal.PatcherFactory.createPatcher(PatcherFactory.java:47)
at com.googlecode.gwt.test.internal.PatcherFactory.<init>(PatcherFactory.java:22)
at com.googlecode.gwt.test.internal.ConfigurationLoader.visitPatchClasses(ConfigurationLoader.java:288)
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:56)
at com.googlecode.gwt.test.internal.junit.AbstractGwtRunner.<init>(AbstractGwtRunner.java:30)
at com.googlecode.gwt.test.GwtRunner.<init>(GwtRunner.java:19)
at uk.co.card.retailpost.testutils.RetailPOSTGWTRunner.<init>(RetailPOSTGWTRunner.java:50)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:250)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Anyone have any suggestions on how to resolve this?
Thanks
Dominic