Bug 1265901 - NullPointerException with kie-config-cli.sh after migration from 6.1.0 to 6.1.2
Summary: NullPointerException with kie-config-cli.sh after migration from 6.1.0 to 6.1.2
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER5
: 6.2.0
Assignee: manstis
QA Contact: Jiri Locker
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-24 06:49 UTC by Toshiya Kobayashi
Modified: 2020-03-27 19:40 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:40:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
niogit610.zip (103.54 KB, application/zip)
2015-09-24 06:49 UTC, Toshiya Kobayashi
no flags Details

Description Toshiya Kobayashi 2015-09-24 06:49:41 UTC
Created attachment 1076364 [details]
niogit610.zip

Description of problem:

When you migrate from 6.1.0 to 6.1.2 (a.k.a. 6.1 Update 2), kie-config-cli.sh "add-group-repo" (and add-group-org-unit) throws NullPointerException against a repository which:

- was created in 6.1.0
and
- has no role in "security:roles"

===============================
>>Please enter command (type help to see available commands): 
list-repo
Result:
Currently available repositories: 
	Repository repository1
	 scheme: git
	 uri: git://repository1
	 environment: {username=brmsAdmin, scheme=git, security:roles=[], origin=ssh://brmsAdmin@localhost:8001/repository1, password=****}
	 groups: []

>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>Please enter command (type help to see available commands): 
add-group-repo
>>Repository alias:repository1
>>Security groups (comma separated list):role1
Unhandled exception caught while executing command add-group-repo error: null
java.lang.NullPointerException
	at org.guvnor.structure.backend.repositories.RepositoryServiceImpl.addGroup(RepositoryServiceImpl.java:230)
	at org.guvnor.structure.backend.repositories.RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.addGroup(RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.java)
	at org.kie.config.cli.command.impl.AddGroupToRepositoryCliCommand.execute(AddGroupToRepositoryCliCommand.java:39)
	at org.kie.config.cli.CmdMain.main(CmdMain.java:97)
================================


Steps to Reproduce:
1. Download attached niogit610.zip (pure '.niogit' after BRMS 6.1.0 boot)
2. Copy the '.niogit' directory to BRMS 6.1.2. (This step simulates that you apply the update patch 2 to 6.1.0)
3. Start BRMS 6.1.2
4. Run kie-config-cli.sh (Make sure that the update patch is also applied to supplementary-tools)
 > add-group-repo
 >>Repository alias:repository1
 >>Security groups (comma separated list):role1

Actual results:

It throws NullPointerException

Expected results:

'role1' is added to repository1.

Comment 1 Toshiya Kobayashi 2015-09-24 06:52:12 UTC
I see that BackwardCompatibleUtil should take care of "security:roles". But if "security:roles" was an empty list, it will not be converted to "security:groups".

https://github.com/droolsjbpm/guvnor/blob/6.2.x/guvnor-structure/guvnor-structure-backend/src/main/java/org/guvnor/structure/backend/backcompat/BackwardCompatibleUtil.java#L28

Comment 5 Pavel Kralik 2015-11-06 16:39:12 UTC
BPMS 6.2.0.ER5


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