java.io.NotSerializableException: org.omnifaces.taghandler.Converter

Ich möchte OmniFaces verwendenListConverter als mein Konverter auf PrimeFaces autocomplete. Leider taucht die folgende Ausnahme auf, als ich es versuchte.

Soweit es mich betrifft, sind JSF-Konverter nicht erforderlich, um die serialisierbare Schnittstelle zu implementieren. Ich habe das Tutorial zu Java EE 6 gelesen und konnte eine solche Aussage nicht finden.

Referenzen Links:

http: //docs.oracle.com/javaee/6/tutorial/doc/bnaus.htmhttp: //docs.oracle.com/javaee/6/api/javax/faces/convert/Converter.htm

Ich hatte das Gefühl, dass MyFaces versucht, alle auf meiner Seite verwendeten Objekte zu deserialisieren. Wie kann ich mit dieser Situation umgehen?

Umgebun

WebSphere Application Server 8.5.5.2Apache MyFaces 2.0.2OmniFaces 1.7PrimeFaces 5.0

Managed Bean:

import javax.inject.Named;
import org.omnifaces.cdi.ViewScoped;

@Named
@ViewScoped
public class MovimentacaoOperacionalVolumeBean implements Serializable {

Autocomplete Implementierungscode:

<p:autoComplete value="#{movimentacaoOperacionalVolume.listaFiltroVolumes}"
                scrollHeight="200"
                scrollable="true"
                multiple="true"
                id="listaNrVolume"
                var="estoque"
                completeMethod="#{movimentacaoVolumeBean.completarSugestoesNrVolume}"
                forceSelection="true"
                itemLabel="#{estoque.nrVolume}"
                itemValue="#{estoque}"
                placeholder="#{msg['hint.btn.busca.nrVolume']}"
                minQueryLength="6"
                emptyMessage="#{msg['msg.tabela.semregistros']}"
                styleClass="larguraFiltroAutoComplete"
                queryDelay="500" >
    <o:converter converterId="omnifaces.ListConverter"
                 list="#{movimentacaoOperacionalVolume.listaNumerosVolumeOpcionais}"/>

WebSphere Stack Trace:

[22/12/14 11:12:50:078 BRST] 0000006e JspStateManag E   Exiting serializeView - Could not serialize state: org.omnifaces.taghandler.Converter
java.io.NotSerializableException: org.omnifaces.taghandler.Converter
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1185)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1555)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1516)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1433)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1379)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1379)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1379)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
    at java.util.ArrayList.writeObject(ArrayList.java:720)
    at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1020)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1502)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1433)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1379)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
    at java.util.ArrayList.writeObject(ArrayList.java:720)
    at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1020)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1502)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1433)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1379)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
    at java.util.ArrayList.writeObject(ArrayList.java:720)
    at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1020)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1502)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1433)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1379)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
    at java.util.ArrayList.writeObject(ArrayList.java:720)
    at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1020)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1502)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1433)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1379)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
    at java.util.ArrayList.writeObject(ArrayList.java:720)
    at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1020)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1502)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1433)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1379)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.serializeView(JspStateManagerImpl.java:814)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedViewInServletSession(JspStateManagerImpl.java:699)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView(JspStateManagerImpl.java:497)
    at javax.faces.application.StateManager.saveView(StateManager.java:114)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveView(JspStateManagerImpl.java:460)
    at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1379)
    at org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:263)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59)
    at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:85)
    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:240)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97)
    at org.omnifaces.filter.FacesExceptionFilter.doFilter(FacesExceptionFilter.java:56)
    at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
    at su.comum.web.util.filter.MenuPrimefacesFilter.doFilter(MenuPrimefacesFilter.java:106)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:960)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1064)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3837)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:981)
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:283)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
    at com.ibm.io.as,ync.ResultHandler$2.run(ResultHandler.java:905)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1864)

Antworten auf die Frage(2)

Ihre Antwort auf die Frage