当前位置: 首页 > 工具软件 > Quicksql > 使用案例 >

记quicksql遇到的一个坑

谢高峯
2023-12-01

一、错误

java.lang.RuntimeException: java.sql.SQLException: path to '///opt/qsql-0.7.0/../metastore/schema.db': '/opt/qsql-0.7.0/../metastore' does not exist
	at com.qihoo.qsql.metadata.MetadataClient.createConnection(MetadataClient.java:358)
	at com.qihoo.qsql.metadata.MetadataClient.<init>(MetadataClient.java:43)
	at com.qihoo.qsql.metadata.MetadataPostman$MetadataFetcher.transformSchemaFormat(MetadataPostman.java:84)
	at com.qihoo.qsql.metadata.MetadataPostman$MetadataFetcher.access$100(MetadataPostman.java:72)
	at com.qihoo.qsql.metadata.MetadataPostman.lambda$getAssembledSchema$0(MetadataPostman.java:48)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
	at com.qihoo.qsql.metadata.MetadataPostman.getAssembledSchema(MetadataPostman.java:50)
	at com.qihoo.qsql.metadata.MetadataPostman.getCalciteModelSchema(MetadataPostman.java:60)
	at com.qihoo.qsql.launcher.ExecutionDispatcher.loadSchemaForTables(ExecutionDispatcher.java:222)
	at com.qihoo.qsql.launcher.ExecutionDispatcher.main(ExecutionDispatcher.java:108)
Caused by: java.sql.SQLException: path to '///opt/qsql-0.7.0/../metastore/schema.db': '/opt/qsql-0.7.0/../metastore' does not exist
	at org.sqlite.core.CoreConnection.open(CoreConnection.java:192)
	at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:76)
	at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:26)
	at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:24)
	at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:45)
	at org.sqlite.JDBC.createConnection(JDBC.java:114)
	at org.sqlite.JDBC.connect(JDBC.java:88)
	at java.sql.DriverManager.getConnection(DriverManager.java:664)
	at java.sql.DriverManager.getConnection(DriverManager.java:270)
	at com.qihoo.qsql.metadata.MetadataClient.createConnection(MetadataClient.java:354)
	... 15 more

二、解决方案

修改配置文件:/opt/qsql-0.7.0/conf/metadata.properties
把meta.intern.schema.dir改成全路径

meta.intern.schema.dir=/opt/qsql-0.7.0/metastore/schema.db  
 类似资料: