You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "WEI PENG (JIRA)" <ji...@apache.org> on 2018/09/15 04:44:00 UTC

[jira] [Created] (SPARK-25435) df = sqlContext.read.json("examples/src/main/resources/people.json")

WEI PENG created SPARK-25435:
--------------------------------

             Summary: df = sqlContext.read.json("examples/src/main/resources/people.json")
                 Key: SPARK-25435
                 URL: https://issues.apache.org/jira/browse/SPARK-25435
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 2.3.1
            Reporter: WEI PENG


at org.apache.spark.sql.execution.QueryExecution.analyzed(QueryExecution
.scala:55)
 at org.apache.spark.sql.execution.QueryExecution.assertAnalyzed(QueryExe
cution.scala:47)
 at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:74)
 at org.apache.spark.sql.SparkSession.baseRelationToDataFrame(SparkSessio
n.scala:431)
 at org.apache.spark.sql.execution.datasources.json.TextInputJsonDataSour
ce$.createBaseDataset(JsonDataSource.scala:110)
 at org.apache.spark.sql.execution.datasources.json.TextInputJsonDataSour
ce$.infer(JsonDataSource.scala:95)
 at org.apache.spark.sql.execution.datasources.json.JsonDataSource.inferS
chema(JsonDataSource.scala:63)
 at org.apache.spark.sql.execution.datasources.json.JsonFileFormat.inferS
chema(JsonFileFormat.scala:57)
 at org.apache.spark.sql.execution.datasources.DataSource$$anonfun$8.appl
y(DataSource.scala:202)
 at org.apache.spark.sql.execution.datasources.DataSource$$anonfun$8.appl
y(DataSource.scala:202)
 at scala.Option.orElse(Option.scala:289)
 at org.apache.spark.sql.execution.datasources.DataSource.getOrInferFileF
ormatSchema(DataSource.scala:201)
 at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation
(DataSource.scala:392)
 at org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.sca
la:239)
 at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:227)
 at org.apache.spark.sql.DataFrameReader.json(DataFrameReader.scala:397)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 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:238)
 at java.lang.Thread.run(Thread.java:745)
Caused by: ERROR XJ040: Failed to start database 'metastore_db' with class loade
r org.apache.spark.sql.hive.client.IsolatedClientLoader$$anon$1@2604c310, see th
e next exception for details.
 at org.apache.derby.iapi.error.StandardException.newException(Unknown So
urce)
 at org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAc
rossDRDA(Unknown Source)
 ... 123 more
Caused by: ERROR XSDB6: Another instance of Derby may have already booted the da
tabase C:\Users\WEI\metastore_db.
 at org.apache.derby.iapi.error.StandardException.newException(Unknown So
urce)
 at org.apache.derby.iapi.error.StandardException.newException(Unknown So
urce)
 at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.privGetJBMSL
ockOnDB(Unknown Source)
 at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.run(Unknown
Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.getJBMSLockO
nDB(Unknown Source)
 at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.boot(Unknown
 Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Sourc
e)
 at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknow
n Source)
 at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknow
n Source)
 at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unkn
own Source)
 at org.apache.derby.impl.store.raw.RawStore$6.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.derby.impl.store.raw.RawStore.bootServiceModule(Unknown So
urce)
 at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Sourc
e)
 at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknow
n Source)
 at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknow
n Source)
 at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unkn
own Source)
 at org.apache.derby.impl.store.access.RAMAccessManager$5.run(Unknown Sou
rce)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.derby.impl.store.access.RAMAccessManager.bootServiceModule
(Unknown Source)
 at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Sour
ce)
 at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Sourc
e)
 at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknow
n Source)
 at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknow
n Source)
 at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unkn
own Source)
 at org.apache.derby.impl.db.BasicDatabase$5.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.derby.impl.db.BasicDatabase.bootServiceModule(Unknown Sour
ce)
 at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
 at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Sourc
e)
 at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknow
n Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderServi
ce(Unknown Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndSta
rtService(Unknown Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentSer
vice(Unknown Source)
 at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService
(Unknown Source)
 at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
 at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.derby.impl.jdbc.EmbedConnection.startPersistentService(Unk
nown Source)
 ... 120 more
------

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:62)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
 at com.jolbox.bonecp.PoolUtil.generateSQLException(PoolUtil.java:192)
 at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:422)
 at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.jav
a:120)
 at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionIm
pl.getConnection(ConnectionFactoryImpl.java:501)
 at org.datanucleus.store.rdbms.RDBMSStoreManager.<init>(RDBMSStoreManage
r.java:298)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:62)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
 at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExten
sion(NonManagedPluginRegistry.java:631)
 at org.datanucleus.plugin.PluginManager.createExecutableExtension(Plugin
Manager.java:301)
 at org.datanucleus.NucleusContext.createStoreManagerForProperties(Nucleu
sContext.java:1187)
 at org.datanucleus.NucleusContext.initialise(NucleusContext.java:356)
 at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfigurat
ion(JDOPersistenceManagerFactory.java:775)
 ... 95 more
Caused by: java.sql.SQLException: Failed to start database 'metastore_db' with c
lass loader org.apache.spark.sql.hive.client.IsolatedClientLoader$$anon$1@2604c3
10, see the next exception for details.
 at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknow
n Source)
 at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknow
n Source)
 at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
 at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Sourc
e)
 at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
 at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
 at org.apache.derby.jdbc.InternalDriver$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(Unknown So
urce)
 at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
 at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
 at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
 at java.sql.DriverManager.getConnection(DriverManager.java:664)
 at java.sql.DriverManager.getConnection(DriverManager.java:208)
 at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:361)

at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:416)
 ... 107 more
Caused by: ERROR XJ040: Failed to start database 'metastore_db' with class loade
r org.apache.spark.sql.hive.client.IsolatedClientLoader$$anon$1@2604c310, see th
e next exception for details.
 at org.apache.derby.iapi.error.StandardException.newException(Unknown So
urce)
 at org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAc
rossDRDA(Unknown Source)
 ... 123 more
Caused by: ERROR XSDB6: Another instance of Derby may have already booted the da
tabase C:\Users\WEI\metastore_db.
 at org.apache.derby.iapi.error.StandardException.newException(Unknown So
urce)
 at org.apache.derby.iapi.error.StandardException.newException(Unknown So
urce)
 at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.privGetJBMSL
ockOnDB(Unknown Source)
 at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.run(Unknown
Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.getJBMSLockO
nDB(Unknown Source)
 at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.boot(Unknown
 Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Sourc
e)
 at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknow
n Source)
 at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknow
n Source)
 at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unkn
own Source)
 at org.apache.derby.impl.store.raw.RawStore$6.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.derby.impl.store.raw.RawStore.bootServiceModule(Unknown So
urce)
 at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Sourc
e)
 at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknow
n Source)
 at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknow
n Source)
 at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unkn
own Source)
 at org.apache.derby.impl.store.access.RAMAccessManager$5.run(Unknown Sou
rce)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.derby.impl.store.access.RAMAccessManager.bootServiceModule
(Unknown Source)
 at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Sour
ce)
 at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Sourc
e)
 at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknow
n Source)
 at org.apache.derby.impl.services.monitor.FileMonitor.startModule(Unknow
n Source)
 at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unkn
own Source)
 at org.apache.derby.impl.db.BasicDatabase$5.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.derby.impl.db.BasicDatabase.bootServiceModule(Unknown Sour
ce)
 at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
 at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Sourc
e)
 at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknow
n Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderServi
ce(Unknown Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndSta
rtService(Unknown Source)
 at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentSer
vice(Unknown Source)
 at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService
(Unknown Source)
 at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
 at org.apache.derby.impl.jdbc.EmbedConnection$4.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.derby.impl.jdbc.EmbedConnection.startPersistentService(Unk
nown Source)
 ... 120 more


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "C:\spark\python\pyspark\sql\readwriter.py", line 261, in json
 return self._df(self._jreader.json(self._spark._sc._jvm.PythonUtils.toSeq(pa
th)))
 File "C:\spark\python\lib\py4j-0.10.7-src.zip\py4j\java_gateway.py", line 1257
, in __call__
 File "C:\spark\python\pyspark\sql\utils.py", line 69, in deco
 raise AnalysisException(s.split(': ', 1)[1], stackTrace)
pyspark.sql.utils.AnalysisException: 'java.lang.RuntimeException: java.lang.Runt
imeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHi
veMetaStoreClient;'
>>>



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org