Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2079

[Not working with ES5] java.lang.NoClassDefFoundError: org/apache/logging/log4j/Logger

    Details

      Description

      Initially I had this problem described here:

      http://mail-archives.apache.org/mod_mbox/calcite-issues/201709.mbox/%3CJIRA.13106083.1506702636000.238618.1506710701826@Atlassian.JIRA%3E

      Then I removed every occurrence of Elasticsearch2 in pom.xml and sqlline script and moved on to the current error I am facing which is the following:

      sqlline version 1.3.0
      sqlline> !connect jdbc:calcite:model=elasticsearch5/src/test/resources/model.json admin admin
      java.lang.NoClassDefFoundError: org/apache/logging/log4j/Logger
      	at org.elasticsearch.common.logging.Loggers.getLogger(Loggers.java:101)
      	at org.elasticsearch.common.xcontent.support.AbstractXContentParser.<init>(AbstractXContentParser.java:57)
      	at org.elasticsearch.common.xcontent.json.JsonXContentParser.<init>(JsonXContentParser.java:44)
      	at org.elasticsearch.common.xcontent.json.JsonXContent.createParser(JsonXContent.java:103)
      	at org.elasticsearch.common.settings.Setting.parseableStringToList(Setting.java:848)
      	at org.elasticsearch.common.settings.Setting.lambda$listSetting$27(Setting.java:802)
      	at org.elasticsearch.common.settings.Setting.listSetting(Setting.java:807)
      	at org.elasticsearch.common.settings.Setting.listSetting(Setting.java:802)
      	at org.elasticsearch.common.network.NetworkService.<clinit>(NetworkService.java:50)
      	at org.elasticsearch.client.transport.TransportClient.newPluginService(TransportClient.java:98)
      	at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:126)
      	at org.elasticsearch.client.transport.TransportClient.<init>(TransportClient.java:268)
      	at org.elasticsearch.transport.client.PreBuiltTransportClient.<init>(PreBuiltTransportClient.java:127)
      	at org.elasticsearch.transport.client.PreBuiltTransportClient.<init>(PreBuiltTransportClient.java:113)
      	at org.elasticsearch.transport.client.PreBuiltTransportClient.<init>(PreBuiltTransportClient.java:103)
      	at org.apache.calcite.adapter.elasticsearch5.Elasticsearch5Schema.open(Elasticsearch5Schema.java:119)
      	at org.apache.calcite.adapter.elasticsearch5.Elasticsearch5Schema.<init>(Elasticsearch5Schema.java:74)
      	at org.apache.calcite.adapter.elasticsearch5.Elasticsearch5SchemaFactory.create(Elasticsearch5SchemaFactory.java:56)
      	at org.apache.calcite.model.ModelHandler.visit(ModelHandler.java:270)
      	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(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	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.ClassNotFoundException: org.apache.logging.log4j.Logger
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	... 37 more
      

      I tried adding log4j dependency but didn't help.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julianhyde Julian Hyde
                Reporter:
                lovemeblender Michael Despotopoulos
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: