0

I am trying to implement Primeface Exception Handler

My faces-config.xml

<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
version="2.2">

<!-- JSF and Spring are integrated -->
<application>
    <el-resolver>
        org.springframework.web.jsf.el.SpringBeanFacesELResolver
    </el-resolver>
</application>

</faces-config>

when I add the primefaces EL Resolver and factory in config, as follow, my tomcat fail start.

<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
version="2.2">

<!-- JSF and Spring are integrated -->
<application>
    <el-resolver>
        org.springframework.web.jsf.el.SpringBeanFacesELResolver
    </el-resolver>
    <el-resolver>
        org.primefaces.application.exceptionhandler.PrimeExceptionHandlerELResolver
    </el-resolver>
</application>

<factory>
    <exception-handler-factory>
        org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory
    </exception-handler-factory>
</factory>

</faces-config>

enter image description here

any update ?

-----------EDIT----------

I changes the tomcat version from 7.0.42 to 7.0.64, it showing me the following exception.

SEVERE: Critical error during deployment: 
com.sun.faces.config.ConfigurationException: Factory 'javax.faces.context.ExceptionHandlerFactory' was not configured properly. 
Caused by: javax.faces.FacesException: org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory
Caused by: java.lang.ClassNotFoundException: org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory 

for detail in exception , please click Exception Detail

5
  • What do you have in the catalina.out logfile? Commented Sep 7, 2015 at 16:10
  • @GergelyBacso I just change to next version, now it showing the reason on console. plz see my Edit in above post. thanks Commented Sep 7, 2015 at 16:50
  • Strange. Do you have the jar containing PrimeExceptionHandlerFactory.class in your WEB-INF/lib? Commented Sep 7, 2015 at 17:19
  • @GergelyBacso I just upgrade primefaces from 4 to 5, issue resolved ! thanks for your precious time Commented Sep 7, 2015 at 17:23
  • Good news. Must have been really annoying to look for this. Commented Sep 7, 2015 at 17:39

1 Answer 1

1

So the solution was to include the right version of PrimeFaces (5.0), previous versions did not contain this class.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.