Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener Error on Deployment in NetBeans 7.0.1

Tags:

java

tomcat

I have a web application in struts2 framework in NetBeans 7.0.1. it was working fine. But suddenly the Tomcat has started to give the following error:

SEVERE: Error configuring application listener of class com.sun.faces.config.ConfigureListener
java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
    at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:415)
    at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:397)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4660)
    at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
    at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

Any help?

like image 505
Himanshu Saraswat Avatar asked Sep 18 '12 14:09

Himanshu Saraswat


2 Answers

<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.6</version>

is worked for me, you can change version as it release new versions.

like image 37
tolgayilmaz Avatar answered Nov 14 '22 23:11

tolgayilmaz


Had the same problem. You probably used NetBeans to auto add this dependency with default 'compile' scope and it broke tomcat:

   <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>6.0</version>
    </dependency>

Use provided scope like here https://stackoverflow.com/a/10156854/1051834 If it does not help install a fresh tomcat and redeploy your project once again.

like image 186
Radek Busz Avatar answered Nov 14 '22 22:11

Radek Busz