Esri / spatial-framework-for-hadoop

The Spatial Framework for Hadoop allows developers and data scientists to use the Hadoop data processing system for spatial data analysis.
Apache License 2.0
367 stars 159 forks source link

mvn package - error in JSON tests #117

Closed myeggo closed 6 years ago

myeggo commented 7 years ago

Please help. when mvn package on spatial-framework-for-hadoop failed on Spatial JSON Utilities and I am using mvn 3.3.9 Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T11:41:47-05:00) Maven home: /usr/share/apache-maven Java version: 1.7.0_121, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.121.x86_64/jre Default locale: en_US, platform encoding: ISO-8859-1 OS name: "linux", version: "2.6.32-642.1.1.el6.x86_64", arch: "amd64", family: "unix"

[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Spatial Framework for Hadoop ....................... SUCCESS [ 1.423 s] [INFO] Hive Spatial Framework ............................. SUCCESS [ 37.010 s] [INFO] Spatial JSON Utilities ............................. FAILURE [ 3.630 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 42.244 s [INFO] Finished at: 2016-11-16T15:11:00-05:00 [INFO] Final Memory: 47M/501M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project spatial-sdk-json: There are test failures. [ERROR] [ERROR] Please refer to /opt/gis_tools/spatial-framework-for-hadoop-master/json/target/surefire-reports for the individual test results. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :spatial-sdk-json

myeggo commented 7 years ago

More error information in TEST-com.esri.json.hadoop.TestUnenclosedEsriJsonRecordMrv1.xml

java.lang.AssertionError: array lengths differed, expected.length=2 actual.length=1 at org.junit.Assert.fail(Assert.java:88) at org.junit.internal.ComparisonCriteria.assertArraysAreSameLength(ComparisonCriteria.java:71) at org.junit.internal.ComparisonCriteria.arrayEquals(ComparisonCriteria.java:32) at org.junit.Assert.internalArrayEquals(Assert.java:473) at org.junit.Assert.assertArrayEquals(Assert.java:369) at org.junit.Assert.assertArrayEquals(Assert.java:380) at com.esri.json.hadoop.TestUnenclosedEsriJsonRecordMrv1.TestCharacters(TestUnenclosedEsriJsonRecordMrv1.java:214) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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:103) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
myeggo commented 7 years ago

The right error information in TEST-com.esri.json.hadoop.TestUnenclosedEsriJsonRecordMrv1.xml as following

java.lang.AssertionError: array lengths differed, expected.length=2 actual.length=1 at org.junit.Assert.fail(Assert.java:88) at org.junit.internal.ComparisonCriteria.assertArraysAreSameLength(ComparisonCriteria.java:71) at org.junit.internal.ComparisonCriteria.arrayEquals(ComparisonCriteria.java:32) at org.junit.Assert.internalArrayEquals(Assert.java:473) at org.junit.Assert.assertArrayEquals(Assert.java:369) at org.junit.Assert.assertArrayEquals(Assert.java:380) at com.esri.json.hadoop.TestUnenclosedEsriJsonRecordMrv1.TestCharacters(TestUnenclosedEsriJsonRecordMrv1.java:214) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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:103) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
randallwhitman commented 7 years ago

For me on CentOS-6.7, mvn clean package passed all tests with Java 1.7.0.95 and Maven 3.3.3

randallwhitman commented 7 years ago

In pom.xml did you change anything about:

    <java.source.version>1.6</java.source.version>
    <java.target.version>1.6</java.target.version>
randallwhitman commented 7 years ago

Are you using Esri JSON format and MapRed API v1? If not you could build with mvn package -DskipTests.

myeggo commented 7 years ago

Yes, I did change it to 1.7 but still getting the same error.

From: Randall Whitman [mailto:notifications@github.com] Sent: Wednesday, November 16, 2016 7:18 PM To: Esri/spatial-framework-for-hadoop spatial-framework-for-hadoop@noreply.github.com Cc: Garry Chen gc92@cornell.edu; Author author@noreply.github.com Subject: Re: [Esri/spatial-framework-for-hadoop] mvn package filed (#117)

In pom.xml did you change anything about:

<java.source.version>1.6</java.source.version>

<java.target.version>1.6</java.target.version>

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Esri/spatial-framework-for-hadoop/issues/117#issuecomment-261115488, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AUPJEltYpkDecQUVH1LgsaNdDFtYg8j9ks5q-51JgaJpZM4K0ads.

myeggo commented 7 years ago

Yes, I need to use JSON format because all my spatial data will be in JSON format.

From: Randall Whitman [mailto:notifications@github.com] Sent: Wednesday, November 16, 2016 7:28 PM To: Esri/spatial-framework-for-hadoop spatial-framework-for-hadoop@noreply.github.com Cc: Garry Chen gc92@cornell.edu; Author author@noreply.github.com Subject: Re: [Esri/spatial-framework-for-hadoop] mvn package - error in JSON tests (#117)

Are you using Esri JSON format and MapRed API v1? If not you could build with mvn package -DskipTests.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Esri/spatial-framework-for-hadoop/issues/117#issuecomment-261117206, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AUPJEr3Cwn0ixYX1gHS2JzytVTiIGupsks5q-5-sgaJpZM4K0ads.

randallwhitman commented 7 years ago

I built successfully with no change to pom.xml.

randallwhitman commented 7 years ago

Is building from source a requirement for you? We now have pre-built release v1.2.0.