Hello,
I currently attempt to get and compile the 8.5 version of Geotools.
While there are no problems when I download and compile the 9-SNAPSHOT, I
encounter some test troubles when compiling the 8.5.
A first test,
testUserLayerWithInlineFeatures(org.geotools.styling.UserLayerTest) fails due
to this error:
-------------------------------------------------------------------------------
Test set: org.geotools.styling.UserLayerTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.013 sec <<<
FAILURE!
testUserLayerWithInlineFeatures(org.geotools.styling.UserLayerTest) Time
elapsed: 0.011 sec <<< ERROR!
java.lang.NullPointerException
at
org.geotools.styling.DefaultResourceLocator.makeRelativeURL(DefaultResourceLocator.java:82)
at
org.geotools.styling.DefaultResourceLocator.locateResource(DefaultResourceLocator.java:53)
at org.geotools.styling.SLDParser.parseExternalGraphic(SLDParser.java:1683)
at org.geotools.styling.SLDParser.parseGraphic(SLDParser.java:1563)
at org.geotools.styling.SLDParser.parsePointSymbolizer(SLDParser.java:1524)
at org.geotools.styling.SLDParser.parseRule(SLDParser.java:905)
at org.geotools.styling.SLDParser.parseFeatureTypeStyle(SLDParser.java:811)
at org.geotools.styling.SLDParser.parseStyle(SLDParser.java:767)
at org.geotools.styling.SLDParser.parseUserLayer(SLDParser.java:480)
at org.geotools.styling.SLDParser.parseDescriptor(SLDParser.java:441)
at org.geotools.styling.SLDParser.parseSLD(SLDParser.java:400)
at
org.geotools.styling.UserLayerTest.testUserLayerWithInlineFeatures(UserLayerTest.java:175)
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 junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
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:164)
at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at
org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
at
org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
The involved line is the logging one in DefaultResourceLocator:
URL makeRelativeURL(String uri) {
try {
return new URL(sourceUrl, uri);
} catch (MalformedURLException e) {
LOGGER.warning("can't parse " + uri + " as relative to"
+ sourceUrl.toExternalForm());
}
return null;
}
sourceUrl is null.
I can avoid this problem by replacing a source line by something like this:
URL makeRelativeURL(String uri) {
try {
return new URL(sourceUrl, uri);
} catch (MalformedURLException e) {
LOGGER.warning(MessageFormat.format("can''t parse {0} as relative to
{1}", uri, sourceUrl != null ? sourceUrl.toExternalForm() : "null"));
}
return null;
}
My environment is maybe not exactly the one it should be.
Is there initial parameters files to download from somewhere ?
Special initial settings to be sure to check before attempting an mvn clean
install ?
Thanks.
M. Le Bihan.
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel