google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

Getting NullPointerException while starting a simple unit test #173

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When trying to run a simple junit test getting the following Nullpointer 
exception:

java.lang.NullPointerException
    at com.googlecode.gwt.test.internal.ConfigurationLoader.collectEventualSourceDirectories(ConfigurationLoader.java:108)
    at com.googlecode.gwt.test.internal.ConfigurationLoader.collectEventualSourceDirectories(ConfigurationLoader.java:123)
    at com.googlecode.gwt.test.internal.ConfigurationLoader.collectEventualSourceDirectories(ConfigurationLoader.java:123)
    at com.googlecode.gwt.test.internal.ConfigurationLoader.processRelatedProjectSrcDirectories(ConfigurationLoader.java:200)
    at com.googlecode.gwt.test.internal.ConfigurationLoader.<init>(ConfigurationLoader.java:65)
    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 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.requests.ClassRequest.buildRunner(ClassRequest.java:33)
    at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:28)
    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)

When debugging through the "c:\\" is considered as a classpathEntry. In the 
ConfigurationLoader.collectEventualSourceDirectories() line 123 when the 
classpathEntry.getParentFile() is called i returns "null" and the same method 
is called recursively with the null value. Do you have any idea why it is 
happening?

- I Have non maven project (project Core for the business logic and separate 
gwt project for the UI, the gwt project has visibility/dependency on the Core) 
- Added all of the required libs
- in the root of the test classpath created META-INF/gwt-test-utils.properties

Its quite frustrating because I really like the gwt-test-utils framework just 
cant run it. Thank you very much for your reply!

Original issue reported on code.google.com by zoltan.s...@gmail.com on 18 May 2013 at 4:58

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 19 May 2013 at 1:39