Have you had a look at https://issues.apache.org/jira/browse/CALCITE-1461 ? The fix version is 1.11.0.
Best regards, Gethin. ________________________________ From: Christian Tzolov <ctzo...@pivotal.io> Sent: 21 November 2016 09:23:51 To: dev@calcite.apache.org Subject: Re: Calcite jdbc driver dependencies Further digging suggests that the root cause of the problem is Janino not being able to resolve its 'org.codehaus.commons.compiler.properties' from the class path. The input stream is resolved to null in the CompilerFactoryFactory#getDefaultCompilerFactory: 'InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("org.codehaus.commons.compiler.properties");' The is is null although the 'org.codehaus.commons.compiler.properties' is available at the root for the uber jdbc jar. Apparently the Thread.currentThread().getContextClassLoader() is relative to something else but the root classpath. Any suggestions will be appreciated :) I've noticed similar issues reported on the Phoenix project. Cheers, Christian On 21 November 2016 at 00:44, Christian Tzolov <ctzo...@pivotal.io> wrote: > The underlying exception causing the "Unable to instantiate java compiler" > seems > to be: > > *Caused by: java.lang.ClassNotFoundException: No implementation of > org.codehaus.commons.compiler is on the class path. Typically, you'd have > 'janino.jar', or 'commons-compiler-jdk.jar', or both on the classpath.* > * at > org.codehaus.commons.compiler.CompilerFactoryFactory.getDefaultCompilerFactory(CompilerFactoryFactory.java:59)* > > * at > org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.compile(JaninoRelMetadataProvider.java:425)* > I've tried to manually add the 'janino.jar' and 'commons-compiler-jdk.jar' > jars as well as excluding them from the uber jdbc jar. But the error is > still there > > On 21 November 2016 at 00:18, Christian Tzolov <ctzo...@pivotal.io> wrote: > >> The uberized jdbc adapter fails with "Unable to instantiate java >> compiler" when i try it with tools like DbVisualizer or SQurriel . >> >> Noticed same error has been discussed in two others thread but there is >> no resolution. In my case the adapter pom contains a single janino-2.7.6 >> dependency (via the calcite-core). >> >> Could this be related to the maven-shade-plugin configuration? >> >> >> On 20 November 2016 at 23:52, Christian Tzolov <ctzo...@pivotal.io> >> wrote: >> >>> FYI, the uber jar jdbc did the job >>> >>> On 20 November 2016 at 22:34, Christian Tzolov <ctzo...@pivotal.io> >>> wrote: >>> >>>> Hi, >>>> >>>> I've been working on Calcite adapter for a nosql datastore. >>>> >>>> The prototype works fine when i test it with the Sqlline command line >>>> tool. But it is not entirely clear how to use it through a jdbc driver from >>>> 3rd party tools. I've read the avatica docs but not sure if i'm getting it >>>> right. >>>> >>>> For the loca jdbc driver case do i need build my adapter as an uber jar >>>> to bundle all necessary dependencies? If so are there any examples around? >>>> >>>> For the remote jdbc mode do i need to create and build a customer >>>> avatica server that pulls my adapters dependencies? >>>> >>>> I am sorry if this question has been answered already >>>> >>>> Cheers, >>>> Christian >>>> >>>> >>> >>> >>> >>> >> >> >