Bug 963208 - NullPointerException when trying to delete duplicated workspace
NullPointerException when trying to delete duplicated workspace
Status: CLOSED CURRENTRELEASE
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: BAM (Show other bugs)
6.0.0
Unspecified Unspecified
medium Severity medium
: DR6
: 6.0.0
Assigned To: David Gutierrez
Jan Hrcek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-15 07:55 EDT by Jan Hrcek
Modified: 2014-08-06 16:12 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: An empty HTML panel points to a null HTMLText instance. Consequence: null pointer exception is raised when trying to delete HTMLText instance for empty panels. Fix: Check if the instance is not null before trying to delete anything. Result: Workspaces with empty HTML panels can be deleted.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:12:56 EDT
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)
Step 5 to reproduce the problem - creating panels in page region CENTER_3 (562.22 KB, image/png)
2013-05-15 07:55 EDT, Jan Hrcek
no flags Details
Unextected error dialog after clicking "Delete selected workspace" (476.01 KB, image/png)
2013-05-15 07:57 EDT, Jan Hrcek
no flags Details
Application log with the exception (7.77 KB, text/x-log)
2013-05-15 07:58 EDT, Jan Hrcek
no flags Details
Steps to reproduce - video (6.83 MB, video/webm)
2013-06-21 08:12 EDT, Jan Hrcek
no flags Details

  None (edit)
Description Jan Hrcek 2013-05-15 07:55:43 EDT
Created attachment 748240 [details]
Step 5 to reproduce the problem - creating panels in page region CENTER_3

Description of problem:



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


How reproducible:
always, using dashboard showcase (jetty based) and the default H2 datasource

Steps to Reproduce:

1. Build application from sources on github and start quickstart demo using buildandrun_h2.sh as described in readme
2. Login with root
3. Navigate to workspace "Showcase" and click the button "Duplicate workspace" in the administrator bar in the top.
4. Using administrator bar in the top switch to the duplicated workspace "Copy of Showcase", select "Home" page
5. Create the following 2 new panels using "Create a new panel in current page" in the administrator bar in the top and put them into page region CENTER_3 (see attached printscreen):
	1 instance of "HTML Editor" and
	1 instance of "Data provider manager"
6. Now try to delete the duplicated workspace - click "Delete selected workspace", confirm alert "Delete selected workspace" with OK.

Actual results:
"Unexpected Error" modal dialog appears. Exception appears in the application log (see attachment).

Expected results:
Selected workspace should be deleted without errors
Comment 1 Jan Hrcek 2013-05-15 07:57:47 EDT
Created attachment 748241 [details]
Unextected error dialog after clicking "Delete selected workspace"
Comment 2 Jan Hrcek 2013-05-15 07:58:49 EDT
Created attachment 748242 [details]
Application log with the exception
Comment 3 Jan Hrcek 2013-05-15 08:01:44 EDT
Sorry - forgot to insert description of the problem:

Description:
After creating duplicate of workspace and addint some panels, when you try to delete the duplicated workspace, Unexpected Error dialog appears, with NullPointerException.
Comment 4 David Gutierrez 2013-05-17 10:46:35 EDT
Unfortunately I can't reproduce it.

I've exactly proceed as indicated, but when deleting the duplicated workspace no error is thrown.

Can you please try to reproduce it with the latest version?

Notice that we have recently upgraded to Hibernate 4.2.0.Final in order to align dependencies with EAP 6.1.
Comment 5 David Gutierrez 2013-05-17 10:46:49 EDT
Unfortunately I can't reproduce it.

I've exactly proceed as indicated, but when deleting the duplicated workspace no error is thrown.

Can you please try to reproduce it with the latest version?

Notice that we have recently upgraded to Hibernate 4.2.0.Final in order to align dependencies with EAP 6.1.
Comment 6 David Gutierrez 2013-06-19 12:10:22 EDT
As a said before it's not reproducible.

May be it's related with the following bug: https://bugzilla.redhat.com/show_bug.cgi?id=966897 which has been also fixed.
Comment 7 Jan Hrcek 2013-06-21 08:10:51 EDT
I tested with dashbuilder DR5 deployed on EAP 6.1 and as before, I managed to reproduce the issue with 100% confidence in both automated and manual tests.

I made some observations, that might help you isolate the issue:
1) It is necesary that panels are created in the region CENTER_3 (because, like CENTER_6 it displays tabs in a specific way - showing just 1 panel + only header of the remaining tabs)

2) It is necesary to create the HTML panel BEHIND the the first panel

From this it seems, that error happens because of HTML panel being "hidden" behind the first panel for the error to occur when the "Delete workspace" is performed.

I attach a video of exact reproducing steps for your convenience.
Comment 8 Jan Hrcek 2013-06-21 08:12:33 EDT
Created attachment 763815 [details]
Steps to reproduce - video
Comment 9 Jan Hrcek 2013-06-21 08:17:29 EDT
Actually I found even simpler sequence to reproduce the problem based on observations mentioned in Comment 7:

1) Start the dashbuilder and go to Showcase - page Pipeline analysis (i.e. page with panels in region CENTER_3)
2) Add new "HTML Editor" panel to region center 3 - drag "Create panel" directly to dark-grey region with label CENTER_3 (not to one of the light-greyed ones) - this creates it as a last "tab" in region CENTER_3.
3) Having workspace Showcase selected, click "Delete selected workspace"
--> The Unexpected error occurs.
Comment 10 David Gutierrez 2013-06-25 11:12:42 EDT
Indeed, was failing with workspaces containing empty HTML panels.
Now, it's fixed.

Github commit: https://github.com/droolsjbpm/dashboard-builder/commit/9870d69095dc2ae7bfa95bfe556f95ab3ab96f23
Comment 11 Jan Hrcek 2013-07-13 05:35:00 EDT
OK, verified in BPMS 6.0.0.DR6 deployed on EAP 6.1

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