spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Wendell (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SPARK-1703) Warn users if Spark is run on JRE6 but compiled with JDK7
Date Sat, 03 May 2014 07:01:20 GMT
Patrick Wendell created SPARK-1703:
--------------------------------------

             Summary: Warn users if Spark is run on JRE6 but compiled with JDK7
                 Key: SPARK-1703
                 URL: https://issues.apache.org/jira/browse/SPARK-1703
             Project: Spark
          Issue Type: Bug
          Components: Spark Core
            Reporter: Patrick Wendell
            Priority: Blocker
             Fix For: 1.0.0


Right now since the JRE silently swallows the invalid jar, it will produce really confusing
behavior if users hit this. We should check if we are in this situation (either in spark-class
or compute-classpath) and fail with an explicit error.

We can do something like:
{code}
$JAVA_HOME/bin/jar -tf lib/spark-assembly-1.0.0-SNAPSHOT-hadoop1.0.4.jar org/apache/spark/SparkContext
{code}

Which, when a user is running with JRE 6 and a JDK-7-compiled jar will produce:
{code}
java.util.zip.ZipException: invalid CEN header (bad signature)
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:132)
	at java.util.zip.ZipFile.<init>(ZipFile.java:93)
	at sun.tools.jar.Main.list(Main.java:997)
	at sun.tools.jar.Main.run(Main.java:242)
	at sun.tools.jar.Main.main(Main.java:1167)
{code}




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message