[jboss-jira] [JBoss JIRA] (DROOLS-1193) MemoryUtil's static constructor call to ManagementFactory.getMemoryPoolMXBeans() fails on Google App Engine
Mario Fusco (JIRA)
issues at jboss.org
Thu May 26 11:21:00 EDT 2016
[ https://issues.jboss.org/browse/DROOLS-1193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13243455#comment-13243455 ]
Mario Fusco edited comment on DROOLS-1193 at 5/26/16 11:20 AM:
---------------------------------------------------------------
Fixed by https://github.com/droolsjbpm/drools/commit/740f82844015b48edad7b43b506c2bdccdca288b
was (Author: mfusco):
Fixed by https://github.com/droolsjbpm/drools/commit/10620bf71
> MemoryUtil's static constructor call to ManagementFactory.getMemoryPoolMXBeans() fails on Google App Engine
> -----------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-1193
> URL: https://issues.jboss.org/browse/DROOLS-1193
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 6.4.0.Final
> Reporter: Geoffrey De Smet
> Assignee: Mario Fusco
>
> {code}
> [INFO] java.lang.NoClassDefFoundError: java.lang.management.ManagementFactory is a restricted class. Please see the Google App Engine developer's guide for more details.
> [INFO] at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:52)
> [INFO] at org.drools.core.util.MemoryUtil.<clinit>(MemoryUtil.java:33)
> [INFO] at java.lang.Class.forName0(Native Method)
> [INFO] at java.lang.Class.forName(Class.java:195)
> [INFO] at com.google.appengine.tools.development.agent.runtime.RuntimeHelper.checkRestricted(RuntimeHelper.java:70)
> [INFO] at com.google.appengine.tools.development.agent.runtime.Runtime.checkRestricted(Runtime.java:65)
> [INFO] at org.drools.core.RuleBaseConfiguration.setPermGenThreshold(RuleBaseConfiguration.java:583)
> [INFO] at org.drools.core.RuleBaseConfiguration.init(RuleBaseConfiguration.java:451)
> [INFO] at org.drools.core.RuleBaseConfiguration.init(RuleBaseConfiguration.java:429)
> [INFO] at org.drools.core.RuleBaseConfiguration.<init>(RuleBaseConfiguration.java:278)
> [INFO] at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieBaseConfiguration(KieServicesImpl.java:185)
> {code}
> the problem is in this code:
> {code}
> static {
> if (!hasPermGen() || ClassUtils.isAndroid()) { // hasPermGen is true because GAE doesn't support java 8 yet
> permGenStats = new DummyMemoryStats();
> } else {
> MemoryPoolMXBean permGenBean = null;
> for (MemoryPoolMXBean mx : ManagementFactory.getMemoryPoolMXBeans()) { // <=== EXCEPTION
> if (mx.getName() != null && mx.getName().contains("Perm")) {
> permGenBean = mx;
> break;
> }
> }
> permGenStats = new MBeanMemoryStats(permGenBean);
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list