1

Trying to migrate to JSF 2.2 based on this answer: When I create the jboss-deployment-structure.xml file with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
    <deployment>

        <exclusions>
            <module name="javax.faces.api" />
        </exclusions>
    </deployment>
</jboss-deployment-structure>

I get the following error:

13:19:58,336 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.unit."wsait.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."wsait.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "wsait.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
    at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
Caused by: java.lang.NoClassDefFoundError: javax/faces/validator/ValidatorException
    at java.lang.Class.getDeclaredConstructors0(Native Method) [rt.jar:1.7.0_45]
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2493) [rt.jar:1.7.0_45]
    at java.lang.Class.getConstructor0(Class.java:2803) [rt.jar:1.7.0_45]
    at java.lang.Class.getConstructor(Class.java:1718) [rt.jar:1.7.0_45]
    at org.jboss.as.web.deployment.jsf.JsfManagedBeanProcessor.deploy(JsfManagedBeanProcessor.java:108)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    ... 5 more
Caused by: java.lang.ClassNotFoundException: javax.faces.validator.ValidatorException from [Module "deployment.wsait.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
    ... 11 more

13:19:58,352 INFO  [org.jboss.as] (MSC service thread 1-6) JBAS015951: Admin console listening on http://127.0.0.1:9990
13:19:58,352 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "wsait.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"wsait.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"wsait.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"wsait.war\""}}
13:19:58,352 ERROR [org.jboss.as] (MSC service thread 1-6) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 6452ms - Started 154 of 248 services (1 services failed or missing dependencies, 76 services are passive or on-demand)
13:19:58,519 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment wsait.war in 168ms
13:19:58,524 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.deployment.unit."wsait.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."wsait.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "wsait.war"

13:19:58,524 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"wsait.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"wsait.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"wsait.war\""}}}}

These are the frameworks I am using:

Shiro 1.2.3
Mojarra 2.1.7
Primefaces 5.1
JDK 1.7
JBoss 7.1.1

What is my problem?

Community
  • 1
  • 1
John Alexander Betts
  • 4,718
  • 8
  • 47
  • 72
  • You need to include the new jsf 2.2 implementation, when you are exclouding the old – Aksel Willgert Dec 21 '14 at 07:53
  • You said that you are migrating from JSF 2.1 to JSF 2.2 and you mentioned Mojarra 2.1.7. What exact version of JSF are you targeting? – Tiny Dec 21 '14 at 11:51
  • I am trying to migrate to 2.2.4 version – John Alexander Betts Dec 21 '14 at 12:02
  • You might have some legacy dependencies lurking somewhere in your container or that version of JBoss might dislike JSF 2.2. Did you precisely remove the old version prior to the update? Did you precisely make corresponding changes in the associated config files? Are you sure about using either of these - [**javax.faces**](http://repo1.maven.org/maven2/org/glassfish/javax.faces/2.2.4/) or ([**jsf-api**](https://maven.java.net/content/repositories/releases/com/sun/faces/jsf-api/2.2.4/), [**jsf-impl**](https://maven.java.net/content/repositories/releases/com/sun/faces/jsf-impl/2.2.4/))? – Tiny Dec 21 '14 at 17:57
  • 3
    Exception suggests that JSF API is missing in runtime classpath, which is also confirmed by the exclusion in modules. The way how you're attempting to upgrade it is also somewhat vague. Are you trying to do it via Maven? In any case, those instructions should work out for latest 2.2.x as well: http://stackoverflow.com/questions/17085717/upgrade-and-use-mojarra-as-the-jsf-implementation-with-jboss-server/ Let me know if this is the case. – BalusC Dec 22 '14 at 12:47
  • I am using maven with jsf-api and jsf-impl dependencies. I will try @BalusC suggestion for now – John Alexander Betts Dec 22 '14 at 19:46

0 Answers0