struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Kiley <jhki...@summa-tech.com>
Subject Re: [S1]struts with hibernate
Date Tue, 10 Feb 2009 17:20:19 GMT
Down in there you have a "java.net.SocketException: Connection reset"
...and repeated "The connection attempt failed." log messages right at the
top there.  Something's going on between you and your database server; looks
like a network problem, or maybe somehow something monkeying with your
database's ability to accept connections.

On Tue, Feb 10, 2009 at 3:07 PM, Lalchandra Rampersaud <
lrampersaud@ceis.cujae.edu.cu> wrote:

> hi,
> i am using struts 1.3 with hibernate which connects to a postgre database.
>  from time to time i would get an error stating that the hibernate session
> cannot be opened.
> what could be the cause of the problem?
> here is  the stack trace of the problem..
>
> - SQL Error: 0, SQLState: 08001
> - The connection attempt failed.
> - SQL Error: 0, SQLState: 08001
> - The connection attempt failed.
> Feb 10, 2009 8:02:29 PM org.apache.catalina.core.ApplicationContext log
> SEVERE: StandardWrapper.Throwable
> org.springframework.transaction.CannotCreateTransactionException: Could not
> open Hibernate Session for transaction; nested exception is
> org.hibernate.exception.JDBCConnectionException: Cannot open connection
> org.hibernate.exception.JDBCConnectionException: Cannot open connection
> at
> org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:66)
> at
> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
> at
> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
> at
> org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:301)
> at
> org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:110)
> at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:137)
> at org.hibernate.impl.SessionImpl.connection(SessionImpl.java:345)
> at
> org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:407)
> at
> org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:281)
> at
> org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:217)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:89)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
> at $Proxy73.getUseCaseRolesAndRolesBoss(Unknown Source)
> at
> acegisecurity.teamsoft.TSActionServlet.createMapViewResorce(TSActionServlet.java:47)
> at acegisecurity.teamsoft.TSActionServlet.init(TSActionServlet.java:36)
> at javax.servlet.GenericServlet.init(GenericServlet.java:212)
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
> at
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:133)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
> at java.lang.Thread.run(Thread.java:595)
> Caused by: org.postgresql.util.PSQLException: The connection attempt
> failed.
> at
> org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136)
> at
> org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)
> at
> org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:117)
> at
> org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
> at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
> at org.postgresql.Driver.connect(Driver.java:235)
> at java.sql.DriverManager.getConnection(DriverManager.java:525)
> at java.sql.DriverManager.getConnection(DriverManager.java:140)
> at
> org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:290)
> at
> org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:276)
> at
> org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:258)
> at
> org.springframework.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:240)
> at
> org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:80)
> at
> org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:298)
> ... 25 more
> Caused by: java.net.SocketException: Connection reset
> at java.net.SocketInputStream.read(SocketInputStream.java:168)
> at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
> at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:241)
> at
> org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:253)
> at
> org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
> ... 38 more
> Feb 10, 2009 8:02:29 PM org.apache.catalina.core.StandardWrapperValve
> invoke
> SEVERE: Allocate exception for servlet action
> java.net.SocketException: Connection reset
> at java.net.SocketInputStream.read(SocketInputStream.java:168)
> at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
> at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:241)
> at
> org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:253)
> at
> org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
> at
> org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)
> at
> org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:117)
> at
> org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
> at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
> at org.postgresql.Driver.connect(Driver.java:235)
> at java.sql.DriverManager.getConnection(DriverManager.java:525)
> at java.sql.DriverManager.getConnection(DriverManager.java:140)
> at
> org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:290)
> at
> org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:276)
> at
> org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:258)
> at
> org.springframework.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:240)
> at
> org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:80)
> at
> org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:298)
> at
> org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:110)
> at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:137)
> at org.hibernate.impl.SessionImpl.connection(SessionImpl.java:345)
> at
> org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:407)
> at
> org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:281)
> at
> org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:217)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:89)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
> at $Proxy73.getUseCaseRolesAndRolesBoss(Unknown Source)
> at
> acegisecurity.teamsoft.TSActionServlet.createMapViewResorce(TSActionServlet.java:47)
> at acegisecurity.teamsoft.TSActionServlet.init(TSActionServlet.java:36)
> at javax.servlet.GenericServlet.init(GenericServlet.java:212)
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
> at
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:133)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
> at java.lang.Thread.run(Thread.java:595)
>
>
> saludos
> lalchandra rampersaudVI Conferencia Internacional de Energía Renovable,
> Ahorro de Energía y Educación Energética
> 9 - 12 de Junio 2009, Palacio de las Convenciones
> ...Por una cultura energética sustentable
> www.ciercuba.com
>



-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message