reference-apps icon indicating copy to clipboard operation
reference-apps copied to clipboard

Compile error in Renderer.java from Log Analyzer from IOUtils

Open XorBiTangent opened this issue 10 years ago • 4 comments

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.

XorBiTangent avatar Jan 24 '15 00:01 XorBiTangent

Getting the same error.

harikrishnag avatar Jan 26 '15 01:01 harikrishnag

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>

vidaha avatar Feb 06 '15 20:02 vidaha

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>

XorBiTangent avatar Feb 06 '15 21:02 XorBiTangent

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

  • --class "com.databricks.apps.logs.LogAnalyzerAppMain"
    
  • --master local[4]
    
  • target/uber-log-analyzer-1.0.jar
    
  • --logs_directory /tmp/logs
    
  • --output_html_file /tmp/log_stats.html
    

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

vnkmr7620 avatar Sep 02 '15 09:09 vnkmr7620