简体   繁体   English

将Infinispan xml配置从6.x迁移到7.x

[英]Migrating Infinispan xml configuration from 6.x to 7.x

I've been using Infinispan 6.x and I have a couple of XML configuration files. 我一直在使用Infinispan 6.x,并且有几个XML配置文件。 Now I want to migrate to 7.x, but I'm having exceptions when the new version tries to parse the old configuration files. 现在我想迁移到7.x,但是当新版本尝试解析旧的配置文件时出现异常。 Here is my configuration file: 这是我的配置文件:

<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="urn:infinispan:config:6.0 http://www.infinispan.org/schemas/infinispan-config-6.0.xsd">
  <global>
    <globalJmxStatistics enabled="false" mBeanServerLookup="dz.lab.cache.infinispan.DummyMBeanServer$DummyLoockup" />
  </global>
  <default>    
    <eviction strategy="NONE" />
    <expiration lifespan="-1" maxIdle="-1" />
    <clustering mode="local">
      <hash>
        <groups enabled="true" />
      </hash>
    </clustering>
    <transaction transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup" transactionMode="TRANSACTIONAL" lockingMode="OPTIMISTIC" />
    <invocationBatching enabled="true" />
    <locking supportsConcurrentUpdates="true" />    
  </default>
</infinispan>

and the full stacktrace: 和完整的堆栈跟踪:

org.infinispan.commons.CacheConfigurationException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[7,11]
Message: Unexpected element 'global' encountered
    at org.infinispan.configuration.parsing.ParseUtils.unexpectedElement(ParseUtils.java:35)
    at org.infinispan.configuration.parsing.Parser70.readElement(Parser70.java:96)
    at org.infinispan.configuration.parsing.ParserRegistry.parseElement(ParserRegistry.java:133)
    at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:115)
    at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:102)
    at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:89)
    ... 30 more

How do I migrate this configuration? 如何迁移此配置? I can't find hints on the official user guide . 我在官方用户指南上找不到提示。

Upgrade guide might be found here . 升级指南可以在这里找到。 Please upgrade your xml schema to 7.0 (or 7.1) and recreate your configuration. 请将XML模式升级到7.0 (或7.1),然后重新创建配置。 global xml element is now called cache-container , here is an example . global xml元素现在称为cache-container ,这是一个示例

Your configuration should look like this: 您的配置应如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<infinispan
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="urn:infinispan:config:7.0 http://www.infinispan.org/schemas/infinispan-config-7.0.xsd"
        xmlns="urn:infinispan:config:7.0">
    <cache-container name="default" default-cache="defaultCache">
        <serialization />
        <jmx>
            <property name="enabled">true</property>
        </jmx>
        <local-cache name="defaultCache">
          ...
        </local-cache>
    </cache-container>
</infinispan>

See the schema for all the transaction, isolation, eviction etc. elements - those are very similar. 有关所有事务,隔离,收回等元素,请参见架构-它们非常相似。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 确保使用异步Infinispan 6.x进行本地写入 - Ensure local write with async Infinispan 6.x 从 JBoss 4.2.x 升级到 JBoss 5.x、6.x、7.x 和 WildFly 8.x 的好处(和提示)? - Benefits (and tips) of an upgrade from JBoss 4.2.x to JBoss 5.x, 6.x, 7.x and WildFly 8.x? Java 7.x中的validateTree不起作用(在Java 6.x中很好) - validateTree in Java 7.x doesnt work (in Java 6.x was fine) API alfresco repository version 6.X or 7.X 应用上下文的初始化问题 - initialization problem of the application context of the API alfresco repository version 6.X or 7.X Kit Kat与所有更高版本5.x,6.x和7.x之间的Android内容提供商冲突 - Android content-provider conflict between Kit Kat and all later versions, 5.x, 6.x and 7.x Android 6.x中的权限 - Permissions in android 6.x Tomcat 6.x web.xml默认和自定义servlet路由 - Tomcat 6.x web.xml default and custom servlet routing 在persistence.xml Jboss 6.x + jpa 上部署错误 - Deploy error on persistence.xml Jboss 6.x + jpa 从HttpClient 3.x迁移到4.x. - Migrating from HttpClient 3.x to 4.x 从Tomcat 6访问JBoss AS 7.x中的EJB时出现问题 - Problems accessing EJB in JBoss AS 7.x from Tomcat 6
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM