One reason for this error could be, due to conflicting jars (mongodb java
driver jars) in your classpath. Can you check your drill classpath to
verify whether there are multiple versions of mongodb java driver jars n it.

| Another odd thing is when I start drill embedded mode it says "apache
drill 1.0.0" instead of 1.1.0:

Also, I think it is minor bug, and there is a Jira ticket for this.



On Mon, Aug 31, 2015 at 3:51 PM, Vincenzo Selvaggio <[email protected]>
wrote:

> Hi,
>
> I am trying to connect Drill to MongoDB via the storage plugin but I have
> some issues.
>
> When I enable the plugin from the Web UI and I run a simple "show
> databases;" command from the shell, I get the following exception:
>
> 0: jdbc:drill:zk=local> show databases;
> Exception in thread "WorkManager-1"
> com.google.common.util.concurrent.ExecutionError:
> java.lang.NoSuchMethodError:
>
> com.mongodb.MongoClient.listDatabaseNames()Lcom/mongodb/client/MongoIterable;
>     at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2261)
>     at com.google.common.cache.LocalCache.get(LocalCache.java:4000)
>     at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4004)
>     at
>
> com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4874)
>     at
>
> org.apache.drill.exec.store.mongo.schema.MongoSchemaFactory$MongoSchema.getSubSchemaNames(MongoSchemaFactory.java:172)
>     at
>
> org.apache.drill.exec.store.mongo.schema.MongoSchemaFactory$MongoSchema.setHolder(MongoSchemaFactory.java:159)
>     at
>
> org.apache.drill.exec.store.mongo.schema.MongoSchemaFactory.registerSchemas(MongoSchemaFactory.java:127)
>     at
>
> org.apache.drill.exec.store.mongo.MongoStoragePlugin.registerSchemas(MongoStoragePlugin.java:85)
>     at
>
> org.apache.drill.exec.store.StoragePluginRegistry$DrillSchemaFactory.registerSchemas(StoragePluginRegistry.java:330)
>     at
> org.apache.drill.exec.ops.QueryContext.getRootSchema(QueryContext.java:165)
>     at
> org.apache.drill.exec.ops.QueryContext.getRootSchema(QueryContext.java:154)
>     at
> org.apache.drill.exec.ops.QueryContext.getRootSchema(QueryContext.java:142)
>     at
>
> org.apache.drill.exec.ops.QueryContext.getNewDefaultSchema(QueryContext.java:128)
>     at
>
> org.apache.drill.exec.planner.sql.DrillSqlWorker.<init>(DrillSqlWorker.java:91)
>     at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:901)
>     at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:242)
>     at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>     at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>     at java.lang.Thread.run(Thread.java:744)
> Caused by: java.lang.NoSuchMethodError:
>
> com.mongodb.MongoClient.listDatabaseNames()Lcom/mongodb/client/MongoIterable;
>     at
>
> org.apache.drill.exec.store.mongo.schema.MongoSchemaFactory$DatabaseLoader.load(MongoSchemaFactory.java:91)
>     at
>
> org.apache.drill.exec.store.mongo.schema.MongoSchemaFactory$DatabaseLoader.load(MongoSchemaFactory.java:82)
>     at
>
> com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3599)
>     at
> com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2379)
>     at
>
> com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2342)
>     at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2257)
>     ... 18 more
>
> I double checked and I can see the mongo driver in
> jars/3rdparty/mongo-java-driver-3.0.2.jar, but not sure why Drill can't
> find it.
>
> I am using apache-drill-1.1.0 and mongo v3.0.6 on Mac OSX 10.8.
>
> Another odd thing is when I start drill embedded mode it says "apache drill
> 1.0.0" instead of 1.1.0:
> bin/drill-embedded
> 2015-08-31 11:19:46.955 java[1304:f0f] Unable to load realm info from
> SCDynamicStore
> Aug 31, 2015 11:19:54 AM org.glassfish.jersey.server.ApplicationHandler
> initialize
> INFO: Initiating Jersey application, version Jersey: 2.8 2014-04-29
> 01:25:26...
> apache drill 1.0.0
> "what ever the mind of man can conceive and believe, drill can query"
> 0: jdbc:drill:zk=local>
>
> Thanks for your help.
>
> Vincenzo
>



-- 
Kamesh.

Reply via email to