javaamazon-web-servicesglassfish-3jets3t

Amazon JetS3t API and Glassfish Server


Where do I put the Amazon JetS3t and the related jar files in Glassfish 3?

I have a sample Restful Web application which currently uses a Arraylist to maintain objects at back-end, I would like them to be stored as text files on Amazon S3. So I am using jets@t API for that.

When I deploy the application onto Glassfish, it throes an error like this

Caused by: java.lang.ClassNotFoundException: org.jets3t.service.security.ProviderCredentials
    at 

org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1519)   at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1369)    ... 45 more

Solution

  • GlassFish v3 has a well defined Class Loader hierarchy which identifies the common class loader as the proper way to deal with shared libraries. So to make a long story short, putting you libraries and other framework JARs in domains/domain1/lib is all you need to do.

    Good luck!