I'm working on Primefaces + Spring project.Recently we migrated the project from JSF 1.2 to 2.2 Version.Previously our project was using jsf Implementation and API jars from Project's lib folder but now it's using the jars located in,

**\wildfly-10.0.0.Final\modules\system\layers\base\com\sun\jsf-impl\main**

**\wildfly-10.0.0.Final\modules\system\layers\base\javax\faces\api\main**

and it is throwing Services which failed to start error while deploying on wildfly 10.x, JBAS014777: Services which failed to start: service jboss.deployment.unit."abc.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."abc.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "abc.war"

How can configure my project to use lib jars.Which will helps in deployment.

1

There are 1 best solutions below

0
On

Some dependencies are added implicitly by Wildfly 10. You can find a list of them here.

For the web subsystem these are:

  • javaee.api
  • com.sun.jsf-impl
  • org.hibernate.validator
  • org.jboss.as.web
  • org.jboss.logging

If you don't want one of them, like in your case com.sun.jsf-impl, you can exclude them using a jboss-deployment-structure.xml file as explained here.

In your case it might look like this:

<jboss-deployment-structure>
  <deployment>
    <exclusions>
      <module name="com.sun.jsf-impl" />
    </exclusions>
  </deployment>
</jboss-deployment-structure>

Probably you may need more exclusions, but the principle should be clear.