- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在将 GemFire 集群从 8.2.7(使用 Spring Data GemFire 1.6.0.RELEASE)迁移到 Pivotal GemFire 9.3.0(SDG 2.0.7.RELEASE)。我使用 spring-context.xml
(在 cache.xml
中的 initializer
标记下声明)来初始化区域,同时在每个区域上启动缓存服务器节点。
当我尝试为 Pivotal GemFire 9.3.0 重用相同的 spring-context.xml
时,gfsh
命令无法识别我的 Spring beans 标记,而我出现以下异常:
Caused by: org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 107; cvc-elt.1: Cannot find the declaration of element 'beans'.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
spring-context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:gfe="http://www.springframework.org/schema/geode"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/geode http://www.springframework.org/schema/gemfire/spring-geode.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<util:properties id="gemfireProperties">
<prop key="log-level">config</prop>
<prop key="locators">hostA[10334],hostB[10334]</prop>
</util:properties>
<bean id="mappingPdxSerializer" class="org.springframework.data.gemfire.mapping.MappingPdxSerializer"/>
<gfe:cache properties-ref="gemfireProperties" pdx-serializer-ref="mappingPdxSerializer"/>
<gfe:replicated-region id="Product">
</gfe:replicated-region>
<gfe:replicated-region id="ProductCustomer">
</gfe:replicated-region>
</beans>
我根据 spring-data-gemfire:2.0.7.RELEASE 的 Spring 文档将 XML 架构路径从“
.gemfire
”更新为“geode
”
尝试使用 GF 9.1.1 和 SDGF 2.0.7。 (SDGF jar放在lib中)
脚本:
#!/bin/sh
export PATH=$PATH:/var/tmp/user/gemfire/9.1.1:/opt/jdk/1.8.0_71l64/bin/:/var/tmp/user/gemfire/9.1.1/bin/
export GEMFIRE=/var/tmp/user/gemfire/9.1.1/
for i in `ls /var/tmp/user/gemfire/9.1.1/lib/*.jar`
do
CLASSPATH=${CLASSPATH}:${i}
done
CLASSPATH=$CLASSPATH:/var/tmp/user/gemfire/9.1.1/config
#echo $CLASSPATH
if [ -e "/var/tmp/user/gemfire/9.1.1/config/spring-context.xml" ]; then
echo "File exists"
else
echo "File does not exist"
fi
gfsh start server --name=server1 --server-port=40405 --classpath=$CLASSPATH --spring-xml-location=/var/tmp/user/gemfire/9.1.1/config/spring-context.xml --locators=hostA[10334],hostB[10334] --mcast-port=0
更新:
FileNotFoundException
抛出:
Caused by: java.io.FileNotFoundException: class path resource [var/tmp/sn17180/gemfire/9.1.1/config/spring-context.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:172)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:330)
... 17 more
我已经授予了所有文件的权限,并且我的脚本中的 -e "/"也打印了“文件存在”。
更新:
缓存.xml
<?xml version="1.0" encoding="UTF-8"?>
<cache xmlns="http://geode.apache.org/schema/cache"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd"
version="1.0">
<region name="Parent" refid="REPLICATE">
<region name="Child" refid="REPLICATE"/>
</region>
</cache>
gemfire-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<util:properties id="gemfireProperties">
<prop key="locators">xyz[10334],xyx[10334]</prop>
<prop key="mcast-port">0</prop>
</util:properties>
<bean id="autoSerializer" class="org.apache.geode.pdx.ReflectionBasedAutoSerializer"/>
<gfe:cache properties-ref="gemfireProperties" cache-xml-location="cache.xml" pdx-serializer-ref="autoSerializer" pdx-read-serialized="true"/>
</beans>
最佳答案
自 9.x 版本系列起,Pivotal GemFire 已停止在 $GEMFIRE_HOME/lib
目录中随 Spring Data GemFire 一起提供。造成这种情况的主要原因有两个。
1) 首先,Pivotal GemFire 依赖 SDG 是一个难题,SDG 完全用于 gfsh>start server --name=SpringConfiguredServer --spring-xml-location-/path/to/spring/context.xml
,当SDG依赖于Pivotal GemFire时,这显然形成了循环依赖。
2) 在版本方面,Pivotal GemFire 明显落后于 Spring 生态系统的当前状态。即使是最新版本 9.3.0,也附带过时的 Spring JAR,例如核心 Spring Framework 4.3.13.RELEASE
,当核心 Spring Framework 4.3.17.RELEASE
已经可用时以及 5.0.6.RELEASE
,即将推出 5.1。
话虽如此,当使用启动服务器
从Gfsh启动时,仍然可以使用Spring配置和引导您的Pivotal GemFire服务器命令,--spring-xml-location
选项。您只需下载 appropriate version基于您正在使用的 Pivotal GemFire 版本(例如(9.3.0))的 SDG,并在启动服务器时将 SDG 放在类路径上。
NOTE: currently, SDG 2.1.0.M3 (SD Lovelace) is the only version based on Pivotal GemFire 9.3 and later; currently set to 9.5.0.
NOTE: also not, I don't specifically recall whether I ran into any API breaking changes between upgrading SDG Lovelace progressively from Pivotal GemFire 9.3, then to 9.4 and finally arriving at 9.5. If you have trouble with
spring-data-gemfire:2.1.0.M3
, you can also usespring-data-gemfire:2.1.0.M2
which was based on Pivotal GemFire 9.3 at the time.
因此,按照上面的方法,您将执行以下操作...
gfsh> start server --name=SpringConfiguredServer --classpath=/file/system/path/to/spring-data-gemfire22.1.0.M3.jar --spring-xml-location=/classpath/to/your/spring-context.xml
这应该有效!
此外,您不需要将模式从“gemfire”切换到“geode”。当您使用 Spring Data GemFire 时,请使用“spring-gemfire”模式。当您使用 Spring Data Geode 时,请使用“spring-geode”模式。两者都可能有效,但是...
希望这有帮助!
-j
关于java - 关键 GemFire 9.3.0 : Spring Data GemFire XML config in GemFire cluster,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50593224/
我已经运行 nagios 大约两年了,但最近这个问题开始出现在我的一项服务中。 我越来越 CRITICAL - Socket timeout after 10 seconds 对于 check_htt
我用 CSS 做到了这一点: 但我希望我的客户更改图像框架。在我的图像中,当前帧只是一种颜色 (#000)。但框架可以是装饰性的。因此,客户应使用装饰图像进行取景。我看过 W3Schools' bor
我编写了一个脚本来检查对象中是否有任何缺失的字段,然后返回具有缺失字段的项目的 ID。 它正在返回: [ '222', '333' ] 我期望返回: ['333'] 为什么它也返回222 id? fu
我正在读 Ramakrishnan 的书数据库管理系统,在模式细化和范式相关的章节中,我看到一句话说: K is a candidate key for R means that K ----> R
我正在编写一个 Java 应用程序,以在一夜之间自动化在线游戏中的角色 Action (特别是,它在《最终幻想 XI》中捕鱼)。该应用程序大量使用 java 的 Robot 类来模拟用户键盘输入和检测
我有这个 react 代码,我在某些输入组件上使用 new Date().getTime() 作为 react 键 Prop 。这可能是一种反模式,因为键需要稳定。但我想了解为什么这如此有问题。为什么
我正在尝试将我的简单查询优化为更复杂的查询。 我有三个表 Table 1 a_id info 1 talk 2 talk 3 sleep 4 sit Table 2
Google PageSpeed 审核建议将首屏内容的关键 CSS 添加到 中的标签,并将其余部分推迟到内容加载完成之后。 虽然我不同意这种做法,但正确的实现方式是什么? 我对使用它有一些保留意见
我已经使用 Pika 将 Websocket 集成到 Tornado 和 RabbitMQ 中。它成功地在各种队列上运行直到一段时间。然后引发以下错误: 严重:pika.connection:关闭时尝
我在本地使用 Gulp 和 SASS 进行开发,为动态站点(即 CMS 驱动)编译 CSS。我正在尝试配置一个解决方案来编译全局与关键路径 CSS。到目前为止最好的想法是将我的主要 scss 文件拆分
关于为 gtkmm 运行以下 simple.cc 示例 #include int main(int argc, char * argv[]){ Glib::RefPtr app = Gt
我正在生成一个 TSX 元素列表: this.productsModel = this.state.products.map(o => ( 但是,react 警告我:
我正在使用 Addy Osmani 的“Critical” https://github.com/addyosmani/critical 下面的 package.json 工作正常,但构建仅复制关键
我有一个 Multimap multimap = ArrayListMultimap.create(); 来自 Guava 。我想知道如何对多图中的 Date 键进行排序。 目前,我正在这样做:
我有一个基于 Jekyll 的网站,我想尽快完成它。我的目标是构建 Jekyll 站点、生成关键 CSS 并缩小 HTML 的 gulp 任务。 我的 gulpfile 的一部分看起来像这样: gul
考虑以下串行函数。当我并行化我的代码时,每个线程都会从并行区域(未显示)内调用此函数。我正在努力使这个线程安全和高效(快速)。 float get_stored_value__or__calculat
我正尝试在 tensorflow 中为我自己的自定义类别重新训练 Inception v3 模型。我已经下载了一些数据并将其格式化为目录。当我运行时,python 脚本为图像创建了瓶颈,然后当它运行时
我该如何追查此错误消息的根本原因? (test:1090): GStreamer-CRITICAL **: gst_debug_log_valist: assertion `category != N
我想为要托管在 Pivotal CloudFoundry 上的 Spring Boot 应用程序强制执行 HTTPS,我想现在大多数应用程序都需要这样做。据我所知,常用的方法是使用 http.requ
在 Travis CI 上运行 Pytest 时,我收到 Key -Error。请在下面找到我的程序: import sys import os sys.path.append(os.path.dir
我是一名优秀的程序员,十分优秀!