0

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
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Harsha Reddy
  • 99
  • 1
  • 8

1 Answers1

0

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!

aviad
  • 8,229
  • 9
  • 50
  • 98
  • Thanlks for the reply. I put my libraries which come with jets#t in Applibs folder and my jars in classes folder. I am still getting the above error. Am I placing these files correctly? I am a total noob to Glassfish btw. – Harsha Reddy Feb 24 '12 at 06:12
  • What is applib? Why you put your jar in classes? Have you actually read my answer? – aviad Feb 24 '12 at 07:27
  • Applibs and Classes are two of the directories I found in the domains/domain1/lib folder ... but anyway , I followed your method and dumped everything related to jets3t in it and it worked. Thanks for the effort. – Harsha Reddy Feb 24 '12 at 10:20