[ 
https://issues.apache.org/jira/browse/SPARK-20815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16020656#comment-16020656
 ] 

Felix Cheung edited comment on SPARK-20815 at 5/23/17 4:48 AM:
---------------------------------------------------------------

[~srowen] could you help add jrshust to contributor list? I couldn't assign 
this JIRA to him. Thanks!


was (Author: felixcheung):
[~srowen] could you help add jrshust to contributor list? I couldn't assign 
this JIRA to him.

> 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
>             Fix For: 2.2.0, 2.3.0
>
>
> 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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to