I am trying to close a CRUD application on Wildfly 10. The project has two data dates for connection with production and nine databases. Each configuration for date data is marked with the @Profile annotation. To specify a profile in standalone.xml added to JVM_OPTS -Dspring.profiles.active=production . When I run wildfly, I see this line in jvm_opts. After deploying my application, I click enable and get the following error:

 org.jboss.msc.service.DuplicateServiceException: Service jboss.pojo.\"org.jboss.netty.internal.LoggerConfigurator\". DESCRIBED is already registered"}} 

How can I fix the problem?

    1 answer 1

    The problem was solved by completely restarting the server.

    Indeed, in the project there are two beans with one interface, so automatic binding is difficult for which bean to use. Bins are marked with the corresponding annotations @Profile and in java opts a profile is specified on the wildfly. However, with each new application Deploy has to completely restart the server to fix the error.