2013-05-03 3 views
2

이전에 보지 못했던 PrimeFaces 애플리케이션에 이상한 오류가 발생했습니다. ... 그렇지 않으면 더 primefaces을org.primefaces.component.resetinput.ResetInputActionListener 유형의 StateHolder를 복원 할 수 없습니다.

org.primefaces.component.resetinput.ResetInputActionListener 실제로 어떤 인수 없음의 생성자가없는 클래스 (? 실종 인자없는 생성자) 형 org.primefaces.component.resetinput.ResetInputActionListener의 StateHolder를 복원 할 수 없습니다 하지만 전에 문제가 아니었다 앱이 작동 할 것입니다 ...

오류의 실제 원인과 해결 방법은 무엇입니까?

I에서는 WebSphere 7에서 MyFaces 2.0.7PrimeFaces 3.5을 사용하고 있습니다.

        javax.faces.FacesException: java.lang.RuntimeException: Could not restore StateHolder of type org.primefaces.component.resetinput.ResetInputActionListener (missing no-args constructor?) 
    at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241) 
    at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156) 
    at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:191) 
    at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) 
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189) 
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1663) 
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597) 
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131) 
    at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79) 
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188) 
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) 
    at de.datev.commons.web.filter.CharsetEncodingFilter.doFilter(CharsetEncodingFilter.java:54) 
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188) 
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) 
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77) 
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908) 
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934) 
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502) 
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179) 
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91) 
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864) 
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592) 
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) 
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) 
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) 
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) 
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83) 
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) 
    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.async.ResultHandler$2.run(ResultHandler.java:905) 
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604) 
Caused by: java.lang.RuntimeException: Could not restore StateHolder of type org.primefaces.component.resetinput.ResetInputActionListener (missing no-args constructor?) 
    at javax.faces.component.UIComponentBase.restoreAttachedState(UIComponentBase.java:1603) 
    at javax.faces.component._DeltaList.restoreState(_DeltaList.java:251) 
    at javax.faces.component.UIComponentBase.restoreAttachedState(UIComponentBase.java:1616) 
    at javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1730) 
    at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1386) 
    at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1429) 
    at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1429) 
    at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1429) 
    at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1429) 
    at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1429) 
    at javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:736) 
    at org.apache.myfaces.application.StateManagerImpl.restoreView(StateManagerImpl.java:129) 
    at org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106) 
    at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView(FaceletViewDeclarationLanguage.java:1464) 
    at org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:279) 
    at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:123) 
    at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:171) 
    ... 32 more 
Caused by: java.lang.InstantiationException: org.primefaces.component.resetinput.ResetInputActionListener 
    at java.lang.J9VMInternals.newInstanceImpl(Native Method) 
    at java.lang.Class.newInstance(Class.java:1345) 
    at javax.faces.component.UIComponentBase.restoreAttachedState(UIComponentBase.java:1599) 
    ... 48 more 
+0

이 문제가 발생한 경우를 제공해 줄 수 있습니까? – Aquillo

+0

매우 복잡한 견해이므로 왜 그러한 일이 발생하는지 알지 못합니다. 어디에서 검색해야할지 모르겠습니다. –

+0

[SSCCE] (http://www.sscce.org/) -> 트리밍을위한 팁 :) 아마도 도움이 될 것입니다. 이 문제를 해결하려면 – Aquillo

답변

0

나는 평판이 충분하지 않지만 발견 한 것을 공유하고 싶습니다.

다음 링크를 사용하여 비슷한 문제를 해결했습니다. 대신에 'P : resetInput'

는 희망이 도움이 : 링크를 제안한 것처럼

http://forum.primefaces.org/viewtopic.php?f=3&t=29338

위, 나는 'resetInput 체육'을 사용했다.

0

p : resetInput은 Primefaces 3.5에서 버그가 있으며 (4.0에서 수정 됨) 인수가없는 생성자가 없습니다.

사용 Omnifaces ResetInputAjaxActionListener 대신, Primefaces 코드를 재사용 사용자 정의 resetInput 방법을 정의하고 행동에서 전화를 걸거나 :

public static void resetInputs(String targetIds) { 
    ActionEvent event = new ActionEvent(Faces.getViewRoot()); 
    ResetInputActionListener reset = new ResetInputActionListener(Components.createValueExpression(targetIds, String.class)); 
    reset.processAction(event); 
} 

참고 : 재정 ResetInputActionListener 및 추가 생성자 누락 작동하지 않습니다 포함 된 구성 요소 ISN 때문에 제대로 복원되지 않았습니다.

관련 문제