0

i have JSF war file and deployed it to Tomcat8. but, when i started it, there is following exception:

23-Sep-2015 08:55:39.664 INFO [http-nio-4747-exec-15] org.apache.catalina.core.ApplicationContext.log HTMLManager: start: Starting web application '/jsfexample'
23-Sep-2015 08:55:39.709 SEVERE [http-nio-4747-exec-15] org.apache.catalina.core.ApplicationContext.log FAIL - Application at context path /jsfexample could not be started
 org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/jsfexample]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1293)
        ......................
Caused by: java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/faces/webapp/FacesServlet
        at java.lang.ClassLoader.defineClass1(Native Method)
        ... 32 more

23-Sep-2015 08:55:39.711 INFO [http-nio-4747-exec-15] org.apache.catalina.core.ApplicationContext.log HTMLManager: list: Listing contexts for virtual host 'localhost'
Mahsum Akbas
  • 1,523
  • 3
  • 21
  • 38

1 Answers1

3

I had the same problem in Tomcat 7, I solved it with adding complete JSF maven dependencies (I was lacking jsf-impl):

<dependency>
   <groupId>com.sun.faces</groupId>
   <artifactId>jsf-impl</artifactId>
   <version>2.2.12</version>
</dependency>
<dependency>
   <groupId>javax.faces</groupId>
   <artifactId>javax.faces-api</artifactId>
   <version>2.2</version>
</dependency>

I guess the same will work with Tomcat 8.

malaguna
  • 4,183
  • 1
  • 17
  • 33