Multiple dependent Netty3 applications on the same JBoss server. Analysis and solution of conflict problem in deployment

Source: Internet
Author: User

A recent project encountered a problem in the wildfly-8.1.0 of the same server deployment of multiple wars, and these wars are dependent on netty3, resulting in only one war package success, after troubleshooting, found to be a bug in the JBoss server itself (https ://issues.jboss.org/browse/immutant-144), because JBoss itself can only register once for the same "extension", And Netty3 in the jboss-beans.xml is to provide plug-in services, multiple scan registration will be reported duplicateserviceexception.

The detailed analysis process is as follows

Exceptions to the startup process:

Internal Server error{    "outcome" = "Failed",    "result" = Undefined,    "failure-description" and "=" Jbas010839:operation failed or is rolled back on all servers. ",    " rolled-back "= True,    " server-groups "=        Ed ",        " failure-description "+ = {" Jbas014671:failed services "and" jboss.deployment.unit.\ "wd-web-in.war\". INSTALL "=" org.jboss.msc.service.StartException in service jboss.deployment.unit.\ "Wd-web-in.war\". INSTALL:JBAS018733:Failed to process phase INSTALL of deployment \ "Wd-web-in.war\"    caused By:org.jboss.msc.service . Duplicateserviceexception:service jboss.pojo.\ "Org.jboss.netty.internal.loggerconfigurator\". Described is already registered "}},        " rolled-back "= + True}}}}    
According to the anomaly.
Org.jboss.netty.internal.LoggerConfigurator
Keyword query to JBoss bug list https://issues.jboss.org/browse/IMMUTANT-144


The Chinese explanation is "error occurs when deploying two applications all depend on Io.netty/netty"

Jim Crossley's solution below is "removed the Pojo subsystem from Standalone.xml. This prevents the random jboss-beans.xml files from being discovered/deployed. The Netty jar contains one. " The Chinese means "remove Pojo subsystem from Standalone.xml, which prevents any jboss-beans.xml files from being discovered/deployed, and the Netty jar contains a".

Here is a comparison of the jar package of the Netty3 with the jar of the Netty4:

Obviously there is a jboss-beans.xml file in Netty3, here is a question,what is the role of jboss-beans.xml in netty3.5 ?

Check the information that is similar to the role of Plugin.xml, that is, the loading of plug-ins, netty3 in the Jboss-beans.xml content as follows:

<deployment xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"            xsi:schemalocation= "Urn:jboss: Bean-deployer bean-deployer_2_0.xsd "            xmlns=" urn:jboss:bean-deployer:2.0 ">  <bean name=" Org.jboss.netty.internal.LoggerConfigurator "        class=" Org.jboss.netty.container.microcontainer.NettyLoggerConfigurator "/></deployment>
This is because of this duplicate registration bug, this bug is due to the installation of the extension <extension module= "Org.jboss.as.pojo"/>caused, can be resolved from this pojo, you can also directly to the dependent Netty3 jar Package Jboss-beans.xml Delete, the deleted package is placed in the Webapp\web-inf\lib directory

The question is, What is the role of this Pojo ? The official documentation is explained below


The deployment of the application includes the JBoss Microcontainer service, which supports an earlier version of the JBoss application server, which means that it is optional . Then delete, in the corresponding mode (profile) to find <subsystem xmlns= "urn:jboss:domain:pojo:1.0"/> then delete, restart the server, found can be deployment.

Set profile

Set up the deployment on the same logical service node:


Start the service

Jboss-deployment-structure.xml role: prevent servers from automatically adding some dependencies

The contents are as follows:

<jboss-deployment-structure>    <deployment>        <!--exclusions allow for prevent the server from Automatically adding some dependencies     -        <exclusions>            <module name= "org.slf4j"/>        <module name= "org.sl4j.jcl-over-slf4j"/>        <module name= "Org.slf4j.impl"/>        <module Name= "Org.jboss.logging.jul-to-slf4j-stub"/>        <module name= "Io.netty"/> <module name=        " Org.jboss.netty "/>        </exclusions>    </deployment></jboss-deployment-structure>
avoids recurring conflict issues with Netty and JBoss that are referenced in the application


Multiple dependent Netty3 applications on the same JBoss server. Analysis and solution of conflict problem in deployment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.