Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1051469

Summary: NPE when building project with kbase or ksession that are not in xsd:ID format
Product: [Retired] JBoss BRMS Platform 6 Reporter: Jiri Locker <jlocker>
Component: Business CentralAssignee: Toni Rikkola <trikkola>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Locker <jlocker>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: etirelli, rzhang
Target Milestone: CR1   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:17:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
server.log with NPE none

Description Jiri Locker 2014-01-10 11:03:44 UTC
Description of problem:
kmodule.xsd requires kbase and ksession names to be xsd:ID strings. If the user enters name containing e.g. spaces (' ') or colons (':') kmodule.xml becomes XSD-invalid. Attempt to build the project will result with error message saying "Unable to complete your request. The following exception occurred: null." and NullPointerException in server log. No explanation of what is wrong.

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

How reproducible:
-

Steps to Reproduce:
1. open Project Editor
2. add kbase named 'my kbase', optionally add ksession named 'stateful session 1'
3. save and build the project

Actual results:
Build request doesn't finish (it doesn't even finish with failure result and error explanation). NPE in server log.

Expected results:
Build should complete as failure and result with list of errors. User input validation would be nice.

Additional info:
The xsd:ID type constraint:
https://github.com/droolsjbpm/droolsjbpm-knowledge/blob/master/kie-api/src/main/resources/org/kie/api/kmodule.xsd#L21

The xsd:ID type definition:
http://www.schemacentral.com/sc/xsd/t-xsd_ID.html

Comment 1 Jiri Locker 2014-01-10 11:09:11 UTC
Created attachment 848133 [details]
server.log with NPE

Comment 2 Edson Tirelli 2014-01-10 13:52:18 UTC
We will try to include this in 6.0.0.GA, but since we are very close to the deadline, if we are unable to finish in time, it will be postponed to 6.0.1.GA.

Comment 3 Toni Rikkola 2014-01-13 12:47:35 UTC
master: https://github.com/droolsjbpm/kie-wb-common/commit/2f2cc6cdb

Comment 4 Toni Rikkola 2014-01-13 14:12:17 UTC
6.0.x: https://github.com/droolsjbpm/kie-wb-common/commit/ed4616e19

Comment 5 Jiri Locker 2014-01-22 14:04:39 UTC
User input is now validated. Error dialog explaining constraints for kbase/ksession name is displayed when wrong value is submitted.