I want to put my Java Spark application in a container Docker. To do this I use Maven to create a Fat Jar. When I run the application from Intellij it works fine, but when I run the Jar from terminal using java -jar <name_jar> it crashes after a few second with the following error: org.apache.spark.SparkException: Unable to create database default as failed to create its directory file: ... /spark-warehouse.
The only difference between the stacktraces is that just before crashing in terminal stacktrace appear this WARN: WARN SharedState: URL.setURLStreamHandlerFactory failed to set FsUrlStreamHandlerFactory.
I searched for information on the Internet, but I found nothing. Anyone knows what's the problem?
P.S.: I used (in both cases) openjdk version "1.8.0_292"