6 Replies Latest reply on Feb 14, 2014 11:25 AM by Filippe Spolti

    Class not found when instantiating AmazonS3Client on Jboss 7

    Tommy T Newbie

      I am trying to run some simple Amazon AWS S3 example code on JBoss. It runs fine as a JSE app. I add the same amazon dependency to my POM in both JSE and JEE6 projects. The call to instantiate the client always throws an exception when running it on JBoss

      AWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey);

      AmazonS3 conn = new AmazonS3Client(credentials); << this call here

      Throws this exception:

      NoClassDefFoundError: org/apache/http/conn/scheme/SchemeSocketFactory

      I think this is related to the http-client.jar but I have no idea how to fix this, tell JBoss where to pick up the correct dependency etc?

      ref: http://aws.amazon.com/developers/getting-started/java/

       

      I basically moved some of that sample code to a method call and try to and make the connection to S3

       

      Thanks