title: Basic pyspark results in Py4JJavaError
body: <p>I am encountering an error for something that was working only 30 minutes ago (and I haven't made any changes).  I am using Spark 2.3.0, and Python 3.5.4.  I have a SparkSession called spark, and I am simply trying to see the list of tables:</p>
  
  <pre><code>spark.catalog.listTables()
  </code></pre>
  
  <p>This is now causing the following error:</p>
  
  <pre><code>---------------------------------------------------------------------------
  Py4JJavaError                             Traceback (most recent call last)
  &lt;ipython-input-9-e71b94cb765f&gt; in &lt;module&gt;()
  ----&gt; 1 spark.catalog.listTables()
  
  ~/spark-2.3.0-bin-hadoop2.7/python/pyspark/sql/catalog.py in listTables(self, dbName)
       82         iter = self._jcatalog.listTables(dbName).toLocalIterator()
       83         tables = []
  ---&gt; 84         while iter.hasNext():
       85             jtable = iter.next()
       86             tables.append(Table(
  
  ~/spark-2.3.0-bin-hadoop2.7/python/lib/py4j-0.10.6-src.zip/py4j/java_gateway.py in __call__(self, *args)
     1158         answer = self.gateway_client.send_command(command)
     1159         return_value = get_return_value(
  -&gt; 1160             answer, self.gateway_client, self.target_id, self.name)
     1161 
     1162         for temp_arg in temp_args:
  
  ~/spark-2.3.0-bin-hadoop2.7/python/pyspark/sql/utils.py in deco(*a, **kw)
       61     def deco(*a, **kw):
       62         try:
  ---&gt; 63             return f(*a, **kw)
       64         except py4j.protocol.Py4JJavaError as e:
       65             s = e.java_exception.toString()
  
  ~/spark-2.3.0-bin-hadoop2.7/python/lib/py4j-0.10.6-src.zip/py4j/protocol.py in get_return_value(answer, gateway_client, target_id, name)
      318                 raise Py4JJavaError(
      319                     "An error occurred while calling {0}{1}{2}.\n".
  --&gt; 320                     format(target_id, ".", name), value)
      321             else:
      322                 raise Py4JError(
  
  Py4JJavaError: An error occurred while calling o33.hasNext.
  : java.lang.IllegalArgumentException
      at org.apache.xbean.asm5.ClassReader.&lt;init&gt;(Unknown Source)
      at org.apache.xbean.asm5.ClassReader.&lt;init&gt;(Unknown Source)
      at org.apache.xbean.asm5.ClassReader.&lt;init&gt;(Unknown Source)
      at org.apache.spark.util.ClosureCleaner$.getClassReader(ClosureCleaner.scala:46)
      at org.apache.spark.util.FieldAccessFinder$$anon$3$$anonfun$visitMethodInsn$2.apply(ClosureCleaner.scala:449)
      at org.apache.spark.util.FieldAccessFinder$$anon$3$$anonfun$visitMethodInsn$2.apply(ClosureCleaner.scala:432)
      at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:733)
      at scala.collection.mutable.HashMap$$anon$1$$anonfun$foreach$2.apply(HashMap.scala:103)
      at scala.collection.mutable.HashMap$$anon$1$$anonfun$foreach$2.apply(HashMap.scala:103)
      at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:230)
      at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:40)
      at scala.collection.mutable.HashMap$$anon$1.foreach(HashMap.scala:103)
      at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:732)
      at org.apache.spark.util.FieldAccessFinder$$anon$3.visitMethodInsn(ClosureCleaner.scala:432)
      at org.apache.xbean.asm5.ClassReader.a(Unknown Source)
      at org.apache.xbean.asm5.ClassReader.b(Unknown Source)
      at org.apache.xbean.asm5.ClassReader.accept(Unknown Source)
      at org.apache.xbean.asm5.ClassReader.accept(Unknown Source)
      at org.apache.spark.util.ClosureCleaner$$anonfun$org$apache$spark$util$ClosureCleaner$$clean$14.apply(ClosureCleaner.scala:262)
      at org.apache.spark.util.ClosureCleaner$$anonfun$org$apache$spark$util$ClosureCleaner$$clean$14.apply(ClosureCleaner.scala:261)
      at scala.collection.immutable.List.foreach(List.scala:381)
      at org.apache.spark.util.ClosureCleaner$.org$apache$spark$util$ClosureCleaner$$clean(ClosureCleaner.scala:261)
      at org.apache.spark.util.ClosureCleaner$.clean(ClosureCleaner.scala:159)
      at org.apache.spark.SparkContext.clean(SparkContext.scala:2292)
      at org.apache.spark.SparkContext.runJob(SparkContext.scala:2066)
      at org.apache.spark.rdd.RDD$$anonfun$toLocalIterator$1.org$apache$spark$rdd$RDD$$anonfun$$collectPartition$1(RDD.scala:954)
      at org.apache.spark.rdd.RDD$$anonfun$toLocalIterator$1$$anonfun$apply$30.apply(RDD.scala:956)
      at org.apache.spark.rdd.RDD$$anonfun$toLocalIterator$1$$anonfun$apply$30.apply(RDD.scala:956)
      at scala.collection.Iterator$$anon$12.nextCur(Iterator.scala:434)
      at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:440)
      at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:439)
      at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:408)
      at scala.collection.convert.Wrappers$IteratorWrapper.hasNext(Wrappers.scala:30)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
      at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
      at py4j.Gateway.invoke(Gateway.java:282)
      at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
      at py4j.commands.CallCommand.execute(CallCommand.java:79)
      at py4j.GatewayConnection.run(GatewayConnection.java:214)
      at java.base/java.lang.Thread.run(Thread.java:844)
  </code></pre>
  
  <p>Calling the toPandas method on a Spark data frame is causing a similar error now, too.  Any help is greatly appreciated!</p>
  
  <p>EDIT: This is all taking place in a Jupyter notebook.</p>