Bug 785185

Summary: NullPointerException when accessing Process Overview and no package binary exists in Guvnor
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Jiri Locker <jlocker>
Component: BRM (Guvnor), jBPM ConsoleAssignee: manstis
Status: VERIFIED --- QA Contact: Jiri Locker <jlocker>
Severity: high Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.0.GACC: atangrin, lpetrovi, rzhang
Target Milestone: ER8   
Target Release: BRMS 5.3.0.GA   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
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: --- Target Upstream Version:
Attachments:
Description Flags
server.log none

Description Jiri Locker 2012-01-27 15:05:55 UTC
Description of problem:
If Guvnor has not built any packages yet and user accesses the Process Overview in jbpm-console, two NPE exceptions are thrown.


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

How reproducible:
always

Steps to Reproduce:
1. use freshly installed standalone package
2. after the server starts, go to jbpm-console / Process Overview
3. 
  
Actual results:


Expected results:
Error should be reported only if Guvnor cannot be contacted. No package binaries is not an error.

Additional info:
attached server.log

Comment 1 Jiri Locker 2012-01-27 15:08:46 UTC
Created attachment 557876 [details]
server.log

Comment 2 Jiri Locker 2012-02-28 12:01:02 UTC
*** Bug 796147 has been marked as a duplicate of this bug. ***

Comment 3 Maciej Swiderski 2012-04-05 07:52:14 UTC
This seems to be more of Guvnor issue as the exceptions are trhown by org.drools.guvnor.server.files.PackageDeploymentServlet

Comment 4 Lukáš Petrovický 2012-04-05 08:01:22 UTC
Michael, would you please look at this and assess whether the issue is in Guvnor?

Comment 5 Lukáš Petrovický 2012-04-05 08:02:14 UTC
Michael, please see comment 3 and comment 4. (I forgot to CC you.)

Comment 6 Jiri Locker 2012-04-10 08:40:30 UTC
The issue is more general. To reproduce, it is sufficient to have any package that hasn't been built. Example:

Packages
|-package1   (built)
|-package2   (built)
`-newPackage (not built)

Under this condition, the jbpm console knowledge session fails to initialize and no processes are displayed.

Comment 7 manstis 2012-04-13 19:09:30 UTC
Assigned to Tiho following discussion on IRC.

Comment 8 Tihomir Surdilovic 2012-04-17 15:13:57 UTC
I added an extra check where console now will check if the guvnor package has been built or not. If it has not the package will be excluded from the list of available packages. This fix is checked into the jBPM 5.2.x branch.

Comment 9 Ryan Zhang 2012-04-23 07:35:52 UTC
Update status to ON_QA. Please verify them against ER6.

Comment 11 Ryan Zhang 2012-05-23 06:08:58 UTC
I saw this still happened to ER6, ER7. 
So would it be to ER8 if not fixed.
Send an notification to Tihomir. I would leave the status updates to QE or developer.

Comment 12 Ryan Zhang 2012-05-23 06:35:51 UTC
Have a futher look on this issue.
The Tihomir'fix seems to be override by other fix commit later on file
jbpm/jbpm-gwt/jbpm-gwt-shared/src/main/java/org/jbpm/integration/console/shared/GuvnorConnectionUtils.java

Comment 13 Maciej Swiderski 2012-05-23 10:16:48 UTC
Correct, I missed one place where new method should be used. Fixed and committed into master and 5.3.x. As it is not marked as blocker I did not merge it to 5.2.x. Let me know if I shall merge it there as well.

Comment 14 Maciej Swiderski 2012-05-23 16:21:47 UTC
Fix merged into 5.2.x

Comment 15 Ryan Zhang 2012-05-25 09:07:47 UTC
Please verify them on ER8.

Comment 16 Zuzana Krejčová 2012-05-29 11:02:19 UTC
Packages are built if no build exists and rebuild when changes are made in them, so no NPEs due to missing binaries occur.