Uploaded image for project: 'JBoss BRMS Platform'
  1. JBoss BRMS Platform
  2. RHBRMS-2599

MemoryUtil should not fail on Google App Engine with NoClassDefFoundError

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 6.4.0
    • None
    • None
    • None
    • ER3

      MemoryUtil throws this exception on Google App Engine:

      java.lang.NoClassDefFoundError: Could not initialize class
      com.google.apphosting.runtime.security.shared.stub.java.lang.management.ManagementFactory
      at org.drools.core.util.MemoryUtil.<clinit>(MemoryUtil.java:33)
      

      because the PermGen check goes the wrong way on GAE.

      In the MemoryUtil code on line 33, we need something like:

      if (... || isGAE()) {
      ...
      }
      
      public boolean isGAE() {
         String p = System.getProperty("com.google.appengine.runtime.environment");
         return p != null && !p.equals("");
      }
      

      On GAE, p is "Development". => act same like isAndroid()
      On GCE (= plain old OpenJDK), p is null. => act normally
      On plain Fedora with OpenJDK 8, p is null. => act normally

              mfusco@redhat.com Mario Fusco
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Archiver:
              rhn-support-ceverson Clark Everson
              Jiří Locker Jiří Locker (Inactive)
              Jiří Locker Jiří Locker (Inactive)

                Created:
                Updated:
                Resolved:
                Archived: