0

我试图在 domain.xml ( Jboss EAP ) 的 extensions 元素中添加一个新属性。

<domain xmlns="urn:jboss:domain:1.4">
    <extensions>
        <extension module="org.jboss.as.clustering.infinispan"/>
        <extension module="org.jboss.as.clustering.jgroups"/>
        <extension module="org.jboss.as.cmp"/>
        <extension module="org.jboss.as.configadmin"/>
        <extension module="org.jboss.as.connector"/>
        <extension module="org.jboss.as.ee"/>
        <extension module="org.jboss.as.ejb3"/>
        <extension module="org.jboss.as.jacorb"/>
        <extension module="org.jboss.as.jaxr"/>
        <extension module="org.jboss.as.jaxrs"/>
        <extension module="org.jboss.as.jdr"/>
        <extension module="org.jboss.as.jmx"/>
        <extension module="org.jboss.as.jpa"/>
        <extension module="org.jboss.as.jsf"/>
        <extension module="org.jboss.as.jsr77"/>
        <extension module="org.jboss.as.logging"/>
        <extension module="org.jboss.as.mail"/>
        <extension module="org.jboss.as.messaging"/>
        <extension module="org.jboss.as.modcluster"/>
        <extension module="org.jboss.as.naming"/>
        <extension module="org.jboss.as.pojo"/>
        <extension module="org.jboss.as.remoting"/>
        <extension module="org.jboss.as.sar"/>
        <extension module="org.jboss.as.security"/>
        <extension module="org.jboss.as.threads"/>
        <extension module="org.jboss.as.transactions"/>
        <extension module="org.jboss.as.web"/>
        <extension module="org.jboss.as.webservices"/>
        <extension module="org.jboss.as.weld"/>
    </extensions>
</domain>

以下是我尝试过的命令。请让我知道我是否做错了什么。

set /augeas/load/xml/lens "Xml.lns" 
set /augeas/load/xml/incl "/opt/domain.xml"
load
set /files/opt/domain.xml/domain/extensions/#attribute/name = "arunraj"
save

我收到以下错误。请指导我如何分析或调试它。

A-Z_a-z-] / = /#empty/ } | { /#pi/ })\n 与树\n { \"#text\" = \"\n \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \ "扩展\" = \"#empty\" } { \"#text\" = \" \" } { \"扩展\" = \"#empty\" } { \"#text\" = \" \ " } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"extension\" = \"#empty\" } { \" #text\" = \" \" } { \"扩展名\" = \"#empty\" } { \"#text\"= \" \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"extension\" = \"#empty\" } { \" #text\" = \" \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"extension\" = \" #empty\" } { \"#text\" = \" \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"extension\ " = \"#empty\" } { \"#text\" = \" \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"extension\" = \"#empty\" } { \"# text\" = \" \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"扩展名\" = \"#empty\"} { \"#text\" = \" \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"extension\" = \" #empty\" } { \"#text\" = \" \" } { \"extension\" = \"#empty\" } { \"#text\" = \" \" } { \"extension\ " = \"#empty\" } { \"#text\" = \" \" } { \"#attribute\" }"扩展名\" = \"#empty\" } { \"#text\" = \" \" } { \"#attribute\" }"扩展名\" = \"#empty\" } { \"#text\" = \" \" } { \"#attribute\" }"

4

1 回答 1

1

#attribute您尝试添加的节点必须位于节点之前extension。您需要为此使用insert

augtool> ins #attribute before /files/tmp/domain.xml/domain/extensions/*[1]
augtool> set /files/tmp/domain.xml/domain/extensions/#attribute[1]/name "arunraj"
于 2015-11-09T08:03:51.127 回答