Boa tarde
Tenho uma aplicação que roda no jboss portal 2.6.2 e utilizo jsf/seam e javascript basicamente. Após colocar uma função javascript para que não seja permitido o duplo clique em qualquer botão, a aplicação começou a se comportar de uma forma bem instável e constantemente recebo a exceção:
2008 -04-01 12 : 49 : 41 , 250 WARN [ javax . enterprise . resource . webcontainer . jsf . lifecycle ] executePhase ( RENDER_RESPONSE 6 , com . sun . faces . context . FacesContextImpl @591349 ) threw exception
javax . faces . FacesException
at com . sun . faces . lifecycle . RenderResponsePhase . execute ( RenderResponsePhase . java : 135 )
at com . sun . faces . lifecycle . LifecycleImpl . phase ( LifecycleImpl . java : 251 )
at com . sun . faces . lifecycle . LifecycleImpl . render ( LifecycleImpl . java : 144 )
at javax . faces . webapp . FacesServlet . service ( FacesServlet . java : 245 )
at org . apache . catalina . core . ApplicationFilterChain . internalDoFilter ( ApplicationFilterChain . java : 290 )
at org . apache . catalina . core . ApplicationFilterChain . doFilter ( ApplicationFilterChain . java : 206 )
at org . jboss . seam . web . ExceptionFilter . doFilter ( ExceptionFilter . java : 57 )
at org . apache . catalina . core . ApplicationFilterChain . internalDoFilter ( ApplicationFilterChain . java : 235 )
at org . apache . catalina . core . ApplicationFilterChain . doFilter ( ApplicationFilterChain . java : 206 )
at org . jboss . web . tomcat . filters . ReplyHeaderFilter . doFilter ( ReplyHeaderFilter . java : 96 )
at org . apache . catalina . core . ApplicationFilterChain . internalDoFilter ( ApplicationFilterChain . java : 235 )
at org . apache . catalina . core . ApplicationFilterChain . doFilter ( ApplicationFilterChain . java : 206 )
at org . apache . catalina . core . StandardWrapperValve . invoke ( StandardWrapperValve . java : 230 )
at org . apache . catalina . core . StandardContextValve . invoke ( StandardContextValve . java : 175 )
at org . jboss . web . tomcat . security . SecurityAssociationValve . invoke ( SecurityAssociationValve . java : 179 )
at org . jboss . web . tomcat . security . JaccContextValve . invoke ( JaccContextValve . java : 84 )
at org . apache . catalina . core . StandardHostValve . invoke ( StandardHostValve . java : 128 )
at org . apache . catalina . valves . ErrorReportValve . invoke ( ErrorReportValve . java : 104 )
at org . jboss . web . tomcat . service . jca . CachedConnectionValve . invoke ( CachedConnectionValve . java : 157 )
at org . apache . catalina . authenticator . SingleSignOn . invoke ( SingleSignOn . java : 393 )
at org . apache . catalina . core . StandardEngineValve . invoke ( StandardEngineValve . java : 109 )
at org . apache . catalina . connector . CoyoteAdapter . service ( CoyoteAdapter . java : 241 )
at org . apache . coyote . http11 . Http11Processor . process ( Http11Processor . java : 844 )
at org . apache . coyote . http11 . Http11Protocol$Http11ConnectionHandler . process ( Http11Protocol . java : 580 )
at org . apache . tomcat . util . net . JIoEndpoint$Worker . run ( JIoEndpoint . java : 447 )
at java . lang . Thread . run ( Thread . java : 595 )
Caused by : ClientAbortException : javax . net . ssl . SSLException : Connection has been shutdown : javax . net . ssl . SSLException : java . net . SocketException : Connection reset by peer : socket write error
at org . apache . catalina . connector . OutputBuffer . realWriteBytes ( OutputBuffer . java : 358 )
at org . apache . tomcat . util . buf . ByteChunk . flushBuffer ( ByteChunk . java : 434 )
at org . apache . catalina . connector . OutputBuffer . doFlush ( OutputBuffer . java : 309 )
at org . apache . catalina . connector . OutputBuffer . flush ( OutputBuffer . java : 288 )
at org . apache . catalina . connector . Response . flushBuffer ( Response . java : 542 )
at org . apache . catalina . connector . ResponseFacade . flushBuffer ( ResponseFacade . java : 279 )
at com . sun . faces . application . ViewHandlerImpl . renderView ( ViewHandlerImpl . java : 203 )
at org . jboss . seam . jsf . SeamViewHandler . renderView ( SeamViewHandler . java : 59 )
at com . sun . faces . lifecycle . RenderResponsePhase . execute ( RenderResponsePhase . java : 106 )
… 25 more
Caused by : javax . net . ssl . SSLException : Connection has been shutdown : javax . net . ssl . SSLException : java . net . SocketException : Connection reset by peer : socket write error
at com . sun . net . ssl . internal . ssl . SSLSocketImpl . checkEOF ( SSLSocketImpl . java : 1232 )
at com . sun . net . ssl . internal . ssl . SSLSocketImpl . checkWrite ( SSLSocketImpl . java : 1244 )
at com . sun . net . ssl . internal . ssl . AppOutputStream . write ( AppOutputStream . java : 43 )
at org . apache . coyote . http11 . InternalOutputBuffer$OutputStreamOutputBuffer . doWrite ( InternalOutputBuffer . java : 764 )
at org . apache . coyote . http11 . filters . ChunkedOutputFilter . doWrite ( ChunkedOutputFilter . java : 124 )
at org . apache . coyote . http11 . InternalOutputBuffer . doWrite ( InternalOutputBuffer . java : 570 )
at org . apache . coyote . Response . doWrite ( Response . java : 560 )
at org . apache . catalina . connector . OutputBuffer . realWriteBytes ( OutputBuffer . java : 353 )
… 33 more
Caused by : javax . net . ssl . SSLException : java . net . SocketException : Connection reset by peer : socket write error
at com . sun . net . ssl . internal . ssl . Alerts . getSSLException ( Alerts . java : 166 )
at com . sun . net . ssl . internal . ssl . SSLSocketImpl . fatal ( SSLSocketImpl . java : 1584 )
at com . sun . net . ssl . internal . ssl . SSLSocketImpl . fatal ( SSLSocketImpl . java : 1547 )
at com . sun . net . ssl . internal . ssl . SSLSocketImpl . handleException ( SSLSocketImpl . java : 1511 )
at com . sun . net . ssl . internal . ssl . SSLSocketImpl . handleException ( SSLSocketImpl . java : 1456 )
at com . sun . net . ssl . internal . ssl . AppOutputStream . write ( AppOutputStream . java : 64 )
at org . apache . coyote . http11 . InternalOutputBuffer . commit ( InternalOutputBuffer . java : 595 )
at org . apache . coyote . http11 . Http11Processor . action ( Http11Processor . java : 936 )
at org . apache . coyote . Response . action ( Response . java : 181 )
at org . apache . coyote . http11 . InternalOutputBuffer . doWrite ( InternalOutputBuffer . java : 563 )
at org . apache . coyote . Response . doWrite ( Response . java : 560 )
at org . apache . catalina . connector . OutputBuffer . realWriteBytes ( OutputBuffer . java : 353 )
at org . apache . tomcat . util . buf . ByteChunk . flushBuffer ( ByteChunk . java : 434 )
at org . apache . tomcat . util . buf . ByteChunk . append ( ByteChunk . java : 349 )
at org . apache . tomcat . util . buf . IntermediateOutputStream . write ( C2BConverter . java : 242 )
at sun . nio . cs . StreamEncoder$CharsetSE . writeBytes ( StreamEncoder . java : 336 )
at sun . nio . cs . StreamEncoder$CharsetSE . implFlushBuffer ( StreamEncoder . java : 404 )
at sun . nio . cs . StreamEncoder$CharsetSE . implFlush ( StreamEncoder . java : 408 )
at sun . nio . cs . StreamEncoder . flush ( StreamEncoder . java : 152 )
at java . io . OutputStreamWriter . flush ( OutputStreamWriter . java : 213 )
at org . apache . tomcat . util . buf . WriteConvertor . flush ( C2BConverter . java : 191 )
at org . apache . tomcat . util . buf . C2BConverter . flushBuffer ( C2BConverter . java : 134 )
at org . apache . catalina . connector . OutputBuffer . write ( OutputBuffer . java : 439 )
at org . apache . catalina . connector . CoyoteWriter . write ( CoyoteWriter . java : 143 )
at org . apache . catalina . connector . CoyoteWriter . write ( CoyoteWriter . java : 152 )
at com . sun . faces . application . ViewHandlerImpl$WriteBehindStateWriter . flushToWriter ( ViewHandlerImpl . java : 934 )
at com . sun . faces . application . ViewHandlerImpl . renderView ( ViewHandlerImpl . java : 184 )
… 27 more
A função javascript é relativamente simples mas não entendo o pq da aplicação funcionar normalmente se eu remove-la.
< ui : script >
var listaBotoes = new Array ();
var botaoJaFoiClicado = false ;
var contadorBotoes = 0 ;
function desabilitarBotaoSubmit ( button , form ) {
var i = 0 ;
var botoes = listaBotoes . toString ();
var existeBotaoArray = botoes . match ( button . name );
if ( existeBotaoArray == null ) {
listaBotoes [ contadorBotoes ] = button . name ;
contadorBotoes ++ ;
}
for ( i = 0 ; i != listaBotoes . length ; i ++ ) {
if ( listaBotoes [ i ] == button . name ) {
if ( botaoJaFoiClicado == false ) {
botaoJaFoiClicado = true ;
button . value = 'Aguarde!' ;
document . forms [ form ] . submit ();
return true ;
} else {
alert ( "Aguarde!" );
return false ;
}
}
}
}
</ ui : script >
< ui : button rendered = "#{captura.analise}"
actionExpression = "#{submeterDados.submeterAction}"
id = "analisarButton"
style = "margin-bottom: 5px"
onClick = "return desabilitarBotaoSubmit(this, 'form1')"
styleClass = "btoes"
text = "#{messages['analisar.button']}" />
Isso quando ele não finaliza a conversação:
2008-04-01 13:00:17,193 INFO [javax.enterprise.resource.webcontainer.jsf.lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
sourceId=null[severity=(WARN 1), summary=(The conversation ended, timed out or was processing another request), detail=(The conversation ended, timed out or was processing another request)]
Preciso realizar alguma configuração adicional? Existe outra solução de não permitir o duplo clique?
[]'s