You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "DeepakVohra (JIRA)" <ji...@apache.org> on 2015/01/30 17:40:35 UTC
[jira] [Comment Edited] (SPARK-5489) KMeans clustering
java.lang.NoSuchMethodError: scala.runtime.IntRef.create
(I)Lscala/runtime/IntRef;
[ https://issues.apache.org/jira/browse/SPARK-5489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14298824#comment-14298824 ]
DeepakVohra edited comment on SPARK-5489 at 1/30/15 4:40 PM:
-------------------------------------------------------------
The issue is with the Maven dependency
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-mllib_2.10</artifactId>
<version>1.2.0</version>
</dependency>
spark-mllib_2.10 does not include the org.apache.spark.mllib.* packages, which it should according to the Maven
http://mvnrepository.com/artifact/org.apache.spark/spark-mllib_2.10/1.2.0
Generates error at import statements:
import org.apache.spark.mllib.clustering.KMeans;
import org.apache.spark.mllib.clustering.KMeansModel;
import org.apache.spark.mllib.linalg.Vector;
import org.apache.spark.mllib.linalg.Vectors;
"The import org.apache.spark.mllib cannot be resolved".
The 2.11 version spark-mllib_2.11 fixes the error but seems to be referring Scala 2.11.
was (Author: dvohra):
The issue is with the Maven dependency
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-mllib_2.10</artifactId>
<version>1.2.0</version>
</dependency>
spark-mllib_2.10 does not include the org.apache.spark.mllib.clustering packages, which it should according to the Maven
http://mvnrepository.com/artifact/org.apache.spark/spark-mllib_2.10/1.2.0
Generates error at import statements:
import org.apache.spark.mllib.clustering.KMeans;
import org.apache.spark.mllib.clustering.KMeansModel;
import org.apache.spark.mllib.linalg.Vector;
import org.apache.spark.mllib.linalg.Vectors;
"The import org.apache.spark.mllib cannot be resolved".
The 2.11 version spark-mllib_2.11 fixes the error but seems to be referring Scala 2.11.
> KMeans clustering java.lang.NoSuchMethodError: scala.runtime.IntRef.create (I)Lscala/runtime/IntRef;
> -----------------------------------------------------------------------------------------------------
>
> Key: SPARK-5489
> URL: https://issues.apache.org/jira/browse/SPARK-5489
> Project: Spark
> Issue Type: Bug
> Components: MLlib
> Affects Versions: 1.2.0
> Environment: Spark 1.2
> Maven
> Reporter: DeepakVohra
>
> The KMeans clustering generates following error, which also seems to be due version mismatch between Scala used for compiling Spark and Scala in Spark 1.2 Maven dependency.
> Exception in thread "main" java.lang.NoSuchMethodError: scala.runtime.IntRef.create
> (I)Lscala/runtime/IntRef;
> at
> org.apache.spark.mllib.clustering.KMeans.initKMeansParallel(KMeans.scala:282)
> at
> org.apache.spark.mllib.clustering.KMeans.runAlgorithm(KMeans.scala:155)
> at
> org.apache.spark.mllib.clustering.KMeans.run(KMeans.scala:132)
> at
> org.apache.spark.mllib.clustering.KMeans$.train(KMeans.scala:352)
> at
> org.apache.spark.mllib.clustering.KMeans$.train(KMeans.scala:362)
> at
> org.apache.spark.mllib.clustering.KMeans.train(KMeans.scala)
> at
> clusterer.kmeans.KMeansClusterer.main(KMeansClusterer.java:35)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org