2017-06-12 104 views
0

我重构了一个简单的Web项目,最初使用icefaces-ee 1.8与icepush,然后上传到icedrop-ee 3.3.0与icepush,但从来没有真正需要它们。我将社区图书馆的'ee'图书馆取而代之,并将icepush的功能放到一个简单的icefaces项目中。 我的行家ICEfaces的依赖关系是:NoSuchMethodError当部署一个icefaces 3应用程序

<dependency> 
    <groupId>org.icefaces</groupId> 
    <artifactId>icefaces</artifactId> 
    <version>3.3.0</version> 
    <exclusions> 
     <exclusion> 
      <groupId>org.icepush</groupId> 
      <artifactId>icepush</artifactId> 
     </exclusion> 
    </exclusions> 
</dependency> 
<dependency> 
    <groupId>org.icefaces</groupId> 
    <artifactId>icefaces-compat</artifactId> 
    <version>3.3.0</version> 
</dependency> 
<dependency> 
<dependency> 
    <groupId>org.icefaces</groupId> 
    <artifactId>icefaces-ace</artifactId> 
    <version>3.3.0</version> 
</dependency> 
<dependency> 
    <groupId>org.glassfish</groupId> 
    <artifactId>javax.faces</artifactId> 
    <version>2.1.28</version> 
</dependency> 
<dependency> 
    <groupId>javax.servlet</groupId> 
    <artifactId>javax.servlet-api</artifactId> 
    <version>3.0.1</version> 
    <scope>provided</scope> 
</dependency> 
<dependency> 
    <groupId>javax.mail</groupId> 
    <artifactId>javax.mail-api</artifactId> 
    <version>1.4.4</version> 
    <scope>provided</scope> 
</dependency> 
<dependency> 
    <groupId>javax.el</groupId> 
    <artifactId>javax.el-api</artifactId> 
    <version>2.2.1</version> 
    <scope>provided</scope> 
</dependency> 

它编译,但是当我尝试战争部署到GlassFish中3,我得到这个错误
java.lang.NoSuchMethodError:org.icefaces.util.EnvUtils.getWarnBeforeExpiryInterval( Ljavax/faces/context/FacesContext;)

实际上,我发现icefaces-3.3.0.jar中的类EnvUtils缺少该方法。

哪些功能使用此功能?我怎样才能避免这个错误?

回答

0

解决方法之一是将ICEfaces升级到4.0.0。从版本4.0.0开始引入了EnvUtils.getWarnBeforeExpiryInterval(FacesContext)

参见:

+0

遗憾的响应晚。我可以在javaEE 6环境中使用icefaces 4吗?我在icefaces 4 note release中看到了javaEE 7环境和JSF 2.2。我用jsf 2.1.8使用glassfish 3 – jmann