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
- clones
-
DROOLS-1297 MemoryUtil should not fail on Google App Engine with NoClassDefFoundError
- Closed
- relates to
-
RHBRMS-2601 [GSS] (6.3.z) MemoryUtil should not fail on Google App Engine with NoClassDefFoundError
- Verified