我正在尝试在复合组件实现中的以下代码行中使用 Omnifaces 的验证器:
<p:inputText id="#{cc.attrs.id}" size="12" maxlength="10" value="#{cc.attrs.holder.idHolderPk}"
label="#{cc.attrs.label}" styleClass="content-right"
disabled="#{not empty cc.attrs.disabled?cc.attrs.disabled:false}">
<f:validator disabled="#{!cc.attrs.required}" validatorId="#{cc.attrs.validatorName}"/>
<o:validator disabled="#{empty cc.attrs.beanValidation ? true : false}" validatorId="javax.faces.Bean" validationGroups="#{cc.attrs.beanValidation}"/>
<p:ajax event="blur" listener="#{holderHelperBean.findHolder()}"
process="@this" update="outpnlHolder"
oncomplete="#{not empty cc.attrs.remoteListener ? cc.attrs.remoteListener : ''}"/>
<pe:keyFilter mask="pint"/>
</p:inputText>
但我收到以下错误:
ERROR [org.infinispan.transaction.TransactionCoordinator] (ajp-118)
ISPN000097: Error while processing a prepare in a single-phase transaction: org.infinispan.CacheException: java.lang.RuntimeException: Failure to marshal argument(s)
at org.infinispan.util.Util.rewrapAsCacheException(Util.java:542)[0m
at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.invokeRemoteCommand(CommandAwareRpcDispatcher.java:186)[0m
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:515)[0m
at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:173)
at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:194)
at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:251)
at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:238)
at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:233)
Caused by: java.lang.RuntimeException: Failure to marshal argument(s)
Caused by: org.infinispan.marshall.NotSerializableException: org.omnifaces.taghandler.Validator
我在带有会话复制的模式集群中使用 Jboss 6.3 EAP、Omnifaces 1.8.1、Primefaces 4.0.13、Mojarra 2.1.28-jbossorg-5。
我正在使用 o:validator 进行 bean 验证,因为我需要动态禁用和渲染验证
当应用程序处于独立模式时工作正常,没有错误消息。