That seems to have been the issue. I switched to OpenJDK 13.0.2 and everything 
worked as expected.

Thanks!

On 9/30/20, 1:20 PM, "Julian Hyde" <jhyde.apa...@gmail.com> wrote:

    I’ve not run Calcite using AdoptOpenJDK, so that would be my chief suspect.
    
    Does this problem occur if you use regular OpenJDK 13?
    
    Note that the runtime is able to find the required classes, it just doesn’t 
like what it finds.
    
    > On Sep 30, 2020, at 11:58 AM, Gramana, Zachary (GE Digital) 
<zachary.gram...@ge.com> wrote:
    > 
    > Hi Everyone,
    > 
    > Try as I might, I am unable to open a model-based connection with sqlline 
(built via `./gradlew buildSqllineClasspath`). I have tried a number of 
different release tags (calcite-1.23.0, calcite-1.24.0, and calcite-1.25.0) and 
even manually bumped sqline to 1.8.0 and 1.7.0--all with the same error (below).
    > 
    > I feel like I am missing something, so I wanted to check here before 
filing an issue. I appreciate any suggestions.
    > 
    > Regards,
    > Zack
    > 
    > ➜  calcite git:(68b02dfd4) ✗ java -version
    > openjdk version "13.0.2" 2020-01-14
    > OpenJDK Runtime Environment AdoptOpenJDK (build 13.0.2+8)
    > OpenJDK 64-Bit Server VM AdoptOpenJDK (build 13.0.2+8, mixed mode, 
sharing)
    > 
    > ➜  calcite git:(68b02dfd4) ✗ ./sqlline
    > Property "url" is required
    > sqlline version 1.9.0
    > sqlline> !connect jdbc:calcite:model=file/src/test/resources/sales.json 
admin admin
    > java.lang.ClassFormatError: Method union in class 
org/apache/calcite/linq4j/ExtendedQueryable has illegal modifiers: 0x1141
    >        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    >        at 
java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
    >        at 
java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
    >        at 
java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:821)
    >        at 
java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719)
    >        at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642)
    >        at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600)
    >        at 
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    >        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    >        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    >        at 
java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
    >        at 
java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
    >        at 
java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:821)
    >        at 
java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719)
    >        at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642)
    >        at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600)
    >        at 
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    >        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    >        at 
org.apache.calcite.jdbc.CalciteJdbc41Factory.newConnection(CalciteJdbc41Factory.java:59)
    >        at 
org.apache.calcite.jdbc.CalciteJdbc41Factory.newConnection(CalciteJdbc41Factory.java:44)
    >        at 
org.apache.calcite.jdbc.CalciteFactory.newConnection(CalciteFactory.java:53)
    >        at 
org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:138)
    >        at sqlline.DatabaseConnection.connect(DatabaseConnection.java:135)
    >        at 
sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:192)
    >        at sqlline.Commands.connect(Commands.java:1364)
    >        at sqlline.Commands.connect(Commands.java:1244)
    >        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    >        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    >        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    >        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    >        at 
sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:38)
    >        at sqlline.SqlLine.dispatch(SqlLine.java:730)
    >        at sqlline.SqlLine.begin(SqlLine.java:541)
    >        at sqlline.SqlLine.start(SqlLine.java:267)
    >        at sqlline.SqlLine.main(SqlLine.java:206)
    > 
    
    

Reply via email to