NoClassDefFound : Scala/xml/metadata

SparkUI seems to use a scala package, try adding this dsependency to your pom file to put the scala.xml package on your classpath.

<dependency>
    <groupId>org.scala-lang</groupId>
    <artifactId>scala-xml</artifactId>
    <version>2.11.0-M4</version>
</dependency>

Adding the following dependency fixed the issue for me.

<dependency>
    <groupId>org.scala-lang.modules</groupId>
    <artifactId>scala-xml_2.11</artifactId>
    <version>1.0.6</version>
</dependency>

As your exception's stack trace clearly states, the problem happens when SparkUI tries to build up the Jobs Tab. For that to happen, the JobsTab class (org.apache.spark.ui.jobs.JobsTab) tries to create a page (org.apache.spark.ui.jobs.JobPage) and attach it to itself. If you look into the JobPage source code you will note that it makes heavy use of scala.xml (The Standard Scala XML Library), which you are probably missing.

As already pointed out by other contributors, adding the scala.xml library to the list of your dependencies should fix the problem. At the time of writing, the latest version is 1.2.0 for Scala 2.13 (you can check the Maven repository for updates), hence:

Maven:
<dependency>
    <groupId>org.scala-lang.modules</groupId>
    <artifactId>scala-xml_2.13</artifactId>
    <version>1.2.0</version>
</dependency>

Gradle:
compile group: 'org.scala-lang.modules', name: 'scala-xml_2.13', version: '1.2.0'

SBT:
libraryDependencies += "org.scala-lang.modules" %% "scala-xml" % "1.2.0"