I made the change. It problem is erratic, so I'll just have to keep an
eye on it. I will look at the DB, though. Thanks!
--
Jason Lee
Programmer/Analyst
-----Original Message-----
From: Jeanfrancois Arcand [mailto:Jeanfrancois.Arcand_at_Sun.COM]
Sent: Friday, April 07, 2006 1:07 PM
To: users_at_glassfish.dev.java.net
Subject: Re: Error: An existing connection was forcibly closed by the
remote host
Jason Lee wrote:
> We have an application that is dying on Glassfish, but only
> sporadically. In case it matters, it's a JSF application talking to a
> PostgreSQL backend via Hibernate (and Spring). It works well under
> Tomcat (RI 1.1), but fails intermittently. Just this morning, I got
> the stack trace below. I waited a few minutes and hit refresh (which
> re-POST-ed the request) and the application worked. We're running on
> the April 4 nightly on Windows XP Pro.
>
> Any thoughts? Thanks!
To exception usualy means the client connection (postgresql driver)
didn't receive all the bytes it was expecting because the connection was
closes (by the PostgreSQL db). I suspect the problem is with the DB
itself (have you look at their bug list?) if it happen in Tomcat &
GlassFish. But to make sure, can you restart AS by adding the following
jvm-options in domain.xml:
<jvm-options>-Dcom.sun.enterprise.server.ss.ASQuickStartup=false</jvm-op
tions>
and see if the problem occurs?
Thanks
-- Jeanfrancois
>
> java.io.IOException: An existing connection was forcibly closed by the
> remote host
> sun.nio.ch.SocketDispatcher.write0(Native Method)
> sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:33)
> sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:104)
> sun.nio.ch.IOUtil.write(IOUtil.java:75)
> sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:302)
>
> com.sun.enterprise.server.ss.provider.ASOutputStream.write(ASOutputStr
> ea
> m.java:138)
>
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
>
> java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
> org.postgresql.core.PGStream.flush(PGStream.java:502)
>
> org.postgresql.core.v3.QueryExecutorImpl.sendSync(QueryExecutorImpl.ja
> va
> :672)
>
>
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:
> 187)
>
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2State
> me
> nt.java:437)
>
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJ
> db
> c2Statement.java:353)
>
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2
> St
> atement.java:257)
>
> net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:89)
> net.sf.hibernate.loader.Loader.getResultSet(Loader.java:880)
> net.sf.hibernate.loader.Loader.doQuery(Loader.java:273)
>
> net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(
> Lo
> ader.java:138)
> net.sf.hibernate.loader.Loader.doList(Loader.java:1063)
> net.sf.hibernate.loader.Loader.list(Loader.java:1054)
>
> net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
> net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1554)
> net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
>
> org.springframework.orm.hibernate.HibernateTemplate$19.doInHibernate(H
> ib
> ernateTemplate.java:706)
>
> org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateT
> em
> plate.java:363)
>
> org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemp
> la
> te.java:692)
>
> org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemp
> la
> te.java:679)
>
> com.iecokc.pentitulus.model.dao.hibernate.PentitulusHibernateDao.getOr
> de
> rHeader(Unknown Source)
>
> com.iecokc.pentitulus.model.service.impl.PentitulusService.getOrderHea
> de
> rDto(Unknown Source)
> com.iecokc.pentitulus.view.bean.OrderHeaderBean.init(Unknown
> Source)
>
> com.iecokc.pentitulus.view.bean.BaseBean.setServiceLocator(Unknown
> Source)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> av
> a:39)
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> or
> Impl.java:25)
> java.lang.reflect.Method.invoke(Method.java:585)
>
> com.sun.org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(P
> ro
> pertyUtils.java:1789)
>
> com.sun.faces.config.ManagedBeanFactoryImpl.setPropertiesIntoBean(Mana
> ge
> dBeanFactoryImpl.java:667)
>
> com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFac
> to
> ryImpl.java:345)
>
> com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreMana
> ge
> dBeans(ApplicationAssociate.java:542)
>
> com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.
> ja
> va:83)
>
> javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
>
> com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELRes
> ol
> ver.java:58)
> com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
>
> com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
>
> com.sun.faces.application.ValueBindingValueExpressionAdapter.getValue(
> Va
> lueBindingValueExpressionAdapter.java:95)
>
> com.iecokc.pentitulus.view.util.FacesUtils.getManagedBean(Unknown
> Source)
>
> com.iecokc.pentitulus.view.step.OrderHeaderInfoStep.hasMessage(Unknown
> Source)
>
> com.iecokc.pentitulus.view.bean.PrmsScheduledLineChooserBean.processPr
> ms ScheduledLineChoiceAction(Unknown Source)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> av
> a:39)
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> or
> Impl.java:25)
> java.lang.reflect.Method.invoke(Method.java:585)
> com.sun.el.parser.AstValue.invoke(AstValue.java:151)
>
> com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
>
> javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(Meth
> od
> BindingMethodExpressionAdapter.java:71)
>
> com.sun.faces.application.ActionListenerImpl.processAction(ActionListe
> ne
> rImpl.java:95)
> javax.faces.component.UICommand.broadcast(UICommand.java:384)
>
> javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:452)
>
> javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:76
> 4)
>
> com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicati
> on
> Phase.java:97)
>
> com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
>
> com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:132)
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
> com.iecokc.filters.NoCachingFilter.doFilter(Unknown Source)
>
> --
> Jason Lee
> Programmer/Analyst
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net