Bug 847044 - ClassNotFoundException: org.drools.event.BeforeRuleBaseLockedEvent when stopping EAP 6.0
ClassNotFoundException: org.drools.event.BeforeRuleBaseLockedEvent when stopp...
Status: VERIFIED
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5 (Show other bugs)
BRMS 5.3.0.GA
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Maciej Swiderski
Marek Baluch
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-09 10:07 EDT by Jiri Svitak
Modified: 2015-06-01 21:39 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Incorrectly disposing of the knowledge agent when shutting down the server caused an exception to be logged. There was no impact to the application, however, the exception could cause confusion. To resolve this issue, a listener definition was added to the business central server war, ensuring the correct disposal of the knowledge agent. The exception no longer occurs.
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
server log (2.65 KB, text/plain)
2012-08-09 10:07 EDT, Jiri Svitak
no flags Details

  None (edit)
Description Jiri Svitak 2012-08-09 10:07:11 EDT
Created attachment 603262 [details]
server log

When stopping EAP 6.0 with deployed BRMS 5.3.0, an exception is thrown. See attached server log.
Comment 2 Geoffrey De Smet 2012-08-24 06:58:06 EDT
RuleBaseEventSupport does "new BeforeRuleBaseLockedEvent()"
Both are in the same jar (drools-core) and in the same package (org.drools.event). The ClassNotFoundException does not make sense.
Comment 3 Geoffrey De Smet 2012-08-24 09:49:02 EDT
Can not reproduce.

I tried guvnor-5.3.4-SNAPSHOT-jboss-as-7.0.War on jboss-eap-6.0, but the server shutdown went fine:

15:44:18,650 INFO  [org.apache.coyote.http11.Http11Protocol] Pausing Coyote HTTP/1.1 on http-/127.0.0.1:8080
15:44:18,650 INFO  [org.apache.coyote.http11.Http11Protocol] Stopping Coyote HTTP/1.1 on http-/127.0.0.1:8080
15:44:18,678 INFO  [stdout] Removing all listeners...
15:44:18,678 INFO  [stdout] Listeners removed...
15:44:20,419 INFO  [com.arjuna.ats.jbossatx] ARJUNA032018: Destroying TransactionManagerService
15:44:20,420 INFO  [com.arjuna.ats.jbossatx] ARJUNA032014: Stopping transaction recovery manager
15:44:20,590 INFO  [org.jboss.as.server.deployment] JBAS015877: Stopped deployment guvnor-5.3.4-SNAPSHOT-jboss-as-7.0.war in 1959ms
15:44:20,591 INFO  [org.jboss.as] JBAS015950: JBoss EAP 6.0.0.GA (AS 7.1.2.Final-redhat-1) stopped in 1942ms


The stacktrace seems to implicate there's a changeset involved too. Furthermore, it happens for "business-central-server.war", what is that war?
Please provide a reproduce recipe. Even better would be a reproducing arquillian test.
Comment 4 Geoffrey De Smet 2012-08-24 10:29:47 EDT
Once we can reproduce, we need too look into this jbpm class:

https://github.com/droolsjbpm/jbpm/blob/master/jbpm-gwt/jbpm-gwt-core/src/main/java/org/jbpm/integration/console/StatefulKnowledgeSessionUtil.java#L92

Several problems:
1) That's a class never calls
        kagent.dispose();
2) That class overwrite Object.finalize() (= evil). But that is never called as no instance is ever created of that class (all use is static).
3) Therefore, StatefulKnowledgeSessionUtil.dispose() is never called.
Comment 5 Geoffrey De Smet 2012-08-27 09:33:45 EDT
This pull request has changes that might fix the problem (as kagent.dispose() should be correctly be called):
  https://github.com/droolsjbpm/jbpm/pull/121

However, after building the jbpm-console from source (with or without these changes), I was unable to deploy that to EAP 6 or JBoss AS 7, due to the high reconfiguration required to the server.
The installer and the wiki doc didn't help.
Comment 6 Geoffrey De Smet 2012-08-27 10:00:06 EDT
Macies (a jbpm developer) is able to run the jbpm-console locally, he's going to try the changes.
Comment 7 Geoffrey De Smet 2012-08-27 10:20:36 EDT
Marco will take over the rest of the issue.
Comment 9 Jiri Svitak 2012-08-29 10:30:54 EDT
Sometimes I experience also this exception when stopping EAP 6.0 (usually after several other exceptions regarding persistence configuration or something else):

16:26:05,357 INFO  [org.apache.coyote.http11.Http11Protocol] Pausing Coyote HTTP/1.1 on http-/127.0.0.1:8080
16:26:05,357 INFO  [org.apache.coyote.http11.Http11Protocol] Stopping Coyote HTTP/1.1 on http-/127.0.0.1:8080
16:26:05,362 INFO  [org.jboss.as] JBAS015950: JBoss EAP 6.0.0.GA (AS 7.1.2.Final-redhat-1) stopped in 14977ms
16:26:05,364 ERROR [stderr] Exception in thread "Thread-78" java.lang.NoClassDefFoundError: org/drools/event/BeforeProcessRemovedEvent
16:26:05,364 ERROR [stderr] 	at org.drools.event.RuleBaseEventSupport.fireBeforeProcessRemoved(RuleBaseEventSupport.java:237)
16:26:05,364 ERROR [stderr] 	at org.drools.common.AbstractRuleBase.removeProcess(AbstractRuleBase.java:1065)
16:26:05,365 ERROR [stderr] 	at org.drools.impl.KnowledgeBaseImpl.removeProcess(KnowledgeBaseImpl.java:225)
16:26:05,365 ERROR [stderr] 	at org.drools.agent.impl.KnowledgeAgentImpl.removeKnowledgeDefinitionFromBase(KnowledgeAgentImpl.java:1027)
16:26:05,365 ERROR [stderr] 	at org.drools.agent.impl.KnowledgeAgentImpl.incrementalBuildResources(KnowledgeAgentImpl.java:884)
Comment 10 Maciej Swiderski 2012-08-30 10:48:09 EDT
confirm that Geoffrey change solved the problem and merged it into 5.2.x and master.
Thanks Geoffrey!


Important to note that console-server/business-central-server web.xml needs to be altered to include following listener definition:
  <listener>
    <listener-class>org.jbpm.integration.console.StatefulKnowledgeSessionUtilListener</listener-class>
  </listener>
Comment 11 Jiri Svitak 2012-09-13 11:12:38 EDT
I have stopped the eap6 with the new ee6 deployable wars several times and the reported exception "Caused by: java.lang.ClassNotFoundException: org.drools.event.BeforeRuleBaseLockedEvent" has never been thrown again.

Regarding Maciej's comment #10 - my business-central-server web.xml does not contain the described listener definition and it was not necessary to add it there.

So, I am changing the state to VERIFIED in brms 5.3.1 ER1.
Comment 13 lcarlon 2012-10-22 00:22:28 EDT
Doc text edited for inclusion in the release notes. Thanks for providing the text, Maciej.

- Lee

Note You need to log in before you can comment on or make changes to this bug.