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-options>
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(ASOutputStrea
> 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.java
> :672)
>
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:
> 187)
>
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stateme
> nt.java:437)
>
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdb
> c2Statement.java:353)
>
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2St
> 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(Hib
> ernateTemplate.java:706)
>
> org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTem
> plate.java:363)
>
> org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTempla
> te.java:692)
>
> org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTempla
> te.java:679)
>
> com.iecokc.pentitulus.model.dao.hibernate.PentitulusHibernateDao.getOrde
> rHeader(Unknown Source)
>
> com.iecokc.pentitulus.model.service.impl.PentitulusService.getOrderHeade
> 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.jav
> a:39)
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
> java.lang.reflect.Method.invoke(Method.java:585)
>
> com.sun.org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(Pro
> pertyUtils.java:1789)
>
> com.sun.faces.config.ManagedBeanFactoryImpl.setPropertiesIntoBean(Manage
> dBeanFactoryImpl.java:667)
>
> com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFacto
> ryImpl.java:345)
>
> com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManage
> 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(FacesCompositeELResol
> 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.processPrms
> ScheduledLineChoiceAction(Unknown Source)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> 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(Method
> BindingMethodExpressionAdapter.java:71)
>
> com.sun.faces.application.ActionListenerImpl.processAction(ActionListene
> 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:764)
>
> com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplication
> 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
>
>