Bug 964202

Summary: Error on attempt to add connection definitions to a resource adapter if the there are resource adapters with the same name configured in another profile
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Leticia Konno <lkonno>
Component: Web ConsoleAssignee: baranowb <bbaranow>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.1, 6.1.0CC: bbaranow, brian.stansberry, cdewolf, hbraun, hpehl, jcechace, myarboro, rdickens, rhatlapa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-16 13:21:46 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
domain.xml
none
WFLY domain.xml none

Description Leticia Konno 2013-05-17 14:19:22 UTC
Created attachment 749355 [details]
domain.xml

Description of problem:

It is not possible to configure any connection definition to the resource adapter using the the management console if the resource adapter has the same name of an resource adapter configured in another profile.

Version-Release number of selected component (if applicable):
JBoss EAP 6.0.1

How reproducible:

Steps to Reproduce:
1. configure resource adapters with the same name in different profiles (domain.xml attached)
3 - restart JBoss
2. try to add a connection definition (the configuration works in the first profile defined in the domain.xml)

In the CLI is possible to see that "->1", "-2" is added to the resource adapter names (except to the ra configured in the first profile) :

[domain@localhost:9999 resource-adapter] /profile=default/subsystem=resource-adapters:read-resource
{
    "outcome" => "success",
    "result" => {"resource-adapter" => {"test" => undefined}}
}
[domain@localhost:9999 resource-adapter] /profile=ha/subsystem=resource-adapters:read-resource
{
    "outcome" => "success",
    "result" => {"resource-adapter" => {"test->1" => undefined}}
}
[domain@localhost:9999 resource-adapter] /profile=full/subsystem=resource-adapters:read-resource
{
    "outcome" => "success",
    "result" => {"resource-adapter" => {"test->2" => undefined}}
}
[domain@localhost:9999 resource-adapter] /profile=full-ha/subsystem=resource-adapters:read-resource
{
    "outcome" => "success",
    "result" => {"resource-adapter" => {"test->3" => undefined}}
}

Actual results: 

error from management console:

Unexpected HTTP response: 500

Request
{
    "address" => [],
    "operation" => "composite",
    "steps" => [{
        "enabled" => false,
        "security-application" => true,
        "jndi-name" => "java:/test",
        "background-validation" => false,
        "class-name" => "test",
        "operation" => "add",
        "address" => [
            ("profile" => "ha"),
            ("subsystem" => "resource-adapters"),
            ("resource-adapter" => "test"),
            ("connection-definitions" => "java:/test")
        ]
    }]
}

Response

Internal Server Error
{
    "outcome" => "failed",
    "result" => {"step-1" => {
        "outcome" => "failed",
        "failure-description" => "JBAS014766: Resource [
    (\"profile\" => \"ha\"),
    (\"subsystem\" => \"resource-adapters\"),
    (\"resource-adapter\" => \"test\")
] does not exist; a resource at address [
    (\"profile\" => \"ha\"),
    (\"subsystem\" => \"resource-adapters\"),
    (\"resource-adapter\" => \"test\"),
    (\"connection-definitions\" => \"java:/test\")
] cannot be created until all ancestor resources have been added",
        "rolled-back" => true
    }},
    "failure-description" => {"domain-failure-description" => {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "JBAS014766: Resource [
    (\"profile\" => \"ha\"),
    (\"subsystem\" => \"resource-adapters\"),
    (\"resource-adapter\" => \"test\")
] does not exist; a resource at address [
    (\"profile\" => \"ha\"),
    (\"subsystem\" => \"resource-adapters\"),
    (\"resource-adapter\" => \"test\"),
    (\"connection-definitions\" => \"java:/test\")
] cannot be created until all ancestor resources have been added"}}},
    "rolled-back" => true
}

Comment 1 Leticia Konno 2013-06-03 11:11:12 UTC
This issue also affects JBoss EAP 6.1. GUI doesn't allow to disable/remove connection definitions and admin objects.

Comment 2 baranowb 2013-06-04 13:20:17 UTC
I claim thee.

Comment 4 baranowb 2013-06-06 11:20:39 UTC
Created attachment 757613 [details]
WFLY domain.xml

Attaching WFLY domain.xml, original file contains JAXR refs, which make server explode.

Comment 6 JBoss JIRA Server 2013-06-11 10:50:17 UTC
Bartosz Baranowski <bbaranow> made a comment on jira WFLY-1492

The "is more adapters" should be understood as "if different profiles define adapter in the same way - without ID as in first snippet"

Comment 8 JBoss JIRA Server 2013-06-24 14:38:52 UTC
Bartosz Baranowski <bbaranow> made a comment on jira WFLY-1492

Just to get some feedback: https://github.com/baranowb/core/tree/WFLY-1492

Comment 9 JBoss JIRA Server 2013-06-26 12:27:53 UTC
Bartosz Baranowski <bbaranow> made a comment on jira WFLY-1492

Since noone was against, PRs are up.

Comment 10 baranowb 2013-06-26 12:31:58 UTC
1.5.x:  https://github.com/hal/core/pull/7 
master: https://github.com/hal/core/pull/8

Comment 14 Jakub Cechacek 2014-07-16 13:21:46 UTC
This issue reported against older version, cannot be reproduced against latest 6.3.0. bits, which means it was fixed earlier. Therefore, we are closing this bug. Thank you for reporting this issue.

Comment 15 Red Hat Bugzilla 2023-09-14 01:44:16 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days