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

Bug 900925 (JBPAPP6-1382)

Summary: application.xml does not support property replacement
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Tom Fonteyne <tfonteyn>
Component: EEAssignee: baranowb <bbaranow>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.0CC: bbaranow, cdewolf, nmone, tfonteyn
Target Milestone: ---   
Target Release: EAP 6.3.1   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-1382
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-26 10:12:42 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
PropertyTest.ear none

Description Tom Fonteyne 2012-09-24 15:15:06 UTC
Help Desk Ticket Reference: https://c.na7.visual.force.com/apex/Case_View?id=500A000000Auj26
Steps to Reproduce: Make sure to set:

<subsystem xmlns="urn:jboss:domain:ee:1.1">
  <spec-descriptor-property-replacement>
  true
  </spec-descriptor-property-replacement>
  <jboss-descriptor-property-replacement>
  true
  </jboss-descriptor-property-replacement>
</subsystem>

Attached is a test case. Deploy and access the URL
It will show 'web-test' ${sysProp:'app-test'} 

indicating that substitution ins application.xml was not done.

See application.xml:

  <env-entry>
        <env-entry-name>test</env-entry-name>
        <env-entry-type>java.lang.String</env-entry-type>
        <env-entry-value>${sysProp:'app-test'}</env-entry-value>
  </env-entry>

in web.xml

 <context-param>
  <param-name>webtest</param-name>
  <param-value>${sysProp:'web-test'}</param-value>
 </context-param>

I did some digging:

org/jboss/metadata/parser/util/MetaDataElementParser.java:

139         if (DescriptionGroupMetaDataParser.parse(reader, earMetaData.getDescriptionGroup())) {
140             return;
141         }
142         if (EnvironmentRefsGroupMetaDataParser.parse(reader, earMetaData.getEarEnvironmentRefsGroup())) {
143             return;
144         }

are not calling the parse method with the "propertyReplacer"

project_key: JBPAPP6

Property substitution in application.xml does not work

Comment 1 Tom Fonteyne 2012-09-24 15:16:00 UTC
Link: Added: This issue Cloned to JBPAPP-10007


Comment 2 Tom Fonteyne 2012-09-24 15:24:21 UTC
Attachment: Added: PropertyTest.ear


Comment 3 Tom Fonteyne 2012-09-24 15:29:52 UTC
Steps to Reproduce: Removed: Attached is a test case. Deploy and access the URL
It will show ${sysProp:'web-test'} ${sysProp:'app-test'}

indicating that substitution was not done.

See application.xml:

  <env-entry>
        <env-entry-name>test</env-entry-name>
        <env-entry-type>java.lang.String</env-entry-type>
        <env-entry-value>${sysProp:'app-test'}</env-entry-value>
  </env-entry>

in web.xml

 <context-param>
  <param-name>webtest</param-name>
  <param-value>${sysProp:'web-test'}</param-value>
 </context-param>

I did some digging:

org/jboss/metadata/parser/util/MetaDataElementParser.java:

139         if (DescriptionGroupMetaDataParser.parse(reader, earMetaData.getDescriptionGroup())) {
140             return;
141         }
142         if (EnvironmentRefsGroupMetaDataParser.parse(reader, earMetaData.getEarEnvironmentRefsGroup())) {
143             return;
144         }

are not calling the parse method with the "propertyReplacer"

I suspect the one for web.xml to be similar. Added: Make sure to set:

<subsystem xmlns="urn:jboss:domain:ee:1.1">
  <spec-descriptor-property-replacement>
  true
  </spec-descriptor-property-replacement>
  <jboss-descriptor-property-replacement>
  true
  </jboss-descriptor-property-replacement>
</subsystem>

Attached is a test case. Deploy and access the URL
It will show 'web-test' ${sysProp:'app-test'} 

indicating that substitution ins application.xml was not done.

See application.xml:

  <env-entry>
        <env-entry-name>test</env-entry-name>
        <env-entry-type>java.lang.String</env-entry-type>
        <env-entry-value>${sysProp:'app-test'}</env-entry-value>
  </env-entry>

in web.xml

 <context-param>
  <param-name>webtest</param-name>
  <param-value>${sysProp:'web-test'}</param-value>
 </context-param>

I did some digging:

org/jboss/metadata/parser/util/MetaDataElementParser.java:

139         if (DescriptionGroupMetaDataParser.parse(reader, earMetaData.getDescriptionGroup())) {
140             return;
141         }
142         if (EnvironmentRefsGroupMetaDataParser.parse(reader, earMetaData.getEarEnvironmentRefsGroup())) {
143             return;
144         }

are not calling the parse method with the "propertyReplacer"



Comment 4 Anne-Louise Tangring 2012-11-13 20:57:52 UTC
Docs QE Status: Removed: NEW 


Comment 5 Brian Stansberry 2013-06-04 20:48:40 UTC
This should be fixed in EAP 6.1.0, as the upstream fix (AS7-5835) is included in 6.1.