Bug 1127818 - Configuration of EAP 6 datasource resource is invalid when a system property is used in configuration for pool sizes
Summary: Configuration of EAP 6 datasource resource is invalid when a system property ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 6
Version: JON 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER03
: JON 3.3.0
Assignee: Libor Zoubek
QA Contact: Filip Brychta
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-07 15:32 UTC by Filip Brychta
Modified: 2015-11-02 00:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-11 14:04:19 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1072543 None None None Never

Internal Links: 1072543

Description Filip Brychta 2014-08-07 15:32:12 UTC
Description of problem:
When you set min-pool-size or max-pool-size manually in standalone.xml to e.g.
${my.nonxa.maxpool:5} the server is started correctly, but configuration of datasource in JON becomes invalid (string value for those properties is not expected) and any further attempt to update this configuration in JON fails.

Version-Release number of selected component (if applicable):
Version :	
3.3.0.DR01
Build Number :	
6468454:dda0a47

How reproducible:
Always

Steps to Reproduce:
1. install and start eap6 standalone
2. import it to jon inventory
3. navigate to this resource->datasources->ExampleDS->Configuration
4. disable this datasource and change default values for min-pool-size and max-pool-size (this will add them to standalone.xml)
5. stop eap6 and edit standalone.xml
  - set min-pool-size to ${my.nonxa.minpool:5}
  - set max-pool-size to ${my.nonxa.maxpool:15}
6. start the eap6 again
7. navigate to datasources->ExampleDS->Configuration and try to change some value keeping min-pool-size and max-pool-size unchanged
 

Actual results:
Configuration update fails with:
java.lang.NumberFormatException: For input string: "${my.nonxa.minpool:5}"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:481)
	at java.lang.Integer.valueOf(Integer.java:582)
	at org.rhq.modules.plugins.jbossas7.ConfigurationWriteDelegate.getObjectWithType(ConfigurationWriteDelegate.java:704)
	at org.rhq.modules.plugins.jbossas7.ConfigurationWriteDelegate.preparePropertySimple(ConfigurationWriteDelegate.java:529)
	at org.rhq.modules.plugins.jbossas7.ConfigurationWriteDelegate.createWriteAttributePropertySimple(ConfigurationWriteDelegate.java:453)
	at org.rhq.modules.plugins.jbossas7.ConfigurationWriteDelegate.createWriteAttribute(ConfigurationWriteDelegate.java:332)
	at org.rhq.modules.plugins.jbossas7.ConfigurationWriteDelegate.updateProperty(ConfigurationWriteDelegate.java:324)
	at org.rhq.modules.plugins.jbossas7.ConfigurationWriteDelegate.updateGenerateOperationFromProperties(ConfigurationWriteDelegate.java:130)
	at org.rhq.modules.plugins.jbossas7.ConfigurationWriteDelegate.updateResourceConfiguration(ConfigurationWriteDelegate.java:103)
	at org.rhq.modules.plugins.jbossas7.DatasourceComponent.updateResourceConfiguration(DatasourceComponent.java:331)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Expected results:
Configuration is updated correctly

Additional info:
Workaround:
Both properties must be set to integer and then the configuration update works.

I guess this is general problem for all properties which are expected to be integer on JON side, but eap6 configuration allows strings.

Comment 1 Libor Zoubek 2014-09-03 09:03:43 UTC
in master

commit 0819241a4b78ee26cb7978b5dd5bbf5dc770beb6
Author: Libor Zoubek <lzoubek@redhat.com>
Date:   Wed Sep 3 09:23:34 2014 +0200

    Bug 1127818 - Configuration of EAP 6 datasource resource is invalid when a
    system property is used in configuration for pool sizes
    
    max/min-pool-size config properties changed to string type.

release branch
commit 3d1e93a22210e6fb681d8f05b4ae7f315f87a78a
Author: Libor Zoubek <lzoubek@redhat.com>
Date:   Wed Sep 3 09:23:34 2014 +0200

    Bug 1127818 - Configuration of EAP 6 datasource resource is invalid when a
    system property is used in configuration for pool sizes
    
    max/min-pool-size config properties changed to string type.
    
    (cherry picked from commit 0819241a4b78ee26cb7978b5dd5bbf5dc770beb6)
    Signed-off-by: Libor Zoubek <lzoubek@redhat.com>

Comment 2 Simeon Pinder 2014-09-17 02:49:37 UTC
Moving to ON_QA as available for test with the following brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=385149

Comment 3 Filip Brychta 2014-09-17 11:43:26 UTC
Verified on
Version :	
3.3.0.ER03
Build Number :	
4aefe39:44e33a4


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