Five Stars

Error: Exception in thread "Thread-0" java.lang.NoSuchMethodError: org.apache.http.params.HttpConnectionParams.setSoKeepalive(Lorg/apache/http/params/HttpParams;Z)

 Hi I am developing a job where I am getting data from Redshift, uploading to S3 and then importing to a Redshift table:

 

Screen Shot 2017-05-22 at 4.16.52 PM.png

 

The configuration is like this.

Screen Shot 2017-05-22 at 4.18.00 PM.pngScreen Shot 2017-05-22 at 4.18.30 PM.png

 

In the server in the lib folder I have these modules:

 

  • RedshiftJDBC41-1.1.13.1013.jar
    apache-httpcomponents-httpcore.jar
    aws-java-sdk-1.10.52.jar
    aws-java-sdk-1.11.129.jar
    cimt.talendcomp.gaanalytics-2.1-jar-with-dependencies.jar
    commons-codec-1.6.jar
    commons-logging-1.1.3.jar
    dom4j-1.6.1.jar
    httpclient-4.3.6.jar
    httpcore-4.4.5.jar
    jackson-annotations-2.5.3.jar
    jackson-core-2.5.3.jar
    jackson-databind-2.5.3.jar
    joda-time-2.8.1.jar
    log4j-1.2.17.jar
    routines.jar

However when I run the job I get this error:

 

 

[statistics] disconnected
[statistics] disconnected
[statistics] disconnected
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: org/apache/http/conn/scheme/SchemeSocketFactory
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:136)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:481)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:461)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:443)
at momox.ga2redshift_tvvisits_loop_0_1.GA2Redshift_TVvisits_Loop.tRedshiftInput_2Process(GA2Redshift_TVvisits_Loop.java:1832)
at momox.ga2redshift_tvvisits_loop_0_1.GA2Redshift_TVvisits_Loop.tRedshiftInput_1Process(GA2Redshift_TVvisits_Loop.java:1064)
at momox.ga2redshift_tvvisits_loop_0_1.GA2Redshift_TVvisits_Loop.tRedshiftRow_2Process(GA2Redshift_TVvisits_Loop.java:2337)
at momox.ga2redshift_tvvisits_loop_0_1.GA2Redshift_TVvisits_Loop$2.run(GA2Redshift_TVvisits_Loop.java:2613)
Caused by: java.lang.ClassNotFoundException: org.apache.http.conn.scheme.SchemeSocketFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 8 more

 

I understand is something with the modules, but I checked and everything seems to be up to date.

Any ideas?

Thanks!

  • Data Integration
Tags (1)
5 REPLIES
Moderator

Re: Error: Exception in thread "Thread-0" java.lang.NoSuchMethodError: org.apache.http.params.HttpConnectionParams.setSoKeepalive(Lorg/apache/http/params/HttpParams;Z)

Hi,

Can you execute your job successfully in studio? Does this issue only repro on server? On which talend build version you got this issue?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: Error: Exception in thread "Thread-0" java.lang.NoSuchMethodError: org.apache.http.params.HttpConnectionParams.setSoKeepalive(Lorg/apache/http/params/HttpParams;Z)

Hi Sabrina Smiley Happy

 

I got this error only in the server and the job is running locally in my machine!

I am using Talend v6.3.1. Do you think I should upgrade? Could that be an issue?

Moderator

Re: Error: Exception in thread "Thread-0" java.lang.NoSuchMethodError: org.apache.http.params.HttpConnectionParams.setSoKeepalive(Lorg/apache/http/params/HttpParams;Z)

Hi,

Are your shared external libraries stored in talend Nexus repository? We suppose that there is no sync up. Have you tried to restart your server to see if it works?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: Error: Exception in thread "Thread-0" java.lang.NoSuchMethodError: org.apache.http.params.HttpConnectionParams.setSoKeepalive(Lorg/apache/http/params/HttpParams;Z)

Hi, thanks for the reply Smiley Happy

 

I upgraded to Talend 6.4.0 and the issue was resolved Smiley Happy Still not sure why it didn't work before, but since it's working at the moment everything is good!! 

Moderator

Re: Error: Exception in thread "Thread-0" java.lang.NoSuchMethodError: org.apache.http.params.HttpConnectionParams.setSoKeepalive(Lorg/apache/http/params/HttpParams;Z)

Hello,

Feel free to let us know if this issue repro on your end.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.