Bug 767662

Summary: gwt-console-server component cannot talk to Guvnor if guvnor.connect.timeout and guvnor.read.timeout properties are not set
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Jiri Locker <jlocker>
Component: jBPM ConsoleAssignee: Kris Verlaenen <kverlaen>
Status: VERIFIED --- QA Contact: Jiri Locker <jlocker>
Severity: high Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.0.GACC: lpetrovi
Target Milestone: ---   
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: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jiri Locker 2011-12-14 16:11:48 UTC
Description of problem:
In org.jbpm.integration.console.shared.GuvnorConnectionUtils these properties default to "" (empty string) and later they are parsed as integer values so a  NumberFormatException occurs.

This was pretty cumbersome to debug, because only exception message is logged:
2011-12-14 16:32:28,783 ERROR [org.jbpm.integration.console.shared.GuvnorConnectionUtils] (http-127.0.0.1-8080-4) Error retriving packages from guvnor: For input string: ""

When fixing this please look at the rest of the code and try to make sure that if serious exception occurs that can't be recovered from, it is logged with the stack trace, too, not only its message, which might be confusing.

Version-Release number of selected component (if applicable):
BRMS-5.3.0.DEV5

How reproducible:


Steps to Reproduce:
1. make sure guvnor.connect.timeout and guvnor.read.timeout properties are not set in gwt-console-server.war/WEB-INF/classes/jbpm.console.properties (which is default in the tested build)
2. open Process Overview in the BPM console
3. no processes show up, error message is logged in server log
  
Actual results:


Expected results:
guvnor.connect.timeout and guvnor.read.timeout should default to a value that makes sense, so the properties can be omitted in the properties file

Additional info:

Comment 1 Tihomir Surdilovic 2011-12-20 15:22:12 UTC
Can you describe to me a usecase where an user would go into the jbpm.console.properties file (which has the defaults set) and actually remove them rather than changing to something that makes more sense to them?

Thanks.

Comment 2 Jiri Locker 2011-12-21 12:10:54 UTC
Good point, but, as I mentioned in the 1. step to reproduce, in the product builds that we receive the properties file is missing these two properties. As a result the processes don't show up in the console (see bug 727440) and it really sucks to debug such issues when there's no exception in the log.

I'm not sure if it is an issue that the two properties are missing, but I am certain that there are several issues in the GuvnorConnectionUtils code. That's why this bug was reported.

Let me summarize:

1) if I load a property that I know to be later converted to number and I am using a default value in case it is not set in the properties file, then I need to use a default value that makes sense (e.i. not "", but something like "0" or "1000")

2) this is more important in case that the code doing the conversion is called inside a try-catch block which catches any Exception and only logs it's message (no stack trace).

This is not QE-friendly and is worth fixing, I believe :)

Comment 3 Tihomir Surdilovic 2011-12-31 20:18:45 UTC
Fix committed to the jBPM 5.2.x branch (see also https://issues.jboss.org/browse/JBPM-3472).

Comment 4 Jiri Locker 2012-01-09 16:59:16 UTC
Fixed, many thanks!