Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-36422

Examples can't run in IDE directly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.3.0
    • None
    • Examples
    • None

    Description

      I found the examples can't run in IDE(such as Intellij).

      For example,  if run `org.apache.spark.examples.sql.JavaUserDefinedScalar` in IDE, the error message as follows:

      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/spark/sql/SparkSession
        at org.apache.spark.examples.sql.JavaUserDefinedScalar.main(JavaUserDefinedScalar.java:33)
      Caused by: java.lang.ClassNotFoundException: org.apache.spark.sql.SparkSession
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
        ... 1 more
      

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            LuciferYang Yang Jie
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: