[
https://issues.apache.org/jira/browse/CALCITE-2425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
sathishkumar updated CALCITE-2425:
----------------------------------
Priority: Major (was: Minor)
> Calcite Connection Issue - Not able to connect to local mongodb
> ---------------------------------------------------------------
>
> Key: CALCITE-2425
> URL: https://issues.apache.org/jira/browse/CALCITE-2425
> Project: Calcite
> Issue Type: Bug
> Reporter: sathishkumar
> Assignee: Julian Hyde
> Priority: Major
>
> sqlline version 1.3.0
> sqlline> !connect
> jdbc:calcite:schemaFactory=org.apache.calcite.adapter.mongodb.MongoSchemaFactory;
> schema.host=localhost; schema.database=test;
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in
> [jar:file:/C:/Sathish_rfpio/softwares/apache-calcite-1.16.0-src/apache-calcite-1.16.0-src/target/dependencies/slf4j-log4j12-1.7.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/C:/Sathish_rfpio/softwares/apache-calcite-1.16.0-src/apache-calcite-1.16.0-src/core/target/dependencies/slf4j-log4j12-1.7.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/C:/Sathish_rfpio/softwares/apache-calcite-1.16.0-src/apache-calcite-1.16.0-src/cassandra/target/dependencies/slf4j-log4j12-1.7.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/C:/Sathish_rfpio/softwares/apache-calcite-1.16.0-src/apache-calcite-1.16.0-src/druid/target/dependencies/slf4j-log4j12-1.7.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/C:/Sathish_rfpio/softwares/apache-calcite-1.16.0-src/apache-calcite-1.16.0-src/geode/target/dependencies/slf4j-log4j12-1.7.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/C:/Sathish_rfpio/softwares/apache-calcite-1.16.0-src/apache-calcite-1.16.0-src/mongodb/target/dependencies/slf4j-log4j12-1.7.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/C:/Sathish_rfpio/softwares/apache-calcite-1.16.0-src/apache-calcite-1.16.0-src/server/target/dependencies/slf4j-log4j12-1.7.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/C:/Sathish_rfpio/softwares/apache-calcite-1.16.0-src/apache-calcite-1.16.0-src/spark/target/dependencies/slf4j-log4j12-1.7.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/C:/Sathish_rfpio/softwares/apache-calcite-1.16.0-src/apache-calcite-1.16.0-src/splunk/target/dependencies/slf4j-log4j12-1.7.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.
> SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
> Connecting to
> jdbc:calcite:schemaFactory=org.apache.calcite.adapter.mongodb.MongoSchemaFactory;
> 2018-07-23 17:32:25,464 [main] INFO - Cluster created with settings
> \{hosts=[127.0.0.1:27017], mode=SINGLE, requiredClusterType=UNKNOWN,
> serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
> java.lang.RuntimeException: Error instantiating JsonCustomSchema(name=adhoc)
> at org.apache.calcite.model.ModelHandler.visit(ModelHandler.java:275)
> at org.apache.calcite.model.JsonCustomSchema.accept(JsonCustomSchema.java:45)
> at org.apache.calcite.model.ModelHandler.visit(ModelHandler.java:196)
> at org.apache.calcite.model.ModelHandler.<init>(ModelHandler.java:88)
> at org.apache.calcite.jdbc.Driver$1.onConnectionInit(Driver.java:104)
> at
> org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:139)
> at sqlline.DatabaseConnection.connect(DatabaseConnection.java:156)
> at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:204)
> at sqlline.Commands.connect(Commands.java:1095)
> at sqlline.Commands.connect(Commands.java:1001)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:38)
> at sqlline.SqlLine.dispatch(SqlLine.java:791)
> at sqlline.SqlLine.begin(SqlLine.java:668)
> at sqlline.SqlLine.start(SqlLine.java:373)
> at sqlline.SqlLine.main(SqlLine.java:265)
> Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException:
> databaseName can not be null
> at org.apache.calcite.adapter.mongodb.MongoSchema.<init>(MongoSchema.java:55)
> at
> org.apache.calcite.adapter.mongodb.MongoSchemaFactory.create(MongoSchemaFactory.java:55)
> at org.apache.calcite.model.ModelHandler.visit(ModelHandler.java:270)
> ... 18 more
> Caused by: java.lang.IllegalArgumentException: databaseName can not be null
> at com.mongodb.assertions.Assertions.notNull(Assertions.java:37)
> at
> com.mongodb.MongoNamespace.checkDatabaseNameValidity(MongoNamespace.java:48)
> at com.mongodb.MongoDatabaseImpl.<init>(MongoDatabaseImpl.java:54)
> at com.mongodb.MongoClient.getDatabase(MongoClient.java:412)
> at org.apache.calcite.adapter.mongodb.MongoSchema.<init>(MongoSchema.java:53)
> ... 20 more
> 0: jdbc:calcite:schemaFactory=org.apache.calc> 2018-07-23 17:32:25,524
> [cluster-ClusterId\{value='5b55c3d1c572266244481f2f',
> description='null'}-127.0.0.1:27017] INFO - Opened connection
> [connectionId\{localValue:1, serverValue:22}] to 127.0.0.1:27017
> 2018-07-23 17:32:25,527 [cluster-ClusterId\{value='5b55c3d1c572266244481f2f',
> description='null'}-127.0.0.1:27017] INFO - Monitor thread successfully
> connected to server with description
> ServerDescription\{address=127.0.0.1:27017, type=STANDALONE, state=CONNECTED,
> ok=true, version=ServerVersion{versionList=[3, 4, 9]}, minWireVersion=0, m
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)