Uploaded image for project: 'Talend Component Kit'
  1. Talend Component Kit
  2. TCOMP-2112

[JDBC] discover schema API is failing on production

Apply templateInsert Lucidchart Diagram
    XMLWordPrintable

Details

    • All
    • Small

    Description

      Issue
      The call to the discover schema on a JDBC (snowflake) fails with NoClassDefFoundException in Talend Cloud production EU.

      context
      On Talend Cloud EU, using the dataset API that forward the API to the CloudEngine.

      API called
      The api called is the following

      POST https://tdc.eu.cloud.talend.com/api/v1/action/execute/dataset?lang=en&type=schema&family=Jdbc&action=ACTION_DISCOVER_SCHEMA
      

      The payload is this one but the password has been redacted.

      {
      "id": "23a1b419-dacf-40f3-b138-b56e06598eeb",
      "dataset.connection.authenticationType": "BASIC",
      "dataset.connection.connectionTimeOut": "30",
      "dataset.connection.connectionValidationTimeOut": "10",
      "dataset.connection.database": "INCUBATION",
      "dataset.connection.dbType": "Snowflake",
      "dataset.connection.defineProtocol": "false",
      "dataset.connection.grantType": "CLIENT_CREDENTIALS",
      "dataset.connection.host": "talend.snowflakecomputing.com",
      "dataset.connection.parameters[0].key": "schema",
      "dataset.connection.parameters[0].value": "PUBLIC",
      "dataset.connection.parameters[1].key": "warehouse",
      "dataset.connection.parameters[1].value": "TUJ_WH",
      "dataset.connection.port": "443",
      "dataset.connection.setRawUrl": "false",
      "dataset.connection.userId": "sgandon",
      "dataset.connection.password": "xxxxx:)",
      "dataset.advancedCommon.fetchSize": "1000",
      "dataset.tableName": "PRODUCTS",
      "dataset.$tableName_name": "PRODUCTS"
      }
      

      Errors
      The error payload returned by the API is :

      {
      "timestamp": 1648212644457,
      "status": 500,
      "error": "Internal server error",
      "message": "We've encountered a problem. Action execution failed with: (java.lang.NoClassDefFoundError) org/codehaus/jackson/node/TextNode"
      }
      

      and the stack trace that I found in Kibana is this one

      org.talend.sdk.component.api.exception.ComponentException: (java.lang.NoClassDefFoundError) org/codehaus/jackson/node/TextNode
      	at org.talend.sdk.component.runtime.beam.spi.record.AvroSchemaBuilder.<clinit>(AvroSchemaBuilder.java:43) ~[org.talend.sdk.component.component-runtime-beam-1.41.1.jar:?]
      	at org.talend.sdk.component.runtime.beam.spi.AvroRecordBuilderFactoryProvider$AvroRecordBuilderFactory.newSchemaBuilder(AvroRecordBuilderFactoryProvider.java:71) ~[org.talend.sdk.component.component-runtime-beam-1.41.1.jar:?]
      	at org.talend.components.jdbc.service.UIActionService.guessSchema(UIActionService.java:296) ~[?:?]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_312]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_312]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_312]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_312]
      	at org.talend.sdk.component.runtime.manager.ComponentManager$Updater.lambda$createServiceMeta$35(ComponentManager.java:1539) ~[org.talend.sdk.component.component-runtime-manager-1.41.1.jar:?]
      	at org.talend.sdk.component.runtime.manager.ComponentManager.executeInContainer(ComponentManager.java:975) ~[org.talend.sdk.component.component-runtime-manager-1.41.1.jar:?]
      	at org.talend.sdk.component.runtime.manager.ComponentManager.access$1500(ComponentManager.java:191) ~[org.talend.sdk.component.component-runtime-manager-1.41.1.jar:?]
      	at org.talend.sdk.component.runtime.manager.ComponentManager$Updater.lambda$createServiceMeta$36(ComponentManager.java:1536) ~[org.talend.sdk.component.component-runtime-manager-1.41.1.jar:?]
      	at org.talend.sdk.component.server.front.ActionResourceImpl.lambda$doExecuteLocalAction$2(ActionResourceImpl.java:157) ~[org.talend.sdk.component.component-server-1.41.1.jar:?]
      	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) ~[?:1.8.0_312]
      	at java.util.concurrent.CompletableFuture.asyncSupplyStage(CompletableFuture.java:1618) ~[?:1.8.0_312]
      	at java.util.concurrent.CompletableFuture.supplyAsync(CompletableFuture.java:1843) ~[?:1.8.0_312]
      	at org.talend.sdk.component.server.front.ActionResourceImpl.doExecuteLocalAction(ActionResourceImpl.java:132) ~[org.talend.sdk.component.component-server-1.41.1.jar:?]
      	at org.talend.sdk.component.server.front.ActionResourceImpl.lambda$execute$1(ActionResourceImpl.java:99) ~[org.talend.sdk.component.component-server-1.41.1.jar:?]
      	at java.util.Optional.orElseGet(Optional.java:267) ~[?:1.8.0_312]
      	at org.talend.sdk.component.server.front.ActionResourceImpl.execute(ActionResourceImpl.java:99) ~[org.talend.sdk.component.component-server-1.41.1.jar:?]
      	at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source) ~[?:?]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_312]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_312]
      	at org.apache.webbeans.intercept.AbstractInvocationContext.directProceed(AbstractInvocationContext.java:113) ~[org.apache.openwebbeans.openwebbeans-impl-2.0.23.jar:2.0.23]
      	at org.apache.webbeans.intercept.AbstractInvocationContext.proceed(AbstractInvocationContext.java:106) ~[org.apache.openwebbeans.openwebbeans-impl-2.0.23.jar:2.0.23]
      	at org.apache.webbeans.intercept.InterceptorInvocationContext.proceed(InterceptorInvocationContext.java:78) ~[org.apache.openwebbeans.openwebbeans-impl-2.0.23.jar:2.0.23]
      	at org.talend.sdk.component.server.service.httpurlconnection.NetAuthenticatorController.skipping(NetAuthenticatorController.java:31) [org.talend.sdk.component.component-server-1.41.1.jar:?]
      	at org.talend.sdk.component.server.service.httpurlconnection.NetAuthenticatorController$$OwbNormalScopeProxy0.skipping(org/talend/sdk/component/server/service/httpurlconnection/NetAuthenticatorController.java) [?:?]
      	at org.talend.sdk.component.server.service.httpurlconnection.IgnoreNetAuthenticatorInterceptor.ignore(IgnoreNetAuthenticatorInterceptor.java:46) [org.talend.sdk.component.component-server-1.41.1.jar:?]
      	at sun.reflect.GeneratedMethodAccessor206.invoke(Unknown Source) ~[?:?]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_312]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_312]
      	at org.apache.webbeans.component.InterceptorBean.intercept(InterceptorBean.java:136) [org.apache.openwebbeans.openwebbeans-impl-2.0.23.jar:2.0.23]
      	at org.apache.webbeans.intercept.InterceptorInvocationContext.proceed(InterceptorInvocationContext.java:65) [org.apache.openwebbeans.openwebbeans-impl-2.0.23.jar:2.0.23]
      	at org.apache.webbeans.intercept.DefaultInterceptorHandler.invoke(DefaultInterceptorHandler.java:139) [org.apache.openwebbeans.openwebbeans-impl-2.0.23.jar:2.0.23]
      	at org.talend.sdk.component.server.front.ActionResourceImpl$$OwbInterceptProxy0.execute(org/talend/sdk/component/server/front/ActionResourceImpl.java) [?:?]
      	at org.talend.sdk.component.server.front.ActionResourceImpl$$OwbNormalScopeProxy0.execute(org/talend/sdk/component/server/front/ActionResourceImpl.java) [?:?]
      	at sun.reflect.GeneratedMethodAccessor207.invoke(Unknown Source) ~[?:?]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_312]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_312]
      	at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179) [org.apache.cxf.cxf-core-3.4.5.jar:3.4.5]
      	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) [org.apache.cxf.cxf-core-3.4.5.jar:3.4.5]
      	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201) [org.apache.cxf.cxf-rt-frontend-jaxrs-3.4.5.jar:3.4.5]
      	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104) [org.apache.cxf.cxf-rt-frontend-jaxrs-3.4.5.jar:3.4.5]
      	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59) [org.apache.cxf.cxf-core-3.4.5.jar:3.4.5]
      	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96) [org.apache.cxf.cxf-core-3.4.5.jar:3.4.5]
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) [org.apache.cxf.cxf-core-3.4.5.jar:3.4.5]
      	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [org.apache.cxf.cxf-core-3.4.5.jar:3.4.5]
      	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) [org.apache.cxf.cxf-rt-transports-http-3.4.5.jar:3.4.5]
      	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) [org.apache.cxf.cxf-rt-transports-http-3.4.5.jar:3.4.5]
      	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) [org.apache.cxf.cxf-rt-transports-http-3.4.5.jar:3.4.5]
      	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) [org.apache.cxf.cxf-rt-transports-http-3.4.5.jar:3.4.5]
      	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:225) [org.apache.cxf.cxf-rt-transports-http-3.4.5.jar:3.4.5]
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298) [org.apache.cxf.cxf-rt-transports-http-3.4.5.jar:3.4.5]
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:217) [org.apache.cxf.cxf-rt-transports-http-3.4.5.jar:3.4.5]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:681) [org.apache.meecrowave.meecrowave-specs-api-1.2.12.jar:1.2.12]
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273) [org.apache.cxf.cxf-rt-transports-http-3.4.5.jar:3.4.5]
      	at org.apache.meecrowave.cxf.CxfCdiAutoSetup$1.doFilter(CxfCdiAutoSetup.java:122) [org.apache.meecrowave.meecrowave-core-1.2.12.jar:1.2.12]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [org.apache.tomcat.tomcat-catalina-9.0.54.jar:9.0.54]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [org.apache.tomcat.tomcat-catalina-9.0.54.jar:9.0.54]
      	at org.talend.sdk.component.server.front.filter.encoding.ForceEncoding.doFilter(ForceEncoding.java:34) [org.talend.sdk.component.component-server-1.41.1.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [org.apache.tomcat.tomcat-catalina-9.0.54.jar:9.0.54]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [org.apache.tomcat.tomcat-catalina-9.0.54.jar:9.0.54]
      	at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71) [org.apache.logging.log4j.log4j-web-2.17.1.jar:2.17.1]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [org.apache.tomcat.tomcat-catalina-9.0.54.jar:9.0.54]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [org.apache.tomcat.tomcat-catalina-9.0.54.jar:9.0.54]
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) [org.apache.tomcat.tomcat-catalina-9.0.54.jar:9.0.54]
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [org.apache.tomcat.tomcat-catalina-9.0.54.jar:9.0.54]
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540) [org.apache.tomcat.tomcat-catalina-9.0.54.jar:9.0.54]
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) [org.apache.tomcat.tomcat-catalina-9.0.54.jar:9.0.54]
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [org.apache.tomcat.tomcat-catalina-9.0.54.jar:9.0.54]
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687) [org.apache.tomcat.tomcat-catalina-9.0.54.jar:9.0.54]
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [org.apache.tomcat.tomcat-catalina-9.0.54.jar:9.0.54]
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) [org.apache.tomcat.tomcat-catalina-9.0.54.jar:9.0.54]
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382) [org.apache.tomcat.tomcat-coyote-9.0.54.jar:9.0.54]
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [org.apache.tomcat.tomcat-coyote-9.0.54.jar:9.0.54]
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895) [org.apache.tomcat.tomcat-coyote-9.0.54.jar:9.0.54]
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1722) [org.apache.tomcat.tomcat-coyote-9.0.54.jar:9.0.54]
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [org.apache.tomcat.tomcat-coyote-9.0.54.jar:9.0.54]
      	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [org.apache.tomcat.tomcat-util-9.0.54.jar:9.0.54]
      	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [org.apache.tomcat.tomcat-util-9.0.54.jar:9.0.54]
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [org.apache.tomcat.tomcat-util-9.0.54.jar:9.0.54]
      	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
      Caused by: org.talend.sdk.component.api.exception.ComponentException: (java.lang.ClassNotFoundException) org.codehaus.jackson.node.TextNode
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:387) ~[?:1.8.0_312]
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_312]
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) ~[?:1.8.0_312]
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_312]
      	... 82 more
      

      Attachments

        1. AvroRecordBuilderFactory_classloader.png
          167 kB
          Oleksandr Zhelezniak
        2. jackson_without_mapper_acl.png
          107 kB
          Oleksandr Zhelezniak
        3. TextNodeInPlugin.png
          161 kB
          Oleksandr Zhelezniak
        4. TextNodeToBeLoadedFromAvro.png
          148 kB
          Oleksandr Zhelezniak
        5. workAroundComponentServer.png
          136 kB
          Yves Piel

        Activity

          People

            emmanuel_g emmanuel gallois
            sgandon sebastien gandon
            Axel Catoire, emmanuel gallois, Fabien Desiles
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: