Bug 1031751 - Error deregistering cluster node
Summary: Error deregistering cluster node
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: BAM
Version: 6.0.0
Hardware: All
OS: All
low
medium
Target Milestone: ER6
: 6.0.0
Assignee: Roger Martínez
QA Contact: Radovan Synek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-18 17:09 UTC by Roger Martínez
Modified: 2014-08-06 20:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:10:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Roger Martínez 2013-11-18 17:09:21 UTC
Description of problem:

Sometimes, when undeploying the dashbuilder application from EAP, an exception about cluster node deregistering is thrown.

See (Actual results) for the exception details.

Version-Release number of selected component (if applicable):

6.1.0-SNAPSHOT

How reproducible:

Undeploy a dashbuilder application from EAP, not sure if always happens.. In my case, I used an invalid datasource (the db host was down), so the database creation was not performed when deploying the webapp. Them, when trying to undeploy the webapp, the exception about node deregistering was thrown.

Steps to Reproduce:

1. Deploy dashbuilder webapp into EAP using an invalid datasource (for example, using a  host that is currently down)
2. Undeploy the dashbuilder webapp from EAP
3. An exception is thrown.

Actual results:
=================

17:56:22,426 INFO  [org.jboss.web] (ServerService Thread Pool -- 21) JBAS018224: Unregister web context: /dashbuilder
17:56:22,428 INFO  [org.jboss.dashboard.cluster.ClusterNodesManager] (ServerService Thread Pool -- 21) Deregistering cluster node with id null
17:56:22,441 ERROR [org.jboss.dashboard.annotation.DestroyableProcessor] (ServerService Thread Pool -- 21) Error destroying bean org.jboss.dashboard.cluster.ClusterNodesManager$Proxy$_$$_WeldClientProxy: java.lang.NullPointerException
        at org.jboss.dashboard.error.ErrorManager.notifyError(ErrorManager.java:178) [dashboard-commons-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
        at org.jboss.dashboard.error.ErrorManager$Proxy$_$$_WeldClientProxy.notifyError(ErrorManager$Proxy$_$$_WeldClientProxy.java) [dashboard-commons-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
        at org.jboss.dashboard.database.hibernate.HibernateTransaction.error(HibernateTransaction.java:234) [dashboard-commons-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
        at org.jboss.dashboard.database.hibernate.HibernateTransaction.executeFragment(HibernateTransaction.java:263) [dashboard-commons-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
        at org.jboss.dashboard.database.hibernate.HibernateTxFragment.executeInitiator(HibernateTxFragment.java:179) [dashboard-commons-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
        at org.jboss.dashboard.database.hibernate.HibernateTxFragment.execute(HibernateTxFragment.java:167) [dashboard-commons-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
        at org.jboss.dashboard.cluster.ClusterNodesManager.destroy(ClusterNodesManager.java:101) [dashboard-commons-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
        at org.jboss.dashboard.cluster.ClusterNodesManager$Proxy$_$$_WeldClientProxy.destroy(ClusterNodesManager$Proxy$_$$_WeldClientProxy.java) [dashboard-commons-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
        at org.jboss.dashboard.annotation.DestroyableProcessor.destroyBeans(DestroyableProcessor.java:53) [dashboard-commons-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
        at org.jboss.dashboard.Application.shutdown(Application.java:110) [dashboard-commons-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
        at org.jboss.dashboard.Application$Proxy$_$$_WeldClientProxy.shutdown(Application$Proxy$_$$_WeldClientProxy.java) [dashboard-commons-6.1.0-SNAPSHOT.jar:6.1.0-SNAPSHOT]
        at org.jboss.dashboard.ui.controller.ControllerServlet.destroy(ControllerServlet.java:255) [dashboard-ui-core-6.1.0-SNAPSHOT.jar:]
        at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1373) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
        at org.apache.catalina.core.StandardWrapper.stop(StandardWrapper.java:1669) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3906) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
        at org.jboss.as.web.deployment.WebDeploymentService.doStop(WebDeploymentService.java:171) [jboss-as-web-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
        at org.jboss.as.web.deployment.WebDeploymentService.access$100(WebDeploymentService.java:60) [jboss-as-web-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
        at org.jboss.as.web.deployment.WebDeploymentService$2.run(WebDeploymentService.java:113) [jboss-as-web-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_40]
        at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_40]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]
        at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]
        at org.jboss.threads.JBossThread.run(JBossThread.java:122)

Expected results:
=================

The node should be deregisterd from database, if the database exists. If not, control the null and avoid throwing an exception.

Additional info:

Comment 2 Roger Martínez 2013-11-22 21:09:11 UTC
This bug should never happens, it was caused due to https://bugzilla.redhat.com/show_bug.cgi?id=1030424.

So it only happens when for some unexpected reasons the database is not created, so the node cannot be registered and thus unregistered. 

Anyway, I have added the validation in order to not produce a NullPointerException. Now, a log error message is displayed with text "This cluster node was not previously registered."

Commits on master
=================
- https://github.com/droolsjbpm/dashboard-builder/commit/084d6a8dc69d3b327e80a71efb9e6fd3b2766f6c

Commits on 6.0.x
=================
- https://github.com/droolsjbpm/dashboard-builder/commit/09e2576713e9aa7eae91ce1264cb509bc99dd270

Comment 3 Radovan Synek 2014-01-09 12:45:32 UTC
Verified with BPMS-6.0.0.ER7


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