我正在尝试使用以下技术开发web应用程序JSF 2.0、EJB3、JPA、Maven。。它基于MVC设计模式,所以到目前为止我有3个项目:一个是包含业务和模型的EJB项目,第二个是包含JSF和所有将在JSF页面中使用的bean的视图部分,第三个是用于合并我提到的前一个项目的EAR项目。
到目前为止,我制作了一个简单的应用程序,EAR项目在JBoss 7中成功部署,但每当我尝试访问页面时,我都会遇到以下异常:
Servlet.service() for servlet default threw exception: java.lang.NoSuchMethodError: com.ocpsoft.pretty.PrettyContext.newDetachedInstance(Ljavax/servlet/http/HttpServletRequest;)Lcom/ocpsoft/pretty/PrettyContext;
我想提的是,我对这些技术不是很熟悉。
请让我知道,如果你想给你额外的信息,如maven依赖关系或你认为可能导致此错误的任何信息。
我有以下与漂亮面孔相关的依赖关系:
<dependency>
<groupId>com.ocpsoft</groupId>
<artifactId>ocpsoft-pretty-faces</artifactId>
<version>2.0.3</version>
</dependency>
<dependency>
<groupId>org.ocpsoft.rewrite</groupId>
<artifactId>rewrite-servlet</artifactId>
<version>2.0.11.Final</version>
</dependency>
<dependency>
<groupId>org.ocpsoft.rewrite</groupId>
<artifactId>rewrite-integration-faces-annotations</artifactId>
<version>2.0.0.Alpha5</version>
</dependency>
<dependency>
<groupId>org.ocpsoft.rewrite</groupId>
<artifactId>rewrite-config-prettyfaces</artifactId>
<version>2.0.11.Final</version>
</dependency>