我正在使用Coherence注释@PortableProperty
注释用于POF序列化的缓存对象。例如:来自Coherence的奇怪错误:“必须为属性指定POF索引...”
@Portable
public class Product implements Comparable<Product> {
@PortableProperty(0)
private String acronym;
// other properties and getters/setters ...
}
的pof-config
看起来是这样的:
<?xml version="1.0"?>
<pof-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.oracle.com/coherence/coherence-pof-config"
xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-pof-config
http://xmlns.oracle.com/coherence/coherence-pof-config/1.2/coherence-pof-config.xsd">
<user-type-list>
<!-- include all "standard" Coherence POF user types -->
<include>coherence-pof-config.xml</include>
<user-type>
<type-id>1001</type-id>
<class-name>
com.xyz.Product
</class-name>
</user-type>
<!-- More user-type definitions -->
</user-type-list>
</pof-config>
当服务器管理员尝试部署我GAR,他得到了以下错误:
An error occurred during activation of changes, please see the log for details. (Wrapped) (Wrapped: error creating class "com.tangosol.io.pof.ConfigurablePofContext") A POF Index must be specified for the property com.xyz.Product#acronym by specifying within the annotation or enabling autoIndexing on the Portable annotation
但acronym
财产是注释与索引(0)。我甚至反编译GAR中的.class文件来仔细检查注释是否存在。
任何想法会导致部署错误?
请分享您的pof-config.xml –
@ArkadiyVerman,我用我的pof-config –
更新了问题,看不到您的定义有任何问题,它在我的程序中看起来是一样的。我唯一可以建议的是验证您的配置标志,特别是Dtangosol.pof.config。 –