John Mazzitelli created AS7-5336:
------------------------------------
Summary: java:properties element in SAR deployments are no longer supported
Key: AS7-5336
URL:
https://issues.jboss.org/browse/AS7-5336
Project: Application Server 7
Issue Type: Feature Request
Affects Versions: 7.1.1.Final
Reporter: John Mazzitelli
I have a SAR deployment that works in AS 4.2.3. It no longer deploys in AS 7.1.1.Final.
The problem is due to the fact that the java:properties element is no longer supported in
AS 7 whereas it was supported in AS 4.2.3.
Here's what my jboss-service.xml looks like that FAILS to parse in AS 7 (this works in
AS 4.2.3):
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="urn:jboss:service:7.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:service:7.0 jboss-service_7_0.xsd">
<mbean
code="org.rhq.enterprise.server.core.comm.ServerCommunicationsService"
name="rhq:service=ServerCommunications">
<attribute name="ConfigurationOverrides"
serialDataType="jbxb">
<java:properties xmlns:java="urn:jboss:java-properties"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="urn:jboss:java-properties
resource:java-properties_1_0.xsd">
<java:property>
<java:key>foo</java:key>
<java:value>bar</java:value>
</java:property>
</java:properties>
</attribute>
</mbean>
</server>
Notice the <attribute> has a child "java:properties" because the MBean
uses Properties as the attribute type.
Here's the AS7 error I see in the log when that SAR attempts to be deployed:
22:30:31,921 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed
to start service
jboss.deployment.unit."rhq-enterprise-server-services.sar".PARSE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."rhq-enterprise-server-services.sar".PARSE: Failed to
process phase PARSE of deployment "rhq-enterprise-server-services.sar"
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119)
[jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[rt.jar:1.6.0_29]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[rt.jar:1.6.0_29]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017224:
Failed to parse service xml
["/home/mazz/source/rhq/dev-container/jbossas/standalone/deployments/rhq-enterprise-server-services.sar/META-INF/jboss-service.xml"]
at
org.jboss.as.service.ServiceDeploymentParsingProcessor.deploy(ServiceDeploymentParsingProcessor.java:95)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)
[jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: java.lang.IllegalStateException: Not a textual event (START_ELEMENT)
at com.ctc.wstx.sr.BasicStreamReader.throwNotTextual(BasicStreamReader.java:5444)
at com.ctc.wstx.sr.BasicStreamReader.getText(BasicStreamReader.java:833)
at
org.jboss.staxmapper.XMLExtendedStreamReaderImpl.getText(XMLExtendedStreamReaderImpl.java:275)
[staxmapper-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.unexpectedContent(JBossServiceXmlDescriptorParser.java:622)
at
org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.parseAttribute(JBossServiceXmlDescriptorParser.java:346)
at
org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.parseMBean(JBossServiceXmlDescriptorParser.java:257)
at
org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.readElement(JBossServiceXmlDescriptorParser.java:183)
at
org.jboss.as.service.descriptor.JBossServiceXmlDescriptorParser.readElement(JBossServiceXmlDescriptorParser.java:46)
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
[staxmapper-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
[staxmapper-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.service.ServiceDeploymentParsingProcessor.deploy(ServiceDeploymentParsingProcessor.java:88)
... 6 more
If I were to completely remove the <attribute> XML and the child elements, this SAR
deploys in AS7 without that error. I can only assume the source of the problem is because
<java:properties> type is no longer supported.
I don't know if this means anything but I looked in
<as7-install-dir>/docs/schema and I do not see any java-properties_1_0.xsd (this
file that is hosted on
jboss.org:
http://www.jboss.org/j2ee/schema/java-properties_1_0.xsd
)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira