Foros del Web » Programación para mayores de 30 ;) » Java »

Java WebStart se desconecta luego de cierto tiempo inactivo

Estas en el tema de Java WebStart se desconecta luego de cierto tiempo inactivo en el foro de Java en Foros del Web. Hola amigos javeros. Desarrollé una aplicación Java en NetBeans 6.9.1 a la cual accedo remotamente con Java WebStart. Esta aplicación utiliza una BD remota (es ...
  #1 (permalink)  
Antiguo 23/12/2011, 10:21
 
Fecha de Ingreso: noviembre-2010
Ubicación: Tandil
Mensajes: 79
Antigüedad: 13 años, 5 meses
Puntos: 3
Pregunta Java WebStart se desconecta luego de cierto tiempo inactivo

Hola amigos javeros. Desarrollé una aplicación Java en NetBeans 6.9.1 a la cual accedo remotamente con Java WebStart. Esta aplicación utiliza una BD remota (es decir, no en mi PC, sino en un servidor de otra ciudad). Mientras estoy ejecutando la aplicación funciona a la perfección. Ahora bien, cuando pasa cierto tiempo sin que toque nada (llámese "me voy a comer"), la próxima consulta que quiera hacer a la BD, me da la excepción que se encuentra como primer mensaje (no la puse aca porque sobrepaso los 10.000 caracteres).
Estimo que podría llegar a ser alguna configuración de Java WebStart. Digo esto porque cuando ejecuto el proyecto desde NetBeans, no tengo ningún problema.
Espero haber sido claro. Desde ya muchas gracias de antemano !!!
  #2 (permalink)  
Antiguo 23/12/2011, 10:23
 
Fecha de Ingreso: noviembre-2010
Ubicación: Tandil
Mensajes: 79
Antigüedad: 13 años, 5 meses
Puntos: 3
Respuesta: Java WebStart se desconecta luego de cierto tiempo inactivo

PARTE 1:
-----------
Código:
22/12/2011 15:07:35 org.hibernate.util.JDBCExceptionReporter logExceptions
ADVERTENCIA: SQL Error: 0, SQLState: 08006
22/12/2011 15:07:35 org.hibernate.util.JDBCExceptionReporter logExceptions
GRAVE: Un error de E/S ha ocurrido mientras se enviaba al backend.
Exception in thread "AWT-EventQueue-0" org.hibernate.exception.JDBCConnectionException: could not execute query
	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
	at org.hibernate.loader.Loader.doList(Loader.java:2223)
	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
	at org.hibernate.loader.Loader.list(Loader.java:2099)
	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
	at Parametros.Bienes.buscaUltimo(Bienes.java:138)
	at Parametros.Bienes.inicializarFormulario(Bienes.java:118)
	at Parametros.Bienes.focoObtenido(Bienes.java:155)
	at Parametros.Bienes.fld_CodigoFocusGained(Bienes.java:1572)
	at Parametros.Bienes.access$700(Bienes.java:22)
	at Parametros.Bienes$7.focusGained(Bienes.java:1156)
	at java.awt.AWTEventMulticaster.focusGained(Unknown Source)
	at java.awt.Component.processFocusEvent(Unknown Source)
	at javax.swing.JFormattedTextField.processFocusEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$000(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$2.run(Unknown Source)
	at java.awt.EventQueue$2.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.SequencedEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$000(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$2.run(Unknown Source)
	at java.awt.EventQueue$2.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: org.postgresql.util.PSQLException: Un error de E/S ha ocurrido mientras se enviaba al backend.
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:218)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
	at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
	at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
	at org.hibernate.loader.Loader.doQuery(Loader.java:674)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
	at org.hibernate.loader.Loader.doList(Loader.java:2220)
	... 59 more
Caused by: java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(Unknown Source)
	at org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:135)
	at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:104)
	at org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:73)
	at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:259)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1166)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192)
	... 67 more
  #3 (permalink)  
Antiguo 23/12/2011, 10:24
 
Fecha de Ingreso: noviembre-2010
Ubicación: Tandil
Mensajes: 79
Antigüedad: 13 años, 5 meses
Puntos: 3
Respuesta: Java WebStart se desconecta luego de cierto tiempo inactivo

Parte 2:
---------
Código:
22/12/2011 15:07:38 org.hibernate.util.JDBCExceptionReporter logExceptions
ADVERTENCIA: SQL Error: 0, SQLState: 08006
22/12/2011 15:07:38 org.hibernate.util.JDBCExceptionReporter logExceptions
GRAVE: Un error de E/S ha ocurrido mientras se enviaba al backend.
Exception in thread "AWT-EventQueue-0" org.hibernate.exception.JDBCConnectionException: could not execute query
	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
	at org.hibernate.loader.Loader.doList(Loader.java:2223)
	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
	at org.hibernate.loader.Loader.list(Loader.java:2099)
	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
	at Parametros.Bienes.buscaUltimo(Bienes.java:138)
	at Parametros.Bienes.inicializarFormulario(Bienes.java:118)
	at Parametros.Bienes.focoObtenido(Bienes.java:155)
	at Parametros.Bienes.fld_CodigoFocusGained(Bienes.java:1572)
	at Parametros.Bienes.access$700(Bienes.java:22)
	at Parametros.Bienes$7.focusGained(Bienes.java:1156)
	at java.awt.AWTEventMulticaster.focusGained(Unknown Source)
	at java.awt.Component.processFocusEvent(Unknown Source)
	at javax.swing.JFormattedTextField.processFocusEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$000(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$2.run(Unknown Source)
	at java.awt.EventQueue$2.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.SequencedEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$000(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$2.run(Unknown Source)
	at java.awt.EventQueue$2.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: org.postgresql.util.PSQLException: Un error de E/S ha ocurrido mientras se enviaba al backend.
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:218)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
	at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
	at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
	at org.hibernate.loader.Loader.doQuery(Loader.java:674)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
	at org.hibernate.loader.Loader.doList(Loader.java:2220)
	... 59 more
Caused by: java.net.SocketException: Connection reset by peer: socket write error
	at java.net.SocketOutputStream.socketWrite0(Native Method)
	at java.net.SocketOutputStream.socketWrite(Unknown Source)
	at java.net.SocketOutputStream.write(Unknown Source)
	at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
	at java.io.BufferedOutputStream.flush(Unknown Source)
	at org.postgresql.core.PGStream.flush(PGStream.java:508)
	at org.postgresql.core.v3.QueryExecutorImpl.sendSync(QueryExecutorImpl.java:676)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
	... 67 more
  #4 (permalink)  
Antiguo 27/12/2011, 08:11
 
Fecha de Ingreso: noviembre-2010
Ubicación: Tandil
Mensajes: 79
Antigüedad: 13 años, 5 meses
Puntos: 3
Respuesta: Java WebStart se desconecta luego de cierto tiempo inactivo

Alguna idea, por favor?
  #5 (permalink)  
Antiguo 10/01/2012, 05:38
 
Fecha de Ingreso: noviembre-2010
Ubicación: Tandil
Mensajes: 79
Antigüedad: 13 años, 5 meses
Puntos: 3
Respuesta: Java WebStart se desconecta luego de cierto tiempo inactivo

Alguien ???
  #6 (permalink)  
Antiguo 10/01/2012, 14:50
Avatar de Xerelo  
Fecha de Ingreso: mayo-2009
Mensajes: 2.175
Antigüedad: 14 años, 11 meses
Puntos: 306
Respuesta: Java WebStart se desconecta luego de cierto tiempo inactivo

No puedes pretender tener una conexión con una base de datos eternamente abierta.

Lo que tienes que hacer es comprobar que la conexión sigue abierta, y si no volver a abrirla.
__________________
Cada vez que solucionas los problemas de alguien que no se esfuerza, piensa en que el día de mañana puede llegar a ser tu compañero de trabajo, o peor, tu jefe.
  #7 (permalink)  
Antiguo 20/01/2012, 08:12
 
Fecha de Ingreso: noviembre-2010
Ubicación: Tandil
Mensajes: 79
Antigüedad: 13 años, 5 meses
Puntos: 3
Respuesta: Java WebStart se desconecta luego de cierto tiempo inactivo

Hola Xerelo, muchas gracias por responder. Recién vuelvo de vacaciones, por eso la demora. Tienes toda la razón. Voy a aplicarlo. Saludos.

Etiquetas: desconexion, inactivo, timeout, webstart
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 03:02.