java.util.NoSuchElementException: key not found: StructType(StructField(user,IntegerType,false), StructField(product,IntegerType,false), StructField(rating,DoubleType,false))


Samebug tips1

Check if the field you try to read really exists in the database. If it is optional, just use com.mongodb.casbah.commons.MongoDBObject#getAs


10 months ago

Solutions on the web284

Solution icon of stackoverflow
key not found: StructType(StructField(user,IntegerType,false), StructField(product,IntegerType,false), StructField(rating,DoubleType,false))

Solution icon of googlegroups
via Google Groups by Raman Gupta, 1 year ago
key not found: Actor[akka://ClusterSystem/user/sharding/ AuthorListing#-1841768893]

Solution icon of github
key not found: Actor[akka://xyz-service/user/sharding/xyz#511916697]

Solution icon of github
via GitHub by Rokshan2016
, 3 weeks ago
key not found: null

Solution icon of github
via GitHub by moldos
, 1 year ago
key not found: fontset_name

Solution icon of github
via GitHub by mhyee
, 10 months ago
key not found: tmp736602445

Solution icon of github
via GitHub by koooge
, 11 months ago
key not found: mode

Solution icon of github
key not found: secret

Solution icon of github
key not found: system_dyspnoeacodes

Solution icon of github
key not found: metadata_objects

Stack trace

java.util.NoSuchElementException: key not found: StructType(StructField(user,IntegerType,false), StructField(product,IntegerType,false), StructField(rating,DoubleType,false))
	at scala.collection.MapLike$class.default(MapLike.scala:228)
	at scala.collection.AbstractMap.default(Map.scala:59)
	at scala.collection.MapLike$class.apply(MapLike.scala:141)
	at scala.collection.AbstractMap.apply(Map.scala:59)
	at org.apache.spark.h2o.utils.ReflectionUtils$.vecTypeFor(ReflectionUtils.scala:132)
	at org.apache.spark.h2o.converters.SparkDataFrameConverter$$anonfun$3.apply(SparkDataFrameConverter.scala:68)
	at org.apache.spark.h2o.converters.SparkDataFrameConverter$$anonfun$3.apply(SparkDataFrameConverter.scala:68)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
	at scala.collection.Iterator$class.foreach(Iterator.scala:893)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
	at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
	at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
	at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
	at scala.collection.AbstractTraversable.map(Traversable.scala:104)
	at org.apache.spark.h2o.converters.SparkDataFrameConverter$.toH2OFrame(SparkDataFrameConverter.scala:68)
	at org.apache.spark.h2o.H2OContext.asH2OFrame(H2OContext.scala:132)
	at org.apache.spark.h2o.H2OContext.asH2OFrame(H2OContext.scala:130)
	at com.poc.sample.RecommendataionAlgo$.main(RecommendataionAlgo.scala:54)
	at com.poc.sample.RecommendataionAlgo.main(RecommendataionAlgo.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

2 times, 4 weeks ago
2 times, 1 month ago
17 times, 4 months ago
3 times, 5 months ago
Once, 5 months ago
14 more bugmates