views:

1739

answers:

1

Hi All,

I have Richfaces application which I deploy to Glassfish v3. For many weeks (almost) everything works fine, but suddenly today a got following error. I have jsf-facelets-1.1.14.jar dependency in my pom.xml. I have no idea how to fix that. Help!!

Source Document: jndi:/server/swmind.rcp.web/WEB-INF/faces-config.xml Cause: Unable to find class 'com.sun.facelets.FaceletViewHandler'
    at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:275)
    at com.sun.faces.config.processor.ApplicationConfigProcessor.setViewHandler(ApplicationConfigProcessor.java:527)
    at com.sun.faces.config.processor.ApplicationConfigProcessor.processViewHandlers(ApplicationConfigProcessor.java:847)
    at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:331)
    at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
    at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116)
    at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
    at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:223)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:335)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:223)
    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4591)
    at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:535)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5193)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:499)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:928)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1933)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1605)
    at com.sun.enterprise.web.WebApplication.start(WebApplication.java:90)
    at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
    at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)
    at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:339)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
    at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassNotFoundException: com.sun.facelets.FaceletViewHandler
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:949)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1420)
    at com.sun.faces.util.Util.loadClass(Util.java:203)
    at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:313)
    at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:240)
    ... 50 more

Here is my pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;

    <modelVersion>4.0.0</modelVersion>
    <groupId>swmind.rcp</groupId>
    <artifactId>swmind.rcp.web</artifactId>
    <packaging>war</packaging>
    <name>RCP Web Interface</name>
    <version>1.0</version>
    <dependencies>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jstl</groupId>
            <artifactId>jstl</artifactId>
            <version>1.1.2</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <version>1.2_12</version>
        </dependency>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>1.2_12</version>
        </dependency>
        <dependency>
            <groupId>javax.el</groupId>
            <artifactId>el-api</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>el-impl</groupId>
            <artifactId>el-impl</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>jsr250-api</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>org.richfaces.framework</groupId>
            <artifactId>richfaces-api</artifactId>
            <version>3.3.2.SR1</version>
        </dependency>
        <dependency>
            <groupId>org.richfaces.framework</groupId>
            <artifactId>richfaces-impl</artifactId>
            <version>3.3.2.SR1</version>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui</groupId>
            <artifactId>richfaces-ui</artifactId>
            <version>3.3.2.SR1</version>
        </dependency>
        <dependency>
            <groupId>com.sun.facelets</groupId>
            <artifactId>jsf-facelets</artifactId>
            <version>1.1.14</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.7</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <finalName>${project.artifactId}-${project.version}</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

Eclipse classpath:

http://picasaweb.google.pl/rafal.chojnacki/StackOverflowQuestions#5452120750227756754

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" output="target/classes" path="src/main/java"/>
    <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
    <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
    <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
        <attributes>
            <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
    <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_18">
        <attributes>
            <attribute name="owner.project.facets" value="jst.java"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="output" path="target/classes"/>
</classpath>

My faces config:

<application>
    <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>
<converter>
    <converter-id>durationConverter</converter-id>
    <converter-class>swmind.rcp.web.DurationConverter</converter-class>
</converter>
<managed-bean>
    <managed-bean-name>testBean</managed-bean-name>
    <managed-bean-class>swmind.rcp.web.TestBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
    <managed-bean-name>dateFormater</managed-bean-name>
    <managed-bean-class>swmind.rcp.web.RcpDateFormater</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
    <managed-bean-name>serviceResolver</managed-bean-name>
    <managed-bean-class>swmind.rcp.web.ServiceResolver</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
    <managed-bean-name>employee</managed-bean-name>
    <managed-bean-class>swmind.rcp.web.Employee</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
        <property-name>serviceResolver</property-name>
        <value>#{serviceResolver}</value>
    </managed-property>
    <managed-property>
        <property-name>userInfo</property-name>
        <value>#{userInfo}</value>
    </managed-property>
    <managed-property>
        <property-name>perspectiveNavigator</property-name>
        <value>#{perspectiveNavigator}</value>
    </managed-property>
</managed-bean>
<managed-bean>
    <managed-bean-name>spentTimeFacade</managed-bean-name>
    <managed-bean-class>swmind.rcp.web.perspective.SpentTimeFacade</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
        <property-name>userInfo</property-name>
        <value>#{userInfo}</value>
    </managed-property>
    <managed-property>
        <property-name>serviceResolver</property-name>
        <value>#{serviceResolver}</value>
    </managed-property>
    <managed-property>
        <property-name>dateFormater</property-name>
        <value>#{dateFormater}</value>
    </managed-property>
</managed-bean>
<managed-bean>
    <managed-bean-name>activities</managed-bean-name>
    <managed-bean-class>swmind.rcp.web.ActivityList</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
        <property-name>serviceResolver</property-name>
        <value>#{serviceResolver}</value>
    </managed-property>
</managed-bean>
<managed-bean>
    <managed-bean-name>userInfo</managed-bean-name>
    <managed-bean-class>swmind.rcp.web.UserInfo</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
    <managed-bean-name>daySpentTime</managed-bean-name>
    <managed-bean-class>swmind.rcp.web.perspective.DaySpentTime</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
        <property-name>spentTimeFacade</property-name>
        <value>#{spentTimeFacade}</value>
    </managed-property>
    <managed-property>
        <property-name>dateFormater</property-name>
        <value>#{dateFormater}</value>
    </managed-property>
</managed-bean>
<managed-bean>
    <managed-bean-name>weekSpentTime</managed-bean-name>
    <managed-bean-class>swmind.rcp.web.perspective.WeekSpentTime</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
        <property-name>spentTimeFacade</property-name>
        <value>#{spentTimeFacade}</value>
    </managed-property>
    <managed-property>
        <property-name>dateFormater</property-name>
        <value>#{dateFormater}</value>
    </managed-property>
</managed-bean>
<managed-bean>
    <managed-bean-name>monthSpentTime</managed-bean-name>
    <managed-bean-class>swmind.rcp.web.perspective.MonthSpentTime</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
    <managed-bean-name>perspectiveNavigator</managed-bean-name>
    <managed-bean-class>swmind.rcp.web.PerspectiveNavigator</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
        <property-name>daySpentTime</property-name>
        <value>#{daySpentTime}</value>
    </managed-property>
    <managed-property>
        <property-name>weekSpentTime</property-name>
        <value>#{weekSpentTime}</value>
    </managed-property>
    <managed-property>
        <property-name>monthSpentTime</property-name>
        <value>#{monthSpentTime}</value>
    </managed-property>
</managed-bean>
+1  A: 

I had to add this dependency:

    <dependency>
        <groupId>com.sun.facelets</groupId>
        <artifactId>jsf-facelets</artifactId>
        <version>1.1.15.B1</version>
        <scope>compile</scope>
    </dependency>
marabol