本文介绍了无法找到类'com.sun.facelets.FaceletViewHandler'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有部署到Glassfish v3的Richfaces应用程序。几周(几乎)一切正常,但今天突然出现以下错误。我在我的pom.xml中有jsf-facelets-1.1.14.jar依赖项。我不知道如何解决这个问题。帮助!!
源文档:jndi:/server/swmind.rcp.web/WEB-INF/faces-config.xml原因:无法在com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:275)
处找到com.sun.facelets.FaceletViewHandler类的
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。开始(WebModule.java:499)
在org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:928)
在org.apache.catalina.core.ContainerBase.addChild(ContainerBase。
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1933)
在com.sun.enterprise.web.W ebContainer.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 )
在com.sun.enterprise.v3.admin.CommandRun nerImpl.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.DefaultPro tocolFilter.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)在java.lang.Thread.run处的
(Thread.java:619)导致:java.lang.ClassNotFoundException:com.sun.facelets.FaceletViewHandler $ b在java处.N et.URLClassLoader $ 1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)$ b $ 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
以下是我的pom.xml:
<?xml version =1.0encoding =UTF- 8\" >?;
< project xmlns =http://maven.apache.org/POM/4.0.0xmlns: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\">
< modelVersion> 4.0.0< / modelVersion>
< groupId> swmind.rcp< / groupId>
< artifactId> swmind.rcp.web< / artifactId>
<包装>战争< / packaging>
<名称> RCP网页界面< /名称>
< version> 1.0< / version>
<依赖关系>
< dependency>
< groupId> javax.servlet< / groupId>
< artifactId> servlet-api< / artifactId>
< version> 2.4< / version>
< scope>提供< / scope>
< /依赖关系>
< dependency>
< groupId> javax.servlet< / groupId>
< artifactId> jsp-api< / artifactId>
< version> 2.0< / version>
< scope>提供< / scope>
< /依赖关系>
< dependency>
< groupId> jstl< / groupId>
< artifactId> jstl< / artifactId>
< version> 1.1.2< / version>
< /依赖关系>
< dependency>
< groupId> javax.servlet.jsp< / groupId>
< artifactId> jsp-api< / artifactId>
< version> 2.1< / version>
< scope>提供< / scope>
< /依赖关系>
< dependency>
< groupId> javax.faces< / groupId>
< artifactId> jsf-api< / artifactId>
< version> 1.2_12< / version>
< /依赖关系>
< dependency>
< groupId> javax.faces< / groupId>
< artifactId> jsf-impl< / artifactId>
< version> 1.2_12< / version>
< /依赖关系>
< dependency>
< groupId> javax.el< / groupId>
< artifactId> el-api< / artifactId>
< version> 1.0< / version>
< scope>提供< / scope>
< /依赖关系>
< dependency>
< groupId> el-impl< / groupId>
< artifactId> el-impl< / artifactId>
< version> 1.0< / version>
< scope>提供< / scope>
< /依赖关系>
< dependency>
< groupId> javax.annotation< / groupId>
< artifactId> jsr250-api< / artifactId>
< version> 1.0< / version>
< /依赖关系>
< dependency>
< groupId> org.richfaces.framework< / groupId>
< artifactId> richfaces-api< / artifactId>
< version> 3.3.2.SR1< / version>
< /依赖关系>
< dependency>
< groupId> org.richfaces.framework< / groupId>
< artifactId> richfaces-impl< / artifactId>
< version> 3.3.2.SR1< / version>
< /依赖关系>
< dependency>
< groupId> org.richfaces.ui< / groupId>
< artifactId> richfaces-ui< / artifactId>
< version> 3.3.2.SR1< / version>
< /依赖关系>
< dependency>
< groupId> com.sun.facelets< / groupId>
< artifactId> jsf-facelets< / artifactId>
< version> 1.1.14< / version>
< /依赖关系>
< dependency>
< groupId> junit< / groupId>
< artifactId> junit< / artifactId>
< version> 4.7< / version>
< scope> test< / scope>
< /依赖关系>
< /依赖关系>
< build>
< finalName> $ {project.artifactId} - $ {project.version}< / finalName>
< plugins>
< plugin>
< artifactId> maven-compiler-plugin< / artifactId>
<配置>
< source> 1.6< / source>
< target> 1.6< / target>
< / configuration>
< / plugin>
< / plugins>
< / build>
< / project>
Eclipse classpath:
p>
<?xml version =1.0encoding =UTF-8?>
< classpath>
< classpathentry kind =srcoutput =target / classespath =src / main / java/>
< classpathentry excluded =**kind =srcoutput =target / classespath =src / main / resources/>
< classpathentry kind =srcoutput =target / test-classespath =src / test / java/>
< classpathentry kind =conpath =org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER>
<属性>
< attribute name =org.eclipse.jst.component.dependencyvalue =/ WEB-INF / lib/>
< / attributes>
< / classpathentry>
< classpathentry kind =conpath =org.eclipse.jst.j2ee.internal.web.container/>
< classpathentry kind =conpath =org.eclipse.jst.j2ee.internal.module.container/>
< classpathentry kind =conpath =org.eclipse.jdt.launching.JRE_CONTAINER / org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType / jdk1.6.0_18>
<属性>
< attribute name =owner.project.facetsvalue =jst.java/>
< / attributes>
< / classpathentry>
< classpathentry kind =outputpath =target / classes/>
< / classpath>
我的面孔配置:
<应用>
< view-handler> com.sun.facelets.FaceletViewHandler< / view-handler>
< / application>
<转换器>
< converter-id> durationConverter< / converter-id>
< converter-class> swmind.rcp.web.DurationConverter< / converter-class>
< /转换器>
< 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>雇员< / 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}< /值>
< / managed-property>
< managed-property>
< property-name> userInfo< / property-name>
<值>#{userInfo}< /值>
< / managed-property>
< managed-property>
< property-name> perspectiveNavigator< / property-name>
<值>#{perspectiveNavigator}< /值>
< / 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>
<值>#{userInfo}< /值>
< / managed-property>
< managed-property>
< property-name> serviceResolver< / property-name>
< value>#{serviceResolver}< /值>
< / managed-property>
< managed-property>
< property-name> dateFormater< / property-name>
<值>#{dateFormater}< /值>
< / 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}< /值>
< / 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>
<值>#{spentTimeFacade}< /值>
< / managed-property>
< managed-property>
< property-name> dateFormater< / property-name>
<值>#{dateFormater}< /值>
< / 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>
<值>#{spentTimeFacade}< /值>
< / managed-property>
< managed-property>
< property-name> dateFormater< / property-name>
<值>#{dateFormater}< /值>
< / 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>
<值>#{daySpentTime}< /值>
< / managed-property>
< managed-property>
< property-name> weekSpentTime< / property-name>
<值>#{weekSpentTime}< /值>
< / managed-property>
< managed-property>
< property-name> monthSpentTime< / property-name>
< value>#{monthSpentTime}< /值>
< / managed-property>
< / managed-bean>
解决方案
我必须添加这个依赖项:
< dependency>
< groupId> com.sun.facelets< / groupId>
< artifactId> jsf-facelets< / artifactId>
< version> 1.1.15.B1< / version>
< scope>编译< / scope>
< /依赖关系>
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">
<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>
解决方案
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>
这篇关于无法找到类'com.sun.facelets.FaceletViewHandler'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!