title: java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.partitions.PartitionsLoader
body: <p>i alway get the error :</p>
  
  <pre class="lang-html prettyprint-override"><code>[2018-02-05T09:04:14.682+0000] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=26 _ThreadName=http-listener-1(1)] [timeMillis: 1517821454682] [levelValue: 900] [[
    StandardWrapperValve[AddToOrderServlet]: Servlet.service() for servlet AddToOrderServlet threw exception
  java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.partitions.PartitionsLoader
      at com.amazonaws.regions.RegionMetadataFactory.create(RegionMetadataFactory.java:30)
      at com.amazonaws.regions.RegionUtils.initialize(RegionUtils.java:64)
      at com.amazonaws.regions.RegionUtils.getRegionMetadata(RegionUtils.java:52)
      at com.amazonaws.regions.RegionUtils.getRegion(RegionUtils.java:105)
      at com.amazonaws.client.builder.AwsClientBuilder.withRegion(AwsClientBuilder.java:239)
      at AddToOrderServlet.doPost(AddToOrderServlet.java:201)
  </code></pre>
  
  
  
  <p>And i have print the load lib in the running log:</p>
  
  <pre class="lang-html prettyprint-override"><code>[2018-02-05T09:04:14.675+0000] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=26 _ThreadName=Thread-8] [timeMillis: 1517821454675] [levelValue: 800] [[
    ******************]]
  
  [2018-02-05T09:04:14.675+0000] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=26 _ThreadName=Thread-8] [timeMillis: 1517821454675] [levelValue: 800] [[
    file:/home/ubuntu/glassfish4/glassfish/domains/domain1/applications/BookStore/WEB-INF/lib/jackson-databind-2.6.7.1.jar]]
  
  [2018-02-05T09:04:14.675+0000] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=26 _ThreadName=Thread-8] [timeMillis: 1517821454675] [levelValue: 800] [[
    file:/home/ubuntu/glassfish4/glassfish/domains/domain1/lib/aws-java-sdk-1.11.268.jar]]
  
  [2018-02-05T09:04:14.675+0000] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=26 _ThreadName=Thread-8] [timeMillis: 1517821454675] [levelValue: 800] [[
    file:/home/ubuntu/glassfish4/glassfish/domains/domain1/lib/aws-java-sdk-1.11.268.jar]]
  
  [2018-02-05T09:04:14.678+0000] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=26 _ThreadName=Thread-8] [timeMillis: 1517821454678] [levelValue: 800] [[
    DEBUG: setDebug: JavaMail version 1.5.2]]
  </code></pre>
  
  
  
  <p>It seems like my lib is aws-java-sdk-1.11.268.jar and i even check that there is a class PartitionsLoader exists. 
  The running environment is : glassfish4.1 and my jdk_version is :1.8.0_162.
  Thanks for any help.</p>