Gemfire PDX启动时出错:PDX元数据已创建为对等元数据区域。请先创建您的池

Gemfire PDX启动时出错:PDX元数据已创建为对等元数据区域。请先创建您的池,gemfire,spring-data-gemfire,Gemfire,Spring Data Gemfire,我是gemfire的新手,在启动应用程序时遇到问题 我得到的错误是 [info 2015/05/22 10:55:39.746 BRT <localhost-startStop-1> tid=0xf] Marking DistributionManager <v0>:17758 as closed. 10:55:40.922 [localhost-startStop-1] ERROR org.springframework.web.context.ContextLoad

我是gemfire的新手,在启动应用程序时遇到问题

我得到的错误是

[info 2015/05/22 10:55:39.746 BRT  <localhost-startStop-1> tid=0xf] Marking DistributionManager <v0>:17758 as closed.
10:55:40.922 [localhost-startStop-1] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gfPool': Invocation of init method failed; nested exception is com.gemstone.gemfire.pdx.PdxInitializationException: The PDX metadata has already been created as a peer metadata region. Please create your pools first
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1566) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:743) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) ~[spring-context-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) ~[spring-context-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) ~[spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4728) [catalina.jar:8.0.21]
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5166) [catalina.jar:8.0.21]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.21]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [catalina.jar:8.0.21]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399) [catalina.jar:8.0.21]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_45]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_45]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
Caused by: com.gemstone.gemfire.pdx.PdxInitializationException: The PDX metadata has already been created as a peer metadata region. Please create your pools first
    at com.gemstone.gemfire.pdx.internal.PeerTypeRegistration.creatingPool(PeerTypeRegistration.java:501) ~[gemfire-8.0.0.jar:?]
    at com.gemstone.gemfire.pdx.internal.TypeRegistry.creatingPool(TypeRegistry.java:273) ~[gemfire-8.0.0.jar:?]
    at com.gemstone.gemfire.internal.cache.PoolFactoryImpl.create(PoolFactoryImpl.java:439) ~[gemfire-8.0.0.jar:?]
    at org.springframework.data.gemfire.client.PoolFactoryBean.afterPropertiesSet(PoolFactoryBean.java:172) ~[spring-data-gemfire-1.6.0.RELEASE.jar:1.6.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1625) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1562) ~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    ... 21 more
[info 2015/05/22 10:55:39.746 BRT tid=0xf]将配送经理:17758标记为已关闭。
10:55:40.922[localhost-startStop-1]错误org.springframework.web.context.ContextLoader-上下文初始化失败
org.springframework.beans.factory.BeanCreationException:创建名为“gfPool”的bean时出错:调用init方法失败;嵌套异常为com.gemstone.gemfire.pdx.pdxiInitializationException:pdx元数据已创建为对等元数据区域。请先创建您的池
在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1566)~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
在org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
在org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
在org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
在org.springframework.beans.factory.support.DefaultListableBeanFactory.PreInstanceSingleton(DefaultListableBeanFactory.java:743)~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
在org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)~[spring-context-4.1.4.RELEASE.jar:4.1.4.RELEASE]
在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)~[spring-context-4.1.4.RELEASE.jar:4.1.4.RELEASE]
在org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)~[spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
位于org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)[spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
在org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)[spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
在org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4728)[catalina.jar:8.0.21]
在org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5166)[catalina.jar:8.0.21]
在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)[catalina.jar:8.0.21]
在org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)[catalina.jar:8.0.21]
在org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)[catalina.jar:8.0.21]
在java.util.concurrent.FutureTask.run(FutureTask.java:266)[?:1.8.0_45]
位于java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[?:1.8.0_45]
在java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[?:1.8.0_45]
在java.lang.Thread.run(Thread.java:745)[?:1.8.0_45]
原因:com.gemstone.gemfire.pdx.pdxiInitializationException:已将pdx元数据创建为对等元数据区域。请先创建您的池
在com.gemstone.gemfire.pdx.internal.PeerTypeRegistration.creatingPool(PeerTypeRegistration.java:501)~[gemfire-8.0.0.jar:?]
在com.gemstone.gemfire.pdx.internal.TypeRegistry.creatingPool(TypeRegistry.java:273)~[gemfire-8.0.0.jar:?]
在com.gemstone.gemfire.internal.cache.PoolFactoryImpl.create(PoolFactoryImpl.java:439)~[gemfire-8.0.0.jar:?]
在org.springframework.data.gemfire.client.PoolFactoryBean.AfterPropertieSet(PoolFactoryBean.java:172)~[spring-data-gemfire-1.6.0.RELEASE.jar:1.6.0.RELEASE]
在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1625)~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1562)~[spring-beans-4.1.4.RELEASE.jar:4.1.4.RELEASE]
... 还有21个
这是我的配置

gemfire-context.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gfe="http://www.springframework.org/schema/gemfire"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
        http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire-1.2.xsd">

     <gfe:client-cache id="gemfireClientCache"
        cache-xml-location="classpath:client.xml" pool-name="gfPool" use-bean-factory-locator="false" />

    <gfe:pool id="gfPool" max-connections="10">
        <gfe:locator host= "127.0.0.1" port="9980" />                   
    </gfe:pool>

    <gfe:lookup-region id="myRegion" name="myRegion" cache-ref="gemfireClientCache" />


</beans>  
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gfe="http://www.springframework.org/schema/gemfire"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd


http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd">

    <!-- Use this configuration to test locally -->

    <gfe:cache id="gemfireCache" pdx-persistent="true"/>

    <gfe:partitioned-region id="myRegion" data-policy="PARTITION"/>

    <import resource="classpath:registry-gemfire-context.xml"/>

    <import resource="classpath:br/com/xxx/context.xml"/>

    <context:component-scan base-package="br.com.xxx.*"/>

    <bean id="string" class="java.lang.String"/>

</beans>

下面是Client.xml


com.gemstone.gemfire.pdx.ReflectionBasedAutoSerializer
br.com.xxx*
真的

My applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gfe="http://www.springframework.org/schema/gemfire"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
        http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire-1.2.xsd">

     <gfe:client-cache id="gemfireClientCache"
        cache-xml-location="classpath:client.xml" pool-name="gfPool" use-bean-factory-locator="false" />

    <gfe:pool id="gfPool" max-connections="10">
        <gfe:locator host= "127.0.0.1" port="9980" />                   
    </gfe:pool>

    <gfe:lookup-region id="myRegion" name="myRegion" cache-ref="gemfireClientCache" />


</beans>  
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gfe="http://www.springframework.org/schema/gemfire"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd


http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd">

    <!-- Use this configuration to test locally -->

    <gfe:cache id="gemfireCache" pdx-persistent="true"/>

    <gfe:partitioned-region id="myRegion" data-policy="PARTITION"/>

    <import resource="classpath:registry-gemfire-context.xml"/>

    <import resource="classpath:br/com/xxx/context.xml"/>

    <context:component-scan base-package="br.com.xxx.*"/>

    <bean id="string" class="java.lang.String"/>

</beans>

您可以尝试在Spring中配置Client.xml中的内容

明白了

问题是applicationContext.xml上的区域名称有一个打字错误(小写字母),因此没有创建该区域,之后我尝试将其添加到池中

不管怎么说,那个错误消息太可怕了。。。也许与它缺失的区域有关的东西会有很大帮助


希望它能帮助其他人。

同意,错误消息可能没有那么有用,但这是一个GemFire特定的异常(即PdxiInitializationException)和错误消息

还有,一些提示