databricks / reference-apps

Spark reference applications
Other
656 stars 342 forks source link

Compile error in Renderer.java from Log Analyzer from IOUtils #53

Open XorBiTangent opened 9 years ago

XorBiTangent commented 9 years ago

I cloned the Databricks project, updated my JDK and JRE to version 8, and got the following compilation error:

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project log-analyzer: Compilation failure [ERROR] ${user}/databricks/reference-apps/logs_analyzer/app/java8/src/main/java/com/databricks/apps/logs/Renderer.java:[19,28] error: no suitable method found for toString(InputStream,Charset)

So I added the dependency to the pom.xml, and downloaded and installed the Apache IOUtils JAR to my local .m2 repository, but I am still getting this same error.

Has anyone seen this before? Any ideas what could be causing it out of the box like this? I didn't remove Java 7, because I have other development work that depends on it, but it is disabled.

harikrishnag commented 9 years ago

Getting the same error.

vidaha commented 9 years ago

Is this the dependency you added to the pom?

    <dependency> <!-- Apache Commons IO -->
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.4</version>
    </dependency>
XorBiTangent commented 9 years ago

This dependency below was the one I added. However, I later discovered that it was a problem in the dependency tree. So I restored the original pom, and I actually ended up being able to build by using a hacky workaround. Something in the dependency tree requires the 2.4 version, but the dependency that is specified is 2.1. So I ended up copying the 2.4 jar into my maven repository under the name of the 2.1 jar, and then it was able to compile. I haven't had time to trace through to find the source of the conflicting dependencies, to determine if it is an included project that is the source of the conflict.

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-io</artifactId>
    <version>2.4</version>
</dependency>
vnkmr7620 commented 9 years ago

i am also getting same error as XorBiTangent error. but i followed vidaha method, now mvn is build successfule after that,

${YOUR_SPARK_HOME}/bin/spark-submit

i found the above commands for execution and i tried and when i opened chrome with localhost it is not showing anything. would you please tell us how to execute after maven build