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

Apache Calcite is not working in Web Application

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • None
    • 1.11.0
    • None
    • None

    Description

      I'm using Apache Calcite in My Project to do CSV,Excel and Other Database management. Its working when i execute through main method but its giving an error while executing through web service

      private final java.util.List relClasses;
        public final org.apache.calcite.rel.metadata.RelMdCollation provider0;
        public GeneratedMetadataHandler_Collation(java.util.List relClasses,
            org.apache.calcite.rel.metadata.RelMdCollation provider0) {
          this.relClasses = relClasses;
          this.provider0 = provider0;
        }
        public org.apache.calcite.rel.metadata.MetadataDef getDef() {
          return org.apache.calcite.rel.metadata.BuiltInMetadata$Collation.DEF;
        }
        public com.google.common.collect.ImmutableList collations(
            org.apache.calcite.rel.RelNode r,
            org.apache.calcite.rel.metadata.RelMetadataQuery mq) {
          final java.util.List key = org.apache.calcite.runtime.FlatLists.of(org.apache.calcite.rel.metadata.BuiltInMetadata$Collation.DEF, r);
          final Object v = mq.map.get(key);
          if (v != null) {
            if (v == org.apache.calcite.rel.metadata.NullSentinel.ACTIVE) {
              throw org.apache.calcite.rel.metadata.CyclicMetadataException.INSTANCE;
            }
            return (com.google.common.collect.ImmutableList) v;
          }
          mq.map.put(key,org.apache.calcite.rel.metadata.NullSentinel.ACTIVE);
          try {
            final com.google.common.collect.ImmutableList x = collations_(r, mq);
            mq.map.put(key, x);
            return x;
          } catch (org.apache.calcite.rel.metadata.JaninoRelMetadataProvider$NoHandler e) {
            mq.map.remove(key);
            throw e;
          }
        }
      
        private com.google.common.collect.ImmutableList collations_(
            org.apache.calcite.rel.RelNode r,
            org.apache.calcite.rel.metadata.RelMetadataQuery mq) {
          switch (relClasses.indexOf(r.getClass())) {
          default:
            return provider0.collations((org.apache.calcite.rel.RelNode) r, mq);
          case 2:
            return provider0.collations((org.apache.calcite.plan.volcano.RelSubset) r, mq);
          case 3:
            return collations(((org.apache.calcite.plan.hep.HepRelVertex) r).getCurrentRel(), mq);
          case 10:
          case 25:
          case 34:
            return provider0.collations((org.apache.calcite.rel.core.Filter) r, mq);
          case 14:
          case 26:
          case 38:
            return provider0.collations((org.apache.calcite.rel.core.Project) r, mq);
          case 15:
          case 39:
            return provider0.collations((org.apache.calcite.rel.core.Sort) r, mq);
          case 18:
          case 28:
          case 42:
          case 51:
            return provider0.collations((org.apache.calcite.rel.core.TableScan) r, mq);
          case 20:
          case 44:
            return provider0.collations((org.apache.calcite.rel.core.Values) r, mq);
          case 21:
          case 45:
            return provider0.collations((org.apache.calcite.rel.core.Window) r, mq);
          case -1:
            throw new org.apache.calcite.rel.metadata.JaninoRelMetadataProvider$NoHandler(r.getClass());
          }
        }
      
      java.sql.SQLException: Error while executing SQL "select * from "EXCEL.Sheet1"."dm_source_10"": org.codehaus.commons.compiler.CompileException: Line 1, Column 0: package org.apache.calcite.rel.metadata does not exist (compiler.err.doesnt.exist)
      	at org.apache.calcite.avatica.Helper.createException(Helper.java:56)
      	at org.apache.calcite.avatica.Helper.createException(Helper.java:41)
      	at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:147)
      	at org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:208)
      	at com.nanobi.workflow.Test.calcite(Test.java:33)
      	at com.nanobi.workflow.TaskService.getColMember(TaskService.java:2821)
      	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:497)
      	at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
      	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
      	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:167)
      	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:94)
      	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
      	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
      	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:122)
      	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:211)
      	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
      	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:154)
      	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:129)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:187)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:115)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:166)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
      	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
      	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.RuntimeException: org.codehaus.commons.compiler.CompileException: Line 1, Column 0: package org.apache.calcite.rel.metadata does not exist (compiler.err.doesnt.exist)
      	at com.google.common.base.Throwables.propagate(Throwables.java:160)
      	at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.load3(JaninoRelMetadataProvider.java:361)
      	at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.access$000(JaninoRelMetadataProvider.java:94)
      	at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider$1.load(JaninoRelMetadataProvider.java:113)
      	at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider$1.load(JaninoRelMetadataProvider.java:110)
      	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
      	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
      	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
      	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
      	at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
      	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
      	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
      	at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.create(JaninoRelMetadataProvider.java:448)
      	at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.revise(JaninoRelMetadataProvider.java:460)
      	at org.apache.calcite.rel.metadata.RelMetadataQuery.revise(RelMetadataQuery.java:186)
      	at org.apache.calcite.rel.metadata.RelMetadataQuery.collations(RelMetadataQuery.java:484)
      	at org.apache.calcite.rel.metadata.RelMdCollation.project(RelMdCollation.java:207)
      	at org.apache.calcite.rel.logical.LogicalProject$1.get(LogicalProject.java:117)
      	at org.apache.calcite.rel.logical.LogicalProject$1.get(LogicalProject.java:115)
      	at org.apache.calcite.plan.RelTraitSet.replaceIfs(RelTraitSet.java:238)
      	at org.apache.calcite.rel.logical.LogicalProject.create(LogicalProject.java:113)
      	at org.apache.calcite.rel.logical.LogicalProject.create(LogicalProject.java:103)
      	at org.apache.calcite.rel.core.RelFactories$ProjectFactoryImpl.createProject(RelFactories.java:120)
      	at org.apache.calcite.tools.RelBuilder.project(RelBuilder.java:853)
      	at org.apache.calcite.plan.RelOptUtil.createProject(RelOptUtil.java:2881)
      	at org.apache.calcite.plan.RelOptUtil.createProject(RelOptUtil.java:2839)
      	at org.apache.calcite.plan.RelOptUtil.createProject(RelOptUtil.java:2783)
      	at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectList(SqlToRelConverter.java:3495)
      	at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:665)
      	at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:622)
      	at org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:2852)
      	at org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:556)
      	at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:229)
      	at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:193)
      	at org.apache.calcite.prepare.CalcitePrepareImpl.prepare2_(CalcitePrepareImpl.java:734)
      	at org.apache.calcite.prepare.CalcitePrepareImpl.prepare_(CalcitePrepareImpl.java:597)
      	at org.apache.calcite.prepare.CalcitePrepareImpl.prepareSql(CalcitePrepareImpl.java:567)
      	at org.apache.calcite.jdbc.CalciteConnectionImpl.parseQuery(CalciteConnectionImpl.java:215)
      	at org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:594)
      	at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:613)
      	at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:139)
      	... 45 more
      Caused by: org.codehaus.commons.compiler.CompileException: Line 1, Column 0: package org.apache.calcite.rel.metadata does not exist (compiler.err.doesnt.exist)
      	at org.codehaus.commons.compiler.jdk.SimpleCompiler$2.report(SimpleCompiler.java:125)
      	at com.sun.tools.javac.api.ClientCodeWrapper$WrappedDiagnosticListener.report(ClientCodeWrapper.java:593)
      	at com.sun.tools.javac.util.Log.writeDiagnostic(Log.java:616)
      	at com.sun.tools.javac.util.Log$DefaultDiagnosticHandler.report(Log.java:600)
      	at com.sun.tools.javac.util.Log.report(Log.java:562)
      	at com.sun.tools.javac.comp.Resolve.logResolveError(Resolve.java:3500)
      	at com.sun.tools.javac.comp.Resolve.accessInternal(Resolve.java:2207)
      	at com.sun.tools.javac.comp.Resolve.accessBase(Resolve.java:2250)
      	at com.sun.tools.javac.comp.Attr.selectSym(Attr.java:3367)
      	at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3255)
      	at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1897)
      	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:566)
      	at com.sun.tools.javac.comp.Attr.attribType(Attr.java:628)
      	at com.sun.tools.javac.comp.Attr.attribType(Attr.java:621)
      	at com.sun.tools.javac.comp.Attr.attribBase(Attr.java:776)
      	at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:1072)
      	at com.sun.tools.javac.code.Symbol.complete(Symbol.java:574)
      	at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1037)
      	at com.sun.tools.javac.comp.Enter.complete(Enter.java:493)
      	at com.sun.tools.javac.comp.Enter.main(Enter.java:471)
      	at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:982)
      	at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857)
      	at com.sun.tools.javac.main.Main.compile(Main.java:523)
      	at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
      	at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
      	at org.codehaus.commons.compiler.jdk.SimpleCompiler.cook(SimpleCompiler.java:106)
      	at org.codehaus.commons.compiler.jdk.ClassBodyEvaluator.cook(ClassBodyEvaluator.java:197)
      	at org.codehaus.commons.compiler.jdk.ClassBodyEvaluator.cook(ClassBodyEvaluator.java:108)
      	at org.codehaus.commons.compiler.Cookable.cook(Cookable.java:47)
      	at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.compile(JaninoRelMetadataProvider.java:429)
      	at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.load3(JaninoRelMetadataProvider.java:358)
      	... 84 more
      

      Attachments

        Issue Links

          Activity

            People

              julianhyde Julian Hyde
              prasad.vs Prasad V S
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: