Hadoop throws java.lang.VerifyError after exporting jar file

I am changing the hadoop map - I am cutting back on the work that is currently compiling and working fine without my changes.

As part of the assignment, I will now connect to S3 to deliver the file.

I developed the (very simple) s3Connector class, tested and ran it in eclipse, then hooked into my work on pruning. To start work in hadoop, I need to export the project as a jar file, and then call it from hadoop. The jar file seems to compile and export without problems from eclipse, but when I run it in hadoop, I get a java.lang.VerifyError exception.

java.lang.VerifyError: (class: com/extrabux/services/S3Connector, method: 
connectToS3 signature: ()V) Incompatible argument to function

Several other posts mention that there may be conflicts in jar versions that conflict, but in my eclipse build path I added all the latest jar files for the specified libs and pushed them to the top of the build order.

It is about as simple as I can highlight it:

import org.jets3t.service.impl.rest.httpclient.RestS3Service;
import org.jets3t.service.security.AWSCredentials;

public class S3Connector {

protected RestS3Service s3Service;
protected AWSCredentials awsCredentials;


public S3Connector()
{
    this.awsCredentials= new AWSCredentials("my secret 1", "my secret 2");
}


public void connectToS3() throws Exception
{
    this.s3Service = new RestS3Service(this.awsCredentials);
}  

}

Even that simple class will die. The same message. As soon as I comment on the AWS credentials in the constructor and RestS3Service, the problem goes away. Basically, I think this is some kind of problem exporting a library from eclipse, but not sure how to find it.

+5
source share
1 answer

Figured it out. There was an old version of jets3t jar, which was in the hadoop lib dir folder

hadoop script jars lib exec'ed, . 0,6 0,8- , jar. 0.6.0 RestS3Service, java.lang.VerifyError. 0.6.0 lib hadoop, .

+4

All Articles