Migration 这是什么原因造成的;意外元素“;在JBoss配置中抛出XMLStreamValidationException?

Migration 这是什么原因造成的;意外元素“;在JBoss配置中抛出XMLStreamValidationException?,migration,jboss7.x,jboss5.x,Migration,Jboss7.x,Jboss5.x,我正在尝试将一些软件从JBoss5迁移到JBoss7。我被卡住了,因为我的部署失败了,有以下例外。请记住,该软件是在JBoss5中工作的,所以我认为任何不工作的地方都应该是因为JBoss5/7之间的差异 所讨论的行(例外情况中指出的第12行)如下: <application-policy xmlns="urn:jboss:security-beans:1.0" name="MyProjectDatabaseLogin"> 为什么应用程序策略(或它的xmlns值)在这里是意外的?是什

我正在尝试将一些软件从JBoss5迁移到JBoss7。我被卡住了,因为我的部署失败了,有以下例外。请记住,该软件是在JBoss5中工作的,所以我认为任何不工作的地方都应该是因为JBoss5/7之间的差异

所讨论的行(例外情况中指出的第12行)如下:

<application-policy xmlns="urn:jboss:security-beans:1.0" name="MyProjectDatabaseLogin">
为什么
应用程序策略
(或它的
xmlns
值)在这里是意外的?是什么导致此异常



我必须手动键入上面的xml行和错误/异常,因此可能有一些打字错误没有出现在原始文档中,这不会导致问题,虽然我已经在这里重读了好几次我的问题,我不认为我输入了上面的内容。

我最终发现这些可配置项不再应该在同一个文件中。该信息现在应该在服务器的配置文件中,因此您可能会将其放入
domain.xml
文件或
standalone.xml
文件中

这是一个安全应用程序策略,因此此标记的内容现在进入
标记中的
部分

因此,它将如下所示。请注意,
现在是
,它位于
之内。此外,我以前的安全应用程序策略中有两个
,但如果使用新的elytra安全系统,则安全域中只允许使用一个
标记

...
    <security-domains> <!-- Search for this in the file and put the migrated part into here -->
        <security-domain name="MySecurityDomain">
            ... all the stuff that used to be in the security application policy
            ... note that some of the stuff you put in here might need to change depending on the security system used
        </security-domain>
    </security-domains>
...
。。。
... 安全应用程序策略中的所有内容
... 请注意,您在此处输入的某些内容可能需要根据所使用的安全系统进行更改
...
...
    <security-domains> <!-- Search for this in the file and put the migrated part into here -->
        <security-domain name="MySecurityDomain">
            ... all the stuff that used to be in the security application policy
            ... note that some of the stuff you put in here might need to change depending on the security system used
        </security-domain>
    </security-domains>
...