<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.services.s3.AmazonS3Client in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/java-lang-NoClassDefFoundError-Could-not-initialize-class-com/m-p/2456972#M140701</link>
    <description>&lt;P&gt;After researching and testing&lt;/P&gt;
&lt;P&gt;Java version was the same&lt;/P&gt;
&lt;P&gt;I had to load these files into my deploy to make AWS S3 work:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FPenco1666863018_0-1716901783611.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/166982iBFCC6C911CCC9AC0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FPenco1666863018_0-1716901783611.png" alt="FPenco1666863018_0-1716901783611.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 May 2024 13:10:41 GMT</pubDate>
    <dc:creator>FPenco1666863018</dc:creator>
    <dc:date>2024-05-28T13:10:41Z</dc:date>
    <item>
      <title>java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.services.s3.AmazonS3Client</title>
      <link>https://community.qlik.com/t5/Talend-Studio/java-lang-NoClassDefFoundError-Could-not-initialize-class-com/m-p/2454820#M140669</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I am facing an issue with a Talend ESB 8.0.1 job that I have created. The job waits for a request via a tRESTRequest API, retrieves files from AWS S3, and then sends them to another API. Everything works correctly on my local machine: when I run the job and access &lt;A href="http://localhost:8088/attachment" target="_blank"&gt;http://localhost:8088/attachment&lt;/A&gt;, the job runs perfectly.&lt;/P&gt;
&lt;P&gt;My JOB :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="RTWrapperAttachmentToJSON_1.0.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/166536iDB89AA6F9E73116C/image-size/large?v=v2&amp;amp;px=999" role="button" title="RTWrapperAttachmentToJSON_1.0.png" alt="RTWrapperAttachmentToJSON_1.0.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, once deployed in the Runtime "deploy" folder and after sending the API request, I receive the following error:&amp;nbsp;java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.services.s3.AmazonS3Client&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;javax.ws.rs.WebApplicationException: HTTP 500 Internal Server Error
        at rtwrapper.rtwrapperattachmenttojson_1_0.RTWrapperAttachmentToJSON$RestServiceProviderImpl4TalendJob.processRequest(RTWrapperAttachmentToJSON.java:1101)
        at rtwrapper.rtwrapperattachmenttojson_1_0.RTWrapperAttachmentToJSON$RestServiceProviderImpl4TalendJob.handleWrongRequest(RTWrapperAttachmentToJSON.java:1182)
        at rtwrapper.rtwrapperattachmenttojson_1_0.RTWrapperAttachmentToJSON$ExceptionMapper4TalendJobRestService.toResponse(RTWrapperAttachmentToJSON.java:1272)
        at org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper.toResponse(WebApplicationExceptionMapper.java:45)
        at org.apache.cxf.jaxrs.utils.ExceptionUtils.convertFaultToResponse(ExceptionUtils.java:85)
        at org.apache.cxf.jaxrs.utils.JAXRSUtils.convertFaultToResponse(JAXRSUtils.java:1718)
        at org.apache.cxf.jaxrs.JAXRSInvoker.handleFault(JAXRSInvoker.java:371)
        at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:218)
        at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104)
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
        at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265)
        at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:247)
        at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:79)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:190)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
        at org.eclipse.jetty.server.Server.handle(Server.java:516)
        at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
        at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:279)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
        at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:135)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.services.s3.AmazonS3Client
        at com.amazonaws.services.s3.AmazonS3Builder$1.apply(AmazonS3Builder.java:35)
        at com.amazonaws.services.s3.AmazonS3Builder$1.apply(AmazonS3Builder.java:32)
        at com.amazonaws.services.s3.AmazonS3ClientBuilder.build(AmazonS3ClientBuilder.java:64)
        at com.amazonaws.services.s3.AmazonS3ClientBuilder.build(AmazonS3ClientBuilder.java:28)
        at com.amazonaws.client.builder.AwsSyncClientBuilder.build(AwsSyncClientBuilder.java:46)
        at com.amazonaws.services.s3.AmazonS3ClientBuilder.defaultClient(AmazonS3ClientBuilder.java:54)
        at com.amazonaws.services.s3.transfer.TransferManagerBuilder.resolveS3Client(TransferManagerBuilder.java:121)
        at com.amazonaws.services.s3.transfer.TransferManagerBuilder.getParams(TransferManagerBuilder.java:435)
        at com.amazonaws.services.s3.transfer.TransferManagerBuilder.build(TransferManagerBuilder.java:447)
        at rtwrapper.rtwrapperattachmenttojson_1_0.RTWrapperAttachmentToJSON.tS3Get_1Process(RTWrapperAttachmentToJSON.java:4275)
        at rtwrapper.rtwrapperattachmenttojson_1_0.RTWrapperAttachmentToJSON.tRESTRequest_1_LoopProcess(RTWrapperAttachmentToJSON.java:12609)
        at rtwrapper.rtwrapperattachmenttojson_1_0.RTWrapperAttachmentToJSON$RestServiceProviderImpl4TalendJob.processRequest(RTWrapperAttachmentToJSON.java:1050)
        ... 38 more&lt;/LI-CODE&gt;
&lt;P&gt;To resolve this issue, I have already tried the following solutions without success:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Loading the aws-sdk-core and aws-sdk-s3 jars in the deploy folder.&lt;/LI&gt;
&lt;LI&gt;Loading the files in a tLibraryLoad directly in the job, before the S3 connection in a prejob&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Do you have any ideas or suggestions to solve this problem? Any help would be greatly appreciated.&lt;/P&gt;
&lt;P&gt;Thank you in advance!&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 16:22:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/java-lang-NoClassDefFoundError-Could-not-initialize-class-com/m-p/2454820#M140669</guid>
      <dc:creator>FPenco1666863018</dc:creator>
      <dc:date>2024-05-21T16:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.services.s3.AmazonS3Client</title>
      <link>https://community.qlik.com/t5/Talend-Studio/java-lang-NoClassDefFoundError-Could-not-initialize-class-com/m-p/2454950#M140670</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check the Java version on Runtime server, do you have different Java versions locally and on the Runtime server. See this similar &lt;A href="https://community.qlik.com/t5/Design-and-Development/Could-not-initialize-class-com-amazonaws-ClientConfiguration/td-p/2277780" target="_self"&gt;post&lt;/A&gt;, there was a&amp;nbsp;&lt;SPAN&gt;known issue with the AWS SDK and Java 8.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Shicong&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 03:05:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/java-lang-NoClassDefFoundError-Could-not-initialize-class-com/m-p/2454950#M140670</guid>
      <dc:creator>Shicong_Hong</dc:creator>
      <dc:date>2024-05-22T03:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.services.s3.AmazonS3Client</title>
      <link>https://community.qlik.com/t5/Talend-Studio/java-lang-NoClassDefFoundError-Could-not-initialize-class-com/m-p/2455056#M140673</link>
      <description>&lt;P&gt;This error occurs because the version of your aws skd ore and s3 are not compatible between your runtime and your job.&lt;/P&gt;
&lt;P&gt;"Loading into the deploy folder" did you install directly to the karaf the different .jar too ?&lt;BR /&gt;&lt;BR /&gt;Try this command into the Karaf (runtime/bin folder)&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 11.5pt;"&gt;bundle:install -s wrap:file:/opt/TalendRuntime-8.0.1-R2022-10-RT/runtime/jar/aws-java-sdk-core-1.12.315.jar&lt;BR /&gt;You might have to restart the karaf + delete and redeploy the task from TMC&lt;BR /&gt;&lt;BR /&gt;Once done, the tLibraryLoad is not mandatory anymore&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 08:14:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/java-lang-NoClassDefFoundError-Could-not-initialize-class-com/m-p/2455056#M140673</guid>
      <dc:creator>jeoste</dc:creator>
      <dc:date>2024-05-22T08:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.services.s3.AmazonS3Client</title>
      <link>https://community.qlik.com/t5/Talend-Studio/java-lang-NoClassDefFoundError-Could-not-initialize-class-com/m-p/2456972#M140701</link>
      <description>&lt;P&gt;After researching and testing&lt;/P&gt;
&lt;P&gt;Java version was the same&lt;/P&gt;
&lt;P&gt;I had to load these files into my deploy to make AWS S3 work:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FPenco1666863018_0-1716901783611.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/166982iBFCC6C911CCC9AC0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FPenco1666863018_0-1716901783611.png" alt="FPenco1666863018_0-1716901783611.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 13:10:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/java-lang-NoClassDefFoundError-Could-not-initialize-class-com/m-p/2456972#M140701</guid>
      <dc:creator>FPenco1666863018</dc:creator>
      <dc:date>2024-05-28T13:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.services.s3.AmazonS3Client</title>
      <link>https://community.qlik.com/t5/Talend-Studio/java-lang-NoClassDefFoundError-Could-not-initialize-class-com/m-p/2457245#M140702</link>
      <description>&lt;P&gt;Great! Thanks for your feedback and sharing the solution with the community.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 04:41:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/java-lang-NoClassDefFoundError-Could-not-initialize-class-com/m-p/2457245#M140702</guid>
      <dc:creator>Shicong_Hong</dc:creator>
      <dc:date>2024-05-29T04:41:10Z</dc:date>
    </item>
  </channel>
</rss>

