java.lang.ClassCastException using lambda expressions in spark job on remote server

What you have here, is a follow-up error which masks the original error. When lambda instances are serialized, they use writeReplace to dissolve their JRE specific implementation from the persistent form which is a SerializedLambda instance. When the SerializedLambda instance has been restored, its readResolve method will be invoked to reconstitute the appropriate lambda instance. … Read more

java.lang.ClassCastException using lambda expressions in spark job on remote server

What you have here, is a follow-up error which masks the original error. When lambda instances are serialized, they use writeReplace to dissolve their JRE specific implementation from the persistent form which is a SerializedLambda instance. When the SerializedLambda instance has been restored, its readResolve method will be invoked to reconstitute the appropriate lambda instance. … Read more

Where to put static files for Spark Web Framework?

First you have to tell Spark where to search for the static files like this: Spark.staticFiles.location(“/public”); In Spark versions prior to 2.5, you should use: Spark.staticFileLocation(“/public”); Then your project should have a public folder under the resources folder like this /src/main/resources/public/style.css For example I added a style.css file there, so you should then access it … Read more