<?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 Talend DI 6.4.1 Java routine accessing S3 failed with &amp;quot;method not found&amp;quot; error in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Talend-DI-6-4-1-Java-routine-accessing-S3-failed-with-quot/m-p/2293082#M66093</link>
    <description>&lt;P&gt;Hello everyone&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have a problem calling custom Java method which accesses AWS S3 (NoSuchMethodError)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Exception in thread "main" java.lang.NoSuchMethodError: com.amazonaws.SDKGlobalConfiguration.isInRegionOptimizedModeEnabled()Z&lt;/STRONG&gt;&lt;BR /&gt;at com.amazonaws.ClientConfigurationFactory.getConfig(ClientConfigurationFactory.java:35)&lt;BR /&gt;at com.amazonaws.client.builder.AwsClientBuilder.resolveClientConfiguration(AwsClientBuilder.java:163)&lt;BR /&gt;at com.amazonaws.client.builder.AwsClientBuilder.access$000(AwsClientBuilder.java:52)&lt;BR /&gt;at com.amazonaws.client.builder.AwsClientBuilder$SyncBuilderParams.&amp;lt;init&amp;gt;(AwsClientBuilder.java:411)&lt;BR /&gt;at com.amazonaws.client.builder.AwsClientBuilder.getSyncClientParams(AwsClientBuilder.java:354)&lt;BR /&gt;at com.amazonaws.client.builder.AwsSyncClientBuilder.build(AwsSyncClientBuilder.java:46)&lt;BR /&gt;at insightsanalytics.TransferPostgreDynSqlRdsToS3.copyPgSqlToS3(TransferPostgreDynSqlRdsToS3.java:272)&lt;BR /&gt;at insightsanalytics.TransferPostgreDynSqlRdsToS3.copyPgSqlToS3(TransferPostgreDynSqlRdsToS3.java:154)&lt;BR /&gt;at unpackelasticsearchjson.copydatafrompostgresqlrdstoredshift_0_1.CopyDataFromPostgreSQLRDStoRedshift.tPostgresqlInput_1Process(CopyDataFromPostgreSQLRDStoRedshift.java:855)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;--&lt;/P&gt; 
&lt;P&gt;The routine is tested and works outside of Talend.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;When I call it inside &lt;STRONG&gt;tJava&lt;/STRONG&gt;&amp;nbsp;then I get above error:&lt;/P&gt; 
&lt;P&gt;I copied the AWS SDK jar into the Talend area and put the external routine dependency&lt;/P&gt; 
&lt;P&gt;I also explicitly imported the following in &lt;STRONG&gt;tJava:&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;import insightsanalytics.TransferPostgreDynSqlRdsToS3; // my code&lt;BR /&gt;import com.amazonaws.services.s3.*;&lt;BR /&gt;import com.amazonaws.services.s3.AmazonS3;&lt;BR /&gt;import com.amazonaws.services.s3.AmazonS3ClientBuilder;&lt;BR /&gt;import com.amazonaws.AmazonServiceException;&lt;BR /&gt;import com.amazonaws.auth.AWSStaticCredentialsProvider;&lt;BR /&gt;import com.amazonaws.auth.BasicAWSCredentials;&lt;BR /&gt;import com.amazonaws.auth.BasicSessionCredentials;&lt;BR /&gt;import com.amazonaws.AmazonClientException;&lt;BR /&gt;import com.amazonaws.services.s3.model.*;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;--&lt;/P&gt; 
&lt;P&gt;I have run out of ideas, please advise, given Talend DI generates pure Java,&amp;nbsp;is there is a way to get it working ??&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Many thanks!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 09:10:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T09:10:41Z</dc:date>
    <item>
      <title>Talend DI 6.4.1 Java routine accessing S3 failed with "method not found" error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-DI-6-4-1-Java-routine-accessing-S3-failed-with-quot/m-p/2293082#M66093</link>
      <description>&lt;P&gt;Hello everyone&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have a problem calling custom Java method which accesses AWS S3 (NoSuchMethodError)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Exception in thread "main" java.lang.NoSuchMethodError: com.amazonaws.SDKGlobalConfiguration.isInRegionOptimizedModeEnabled()Z&lt;/STRONG&gt;&lt;BR /&gt;at com.amazonaws.ClientConfigurationFactory.getConfig(ClientConfigurationFactory.java:35)&lt;BR /&gt;at com.amazonaws.client.builder.AwsClientBuilder.resolveClientConfiguration(AwsClientBuilder.java:163)&lt;BR /&gt;at com.amazonaws.client.builder.AwsClientBuilder.access$000(AwsClientBuilder.java:52)&lt;BR /&gt;at com.amazonaws.client.builder.AwsClientBuilder$SyncBuilderParams.&amp;lt;init&amp;gt;(AwsClientBuilder.java:411)&lt;BR /&gt;at com.amazonaws.client.builder.AwsClientBuilder.getSyncClientParams(AwsClientBuilder.java:354)&lt;BR /&gt;at com.amazonaws.client.builder.AwsSyncClientBuilder.build(AwsSyncClientBuilder.java:46)&lt;BR /&gt;at insightsanalytics.TransferPostgreDynSqlRdsToS3.copyPgSqlToS3(TransferPostgreDynSqlRdsToS3.java:272)&lt;BR /&gt;at insightsanalytics.TransferPostgreDynSqlRdsToS3.copyPgSqlToS3(TransferPostgreDynSqlRdsToS3.java:154)&lt;BR /&gt;at unpackelasticsearchjson.copydatafrompostgresqlrdstoredshift_0_1.CopyDataFromPostgreSQLRDStoRedshift.tPostgresqlInput_1Process(CopyDataFromPostgreSQLRDStoRedshift.java:855)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;--&lt;/P&gt; 
&lt;P&gt;The routine is tested and works outside of Talend.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;When I call it inside &lt;STRONG&gt;tJava&lt;/STRONG&gt;&amp;nbsp;then I get above error:&lt;/P&gt; 
&lt;P&gt;I copied the AWS SDK jar into the Talend area and put the external routine dependency&lt;/P&gt; 
&lt;P&gt;I also explicitly imported the following in &lt;STRONG&gt;tJava:&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;import insightsanalytics.TransferPostgreDynSqlRdsToS3; // my code&lt;BR /&gt;import com.amazonaws.services.s3.*;&lt;BR /&gt;import com.amazonaws.services.s3.AmazonS3;&lt;BR /&gt;import com.amazonaws.services.s3.AmazonS3ClientBuilder;&lt;BR /&gt;import com.amazonaws.AmazonServiceException;&lt;BR /&gt;import com.amazonaws.auth.AWSStaticCredentialsProvider;&lt;BR /&gt;import com.amazonaws.auth.BasicAWSCredentials;&lt;BR /&gt;import com.amazonaws.auth.BasicSessionCredentials;&lt;BR /&gt;import com.amazonaws.AmazonClientException;&lt;BR /&gt;import com.amazonaws.services.s3.model.*;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;--&lt;/P&gt; 
&lt;P&gt;I have run out of ideas, please advise, given Talend DI generates pure Java,&amp;nbsp;is there is a way to get it working ??&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Many thanks!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:10:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-DI-6-4-1-Java-routine-accessing-S3-failed-with-quot/m-p/2293082#M66093</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T09:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Talend DI 6.4.1 Java routine accessing S3 failed with "method not found" error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-DI-6-4-1-Java-routine-accessing-S3-failed-with-quot/m-p/2293083#M66094</link>
      <description>&lt;P&gt;More information.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;I managed to get it to work by the following steps:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In Eclipse I picked the Export option &lt;STRONG&gt;Extract a Runnable JAR file&lt;/STRONG&gt; (&lt;U&gt;instead of plain Jar file&lt;/U&gt;) with a sub-option of Library handling: &lt;STRONG&gt;Extract required libraries into generated JAR file.&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So I have a self-contained, rather huge Jar file of ~200 MB.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This worked! I tried both inside DI Studio and also ran generated bat file in Widows shell. Both worked.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So my question&amp;nbsp;now is this - &lt;STRONG&gt;am I doing this correctly?&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If there a better method to get external Java methods to work from Talend ?&lt;/P&gt; 
&lt;P&gt;My custom code also references other libraries such as AWS PostgreSQL, AWS Redshift, in addition to AWS S3.&lt;/P&gt; 
&lt;P&gt;The versions of libraries I use in my custom code and those AWS uses will likely be different to the libraries used by Talend DI.&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;I wonder if there is likely to be a conflict?&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Example:&amp;nbsp;&lt;/STRONG&gt;Talend job may use PostgreSQL and Redshift itself and my custom Java may also use the same libraries.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Perhaps creating single large Runnable Jar with libraries packaged inside will somehow insulate/isolate my code and the library versions I use from those used by Talend DI?&lt;/P&gt; 
&lt;P&gt;PS: The build job task generates a massive zip file of ~500 MB (which includes my custom JAR of 200+ MB). I am not very concerned about the size but more about recommended best practices.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Many thanks everyone&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 02:15:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-DI-6-4-1-Java-routine-accessing-S3-failed-with-quot/m-p/2293083#M66094</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-13T02:15:25Z</dc:date>
    </item>
  </channel>
</rss>

