[ https://issues.apache.org/jira/browse/DRILL-6349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16601866#comment-16601866 ]
ASF GitHub Bot commented on DRILL-6349: --------------------------------------- oleg-zinovev commented on a change in pull request #1446: DRILL-6349: Drill JDBC driver fails on Java 1.9+ with NoClassDefFoundError: sun/misc/VM URL: https://github.com/apache/drill/pull/1446#discussion_r214607655 ########## File path: pom.xml ########## @@ -734,6 +735,9 @@ -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -XX:+CMSClassUnloadingEnabled -ea + -Djdk.attach.allowAttachSelf=true + -Duser.language=en Review comment: This tests fails on non-english locale. Main reason is a decimal and thousand separator char. https://drill.apache.org/docs/compiling-drill-from-source/ - I don't see any requirements about locale in documentaion. Maybe it must be an another Bug+PR ? TestDurationFormat.testCompactSecMillis:58->validateDurationFormat:43 expected:<4[,]545s> but was:<4[.]545s> TestDurationFormat.testCompactTwoDigitMilliSec:48->validateDurationFormat:43 expected:<0[,]045s> but was:<0[.]045s> TestFunctionsQuery.testToCharFunction:534 » After matching 0 records, did not... TestSelectivity.testFilterSelectivityOptions » UserRemote PARSE ERROR: Encount... TestVarDecimalFunctions.testCastDecimalDouble:680->BaseTestQuery.testRunAndReturn:341 » Rpc TestVarDecimalFunctions.testCastDoubleDecimal:650->BaseTestQuery.testRunAndReturn:341 » Rpc TestVarDecimalFunctions.testDecimalToChar:731 » at position 0 column '`s1`' m... TestTopNSchemaChanges.testMissingColumn:192 » org.apache.drill.common.excepti... TestTopNSchemaChanges.testNumericTypes:82 » org.apache.drill.common.exception... TestTopNSchemaChanges.testUnionTypes:162 » org.apache.drill.common.exceptions... TestMergeJoinWithSchemaChanges.testNumericStringTypes:192->BaseTestQuery.testRunAndReturn:341 » Rpc TestMergeJoinWithSchemaChanges.testNumericTypes:114->BaseTestQuery.testRunAndReturn:341 » Rpc TestMergeJoinWithSchemaChanges.testOneSideSchemaChanges:348->BaseTestQuery.testRunAndReturn:341 » Rpc TestExternalSort.testNumericTypesLegacy:49->testNumericTypes:113 » org.apache... TestExternalSort.testNumericTypesManaged:44->testNumericTypes:113 » org.apach... TestImageRecordReader.testAviImage:101->createAndQuery:50 » at position 0 col... TestImageRecordReader.testBmpImage:56->createAndQuery:50 » at position 0 colu... TestImageRecordReader.testEpsImage:121->createAndQuery:50 » at position 0 col... TestImageRecordReader.testJpegImage:71->createAndQuery:50 » at position 0 col... TestImageRecordReader.testMovImage:111->createAndQuery:50 » at position 0 col... TestImageRecordReader.testPngImage:81->createAndQuery:50 » at position 0 colu... TestImageRecordReader.testPsdImage:86->createAndQuery:50 » at position 0 colu... ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Drill JDBC driver fails on Java 1.9+ with NoClassDefFoundError: sun/misc/VM > --------------------------------------------------------------------------- > > Key: DRILL-6349 > URL: https://issues.apache.org/jira/browse/DRILL-6349 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC > Affects Versions: 1.13.0 > Environment: 16:23 apache-drill-1.13.0$ uname -a > Darwin bix.local 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST > 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64 > > Reporter: Marc Prud'hommeaux > Assignee: Oleg Zinoviev > Priority: Major > > I'm surprised to be unable to find this issue logged elsewhere, but a quick > search yields nothing. Trying to connect with the JDBC driver raises a > NoClassDefFoundError for sun.misc.VM, which was removed in Java 9. It is > understandable that the full drillbit (or its many dependencies) may have > difficult-to-extract dependencies on some sun.misc.* classes, but the JDBC > driver should be able to be loaded by any JVM. > > Looking at > ./common/src/main/java/org/apache/drill/common/config/DrillConfig.java, it > appears that a quick workaround could be to make sun.misc.VM.maxDirectMemory > called lazily from the one place that uses it: getMaxDirectMemory() > > > > {{}}{{16:21 apache-drill-1.13.0$ > JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk > ./bin/drill-localhost }} > ***Connecting to jdbc:drill:drillbit=localhost* > WARNING: An illegal reflective access operation has occurred > WARNING: Illegal reflective access by > org.apache.calcite.avatica.com.google.protobuf.UnsafeUtil > (file:/Users/marc/Downloads/apache-drill-1.13.0/jars/3rdparty/avatica-1.10.0.jar) > to field java.nio.Buffer.address > WARNING: Please consider reporting this to the maintainers of > org.apache.calcite.avatica.com.google.protobuf.UnsafeUtil > WARNING: Use --illegal-access=warn to enable warnings of further illegal > reflective access operations > WARNING: All illegal access operations will be denied in a future release > {{java.lang.NoClassDefFoundError: sun/misc/VM}} > {{ at > org.apache.drill.common.config.DrillConfig.<clinit>(DrillConfig.java:49)}} > {{ at > org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:155)}} > {{ at > org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:73)}} > {{ at > org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69)}} > {{ at > org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:138)}} > {{ at org.apache.drill.jdbc.Driver.connect(Driver.java:72)}} > {{ at sqlline.DatabaseConnection.connect(DatabaseConnection.java:168)}} > {{ at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:214)}} > {{ at sqlline.Commands.connect(Commands.java:1083)}} > {{ at sqlline.Commands.connect(Commands.java:1015)}} > {{ 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:564)}} > {{ at > sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)}} > {{ at sqlline.SqlLine.dispatch(SqlLine.java:742)}} > {{ at sqlline.SqlLine.initArgs(SqlLine.java:528)}} > {{ at sqlline.SqlLine.begin(SqlLine.java:596)}} > {{ at sqlline.SqlLine.start(SqlLine.java:375)}} > {{ at sqlline.SqlLine.main(SqlLine.java:268)}} > {{Caused by: java.lang.ClassNotFoundException: sun.misc.VM}} > {{ at > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)}} > {{ at > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)}} > {{ at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)}} > {{... 20 more}} > apache drill 1.13.0 > "just drill it" > 0: jdbc:drill:drillbit=localhost> > -- This message was sent by Atlassian JIRA (v7.6.3#76005)