0

私は Bigmemory Max 4.0.5 を使用しています。terracotta はアプリケーションのキャッシュを休止状態の第 2 レベルのキャッシュとして配布しますが、サーバーの起動時に以下の例外が発生します。

原因: com.tc.config.schema.setup.ConfigurationSetupException:


'localhost:9510' のサーバーからの基本構成の構成データは Terracotta スキーマに従いません: [0]: 行 7、列 5: 属性は許可されていません (ワイルドカードは許可されていません): 要素サーバーで保護されています [1]: 行9、列 9: 要素サーバーの「ミラー グループ」ではなく要素「サーバー」が予期される [2]: 28 行、列 9: 要素サーバーの「更新チェック」ではなく要素「サーバー」が予期される [3] : 行 32、列 9: ここの要素サーバーでは、'garbage-collection' ではなく、予期される要素 'server' [4]: 行 37、列 9: 要素サーバーでは、'restartable' ではなく、予期される要素 'server' [5] : 行 38、列 9: ここの要素サーバーでは、「client-reconnect-window」ではなく要素「server」が必要です

私のtc-config.xmlは以下です:-

<?xml version="1.0" encoding="UTF-8" ?>
<tc:tc-config xmlns:tc="http://www.terracotta.org/config"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-8.xsd">

  <servers>
    <server host="localhost" name="MyServerName">
      <!-- Specify the path where the server should store its data. -->
      <data>E:\Bratton\Pocs\bigmemory-max-4.0.5\data-test</data>
       <!-- Specify the port where the server should listen for client 
       traffic. -->
       <tsa-port>9510</tsa-port>
       <jmx-port>9520</jmx-port>
       <tsa-group-port>9530</tsa-group-port>
       <!-- Enable BigMemory on the server. -->
       <offheap>
         <enabled>true</enabled>
         <maxDataSize>512m</maxDataSize>
       </offheap>
     </server>
    <!-- Add the restartable element for Fast Restartability (optional). -->
    <restartable enabled="true"/>
  </servers>
  <clients>
    <logs>logs-%i</logs>
  </clients>
</tc:tc-config>

以下はehcache.xmlです:-

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd" updateCheck="false">
     <terracottaConfig url="localhost:9510"/>
    <defaultCache
            eternal="false"
            timeToIdleSeconds="120"
            timeToLiveSeconds="120">
       <terracotta/>    

    </defaultCache>        

</ehcache>

以下は、私が使用している依存関係です

 <dependency> 
                <groupId>net.sf.ehcache</groupId> 
                <artifactId>ehcache-core</artifactId> 
                <version>2.6.0</version> 
            </dependency>

            <dependency>
              <groupId>org.hibernate</groupId>
              <artifactId>hibernate-ehcache</artifactId>
              <version>4.2.4.Final</version>
            </dependency>

            <dependency> 
                <groupId>net.sf.ehcache</groupId> 
                <artifactId>ehcache-terracotta</artifactId> 
                <version>2.6.0</version> 
            </dependency> 

            <dependency> 
                <groupId>org.terracotta</groupId> 
                <artifactId>terracotta-toolkit-runtime-ee</artifactId>
                <version>4.0.5</version> 
            </dependency> 

依存バージョンのさまざまな組み合わせを試しましたが、何も役に立ちませんでした。これで何が問題なのか教えてください。

前もって感謝します。

4

2 に答える 2

0

mirror-group タグを使用しようとしましたか? 有効な構成は次のようになります。

<?xml version="1.0" encoding="UTF-8" ?>
<tc:tc-config xmlns:tc="http://www.terracotta.org/config"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-8.xsd">

  <servers>
    <mirror-group group-name="tsa01">
      <server host="localhost" name="MyServerName">
        <!-- Specify the path where the server should store its data. -->
        <data>E:\Bratton\Pocs\bigmemory-max-4.0.5\data-test</data>
        <!-- Specify the port where the server should listen for client
                traffic. -->
        <tsa-port>9510</tsa-port>
        <jmx-port>9520</jmx-port>
        <tsa-group-port>9530</tsa-group-port>
        <!-- Enable BigMemory on the server. -->
        <offheap>
          <enabled>true</enabled>
          <maxDataSize>512m</maxDataSize>
        </offheap>
      </server>
    </mirror-group>
    <!-- Add the restartable element for Fast Restartability (optional). -->
    <restartable enabled="true"/>
  </servers>
  <clients>
    <logs>logs-%i</logs>
  </clients>
</tc:tc-config>
于 2014-01-03T18:22:03.820 に答える