Bug 963208 - NullPointerException when trying to delete duplicated workspace
Summary: NullPointerException when trying to delete duplicated workspace
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: BAM
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: DR6
: 6.0.0
Assignee: David Gutierrez
QA Contact: Jan Hrcek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-15 11:55 UTC by Jan Hrcek
Modified: 2014-08-06 20:12 UTC (History)
1 user (show)

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.
Clone Of:
Environment:
Last Closed: 2014-08-06 20:12:56 UTC
Type: Bug
Embargoed:


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 11:55 UTC, Jan Hrcek
no flags Details
Unextected error dialog after clicking "Delete selected workspace" (476.01 KB, image/png)
2013-05-15 11:57 UTC, Jan Hrcek
no flags Details
Application log with the exception (7.77 KB, text/x-log)
2013-05-15 11:58 UTC, Jan Hrcek
no flags Details
Steps to reproduce - video (6.83 MB, video/webm)
2013-06-21 12:12 UTC, Jan Hrcek
no flags Details

Description Jan Hrcek 2013-05-15 11:55:43 UTC
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 11:57:47 UTC
Created attachment 748241 [details]
Unextected error dialog after clicking "Delete selected workspace"

Comment 2 Jan Hrcek 2013-05-15 11:58:49 UTC
Created attachment 748242 [details]
Application log with the exception

Comment 3 Jan Hrcek 2013-05-15 12:01:44 UTC
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 14:46:35 UTC
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 14:46:49 UTC
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 16:10:22 UTC
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 12:10:51 UTC
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 12:12:33 UTC
Created attachment 763815 [details]
Steps to reproduce - video

Comment 9 Jan Hrcek 2013-06-21 12:17:29 UTC
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 15:12:42 UTC
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 09:35:00 UTC
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.