spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-20815) NullPointerException in RPackageUtils#checkManifestForR
Date Sat, 20 May 2017 07:38:05 GMT

     [ https://issues.apache.org/jira/browse/SPARK-20815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Apache Spark reassigned SPARK-20815:
------------------------------------

    Assignee: Apache Spark

> NullPointerException in RPackageUtils#checkManifestForR
> -------------------------------------------------------
>
>                 Key: SPARK-20815
>                 URL: https://issues.apache.org/jira/browse/SPARK-20815
>             Project: Spark
>          Issue Type: Bug
>          Components: SparkR
>    Affects Versions: 2.1.1
>            Reporter: Andrew Ash
>            Assignee: Apache Spark
>
> Some jars don't have manifest files in them, such as in my case javax.inject-1.jar and
value-2.2.1-annotations.jar
> This causes the below NPE:
> {noformat}
> Exception in thread "main" java.lang.NullPointerException
>         at org.apache.spark.deploy.RPackageUtils$.checkManifestForR(RPackageUtils.scala:95)
>         at org.apache.spark.deploy.RPackageUtils$$anonfun$checkAndBuildRPackage$1$$anonfun$apply$1.apply$mcV$sp(RPackageUtils.scala:180)
>         at org.apache.spark.deploy.RPackageUtils$$anonfun$checkAndBuildRPackage$1$$anonfun$apply$1.apply(RPackageUtils.scala:180)
>         at org.apache.spark.deploy.RPackageUtils$$anonfun$checkAndBuildRPackage$1$$anonfun$apply$1.apply(RPackageUtils.scala:180)
>         at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1322)
>         at org.apache.spark.deploy.RPackageUtils$$anonfun$checkAndBuildRPackage$1.apply(RPackageUtils.scala:202)
>         at org.apache.spark.deploy.RPackageUtils$$anonfun$checkAndBuildRPackage$1.apply(RPackageUtils.scala:175)
>         at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
>         at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
>         at org.apache.spark.deploy.RPackageUtils$.checkAndBuildRPackage(RPackageUtils.scala:175)
>         at org.apache.spark.deploy.SparkSubmit$.prepareSubmitEnvironment(SparkSubmit.scala:311)
>         at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:152)
>         at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:118)
>         at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
> {noformat}
> due to RPackageUtils#checkManifestForR assuming {{jar.getManifest}} is non-null.
> However per the JDK spec it can be null:
> {noformat}
>     /**
>      * Returns the jar file manifest, or <code>null</code> if none.
>      *
>      * @return the jar file manifest, or <code>null</code> if none
>      *
>      * @throws IllegalStateException
>      *         may be thrown if the jar file has been closed
>      * @throws IOException  if an I/O error has occurred
>      */
>     public Manifest getManifest() throws IOException {
>         return getManifestFromReference();
>     }
> {noformat}
> This method should do a null check and return false if the manifest is null (meaning
no R code in that jar)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message