2

私はJSF初心者です。Eclipse 4.2 (Juno) に ICEfaces 3.0 コンポーネントを実装しようとしています。Apache Tomcat 7.0 を使用して実装および実行しました。ウィンドウに次のエラーが表示されます。

同じコンポーネントを 2 回追加することはできません

コンソールバーでは次のように表示されます:

javax.faces.FacesException: Cannot add the same component twice: v8z4ho2-retrieve-update

私のJSFコード

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:icecore="http://www.icefaces.org/icefaces/core"  
    xmlns:ace="http://www.icefaces.org/icefaces/components"   
    xmlns:ice="http://www.icesoft.com/icefaces/component" >

<h:head>
    <title>Chart</title>
    <link rel="stylesheet" type="text/css" href="./xmlhttp/css/rime/rime.css"/>
</h:head>

<h:body styleClass="ice-skin-rime">     
    <h:form id="canvasForm">
        <ace:chart id="chart" animated="false" value="#{chartBean.barData}"
            stackSeries="false" defaultAxesConfig="#{chartBean.barDemoDefaultAxis}"
            xAxis="#{chartBean.barDemoXAxis}" yAxis="#{chartBean.barDemoYAxis}"
            legend="true"  legendPlacement="OUTSIDE_GRID" highlighter="true"
            highlighterLocation="N" highlighterShowMarker="false"       
            highlighterBringSeriesToFront="true"
            widgetVar="barChart" />
    </h:form>    
</h:body>
</html>

このエラーを修正するにはどうすればよいですか? 手伝ってください。

4

2 に答える 2

1

icefaces のバージョンを 3.3.0 から 3.0.1 に戻すことで修正されました:

    <!-- Ices Dependencies -->
    <dependency>
        <groupId>org.icefaces</groupId>
        <artifactId>icefaces</artifactId>
        <version>3.0.1</version>
    </dependency>

    <dependency>
        <groupId>org.icefaces</groupId>
        <artifactId>icefaces-ace</artifactId>
        <version>3.0.1</version>
    </dependency>

    <dependency>
        <groupId>org.icefaces</groupId>
        <artifactId>icefaces-compat</artifactId>
        <version>3.0.1</version>
    </dependency>

    <dependency>
        <groupId>org.icepush</groupId>
        <artifactId>icepush</artifactId>
        <version>3.1.0</version>
    </dependency>
于 2014-07-08T12:47:17.257 に答える
1

ICEFaces フォーラムで、この問題を抱えている人をたくさん見つけました。Tomcat 7.0.42 を使用している場合は、代わりに Tomcat 7.0.41 を試して、動作するかどうかを確認してください。同じクラスパスに icefaces jar (または icefaces.jar と icefaces-ee.jar) が重複しているかどうかも確認してください。投稿へのリンクは次のとおりです。

http://www.icesoft.org/JForum/posts/list/22121.page#sthash.qxEkXX1Q.dpbs

于 2013-09-18T13:34:28.607 に答える