Well the version I suggested seems to be the newer and the best one to use
(I think) given that tapestry 5.3.6 is using hibernate 3.x.x.x.

I would give it a try, other then that you might want to try asking this
question in hibernate related forum as I think this is more of hibernate
problem and not tapestry

Cheers


On Sat, Aug 10, 2013 at 5:18 PM, Nomen Nominus <geribi...@outlook.com>wrote:

> Hello Boris.
> I have added hibernate-c3p0 ver. 3.3.1-GA.jar to my lib folder. May that
> be the issue of the following? Should I go for 3.6.10.Final?
>
> > From: horvat.z.bo...@gmail.com
> > Date: Sat, 10 Aug 2013 16:44:10 +0200
> > Subject: Re: Issue with cannot open connection
> > To: users@tapestry.apache.org
> >
> > Did you check to see if c3p0 is present in your pom? As far as I recall
> you
> > need to manually add it
> >
> >         <dependency>
> >             <groupId>org.hibernate</groupId>
> >             <artifactId>hibernate-c3p0</artifactId>
> >             <version>3.6.10.Final</version>
> >         </dependency>
> >
> > I recall having the similar problem and my solution was to add this
> (since
> > this is not included by tapestry/hibernate by default)
> >
> >
> >
> > On Sat, Aug 10, 2013 at 2:56 PM, Nomen Nominus <geribi...@outlook.com
> >wrote:
> >
> > > Here is my problem. I have a very classical configuration where a
> webapp
> > >
> > > with some Hibernate code in it accesses a MySQL DB. Everything is
> > >
> > > installed in Tomcat 6.
> > > I even acquired c3p0 connection pooling with the following
> configuration:
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > >
> > > <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate
> > > Configuration DTD//EN"
> > >    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd";>
> > > <hibernate-configuration>
> > >
> > > <session-factory>
> > >
> > >     <!-- Settings for MySql DB -->
> > >
> > >     <property
> > >
> name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
> > >
> > >     <property
> > >
> name="hibernate.connection.url">jdbc:mysql://localhost:3306/myDB?autoReconnect=true</property>
> > >     <property
> name="hibernate.connection.username">myUsername</property>
> > >
> > >     <property name="hibernate.connection.password">myPass</property>
> > >
> > >     <property
> > >
> name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
> > >     <property
> name="dialect">org.hibernate.dialect.MySQLDialect</property>
> > >     <property name="hibernate.connection.pool_size">5</property>
> > >     <property name="show_sql">true</property>
> > >
> > >     <property name="hibernate.c3p0.idle_test_period">1800</property>
> <!--
> > > In seconds -->
> > >
> > >     <property name="hibernate.c3p0.min_size">5</property>
> > >
> > >     <property name="hibernate.c3p0.max_size">20</property>
> > >
> > >     <property name="hibernate.c3p0.timeout">2400</property>
> > >     <property name="hibernate.c3p0.max_statements">50</property>
> > >
> > > </session-factory>
> > >
> > > </hibernate-configuration>
> > >
> > > After some time, ( around 60 secs ) Hibernate complains about dropped
> > > connections, the
> > >
> > > error message looks like this :
> > >
> > > com.mysql.jdbc.CommunicationsException : Communications link failure
> The
> > >
> > > last packet successfully received from the server was
> > > milliseconds ago. The last packet sent successfully to the server was 0
> > >
> > > milliseconds ago.
> > >
> > > java.io.EOFException : Can not read response from server. Expected to
> > >
> > > read 4 bytes, read 0 bytes before connection was unexpectedly lost.
> > >
> > >
> > > Refeshing the page once or twice usually fixes the problem.
> > >
> > >
> > > Has anyone else encountered on this issue before, and if so, please
> help
> > > me. What could be possible solution to this resolution?
> > >
> > > Thanks in advance.
> > >
> > >
> > >
> >
> >
> >
> >
> > --
> > Sincerely
> > *Boris Horvat*
>




-- 
Sincerely
*Boris Horvat*

Reply via email to