You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jean-Michel OLTRA <jm...@imereos.fr> on 2012/11/07 07:37:45 UTC
Hibernate connection pool
Hi all,
Is there a way to get Tapestry-Hibernate working with an external
connection pool? I tried c3p0, and proxool.
Each of these gives me:
ERROR org.apache.tapestry5.ioc.Registry - Error invoking method public static
org.apache.tapestry5.hibernate.HibernateSessionManager
org.apache.tapestry5.hibernate.HibernateCoreModule.buildHibernateSessionManager(org.apache.tapestry5.hibernate.HibernateSessionSource,org.apache.tapestry5.ioc.services.PerthreadManager):
org.hibernate.SessionFactory.openSession()Lorg/hibernate/classic/Session;
ERROR org.apache.tapestry5.ioc.Registry
- Operations trace:
ERROR org.apache.tapestry5.ioc.Registry
- [ 1] Instantiating service HibernateSessionManager implementation via
org.apache.tapestry5.hibernate.HibernateCoreModule.buildHibernateSessionManager(HibernateSessionSource, PerthreadManager) (at HibernateCoreModule.java:96)
ERROR org.apache.tapestry5.ioc.Registry
- [ 2] Constructing service implementation via org.apache.tapestry5.hibernate.HibernateCoreModule.buildHibernateSessionManager(HibernateSessionSource,
PerthreadManager) (at HibernateCoreModule.java:96
My Tapestry is T 5.3.3, Tapestry-Spring-Security 3.0.5, and hibernate
pools (c3p0 or proxool) 4.1.7.Final
I read this, but did not try it:
http://tapestry.1045711.n5.nabble.com/Trouble-with-update-of-the-tapestry-5-1-0-5-gt-5-3-4-td5715691.html
Thanks for any hint.
--
jm
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Hibernate connection pool
Posted by Jean-Michel OLTRA <jm...@imereos.fr>.
Bonjour,
Le mercredi 07 novembre 2012, antalk a écrit...
> <property name="hibernate.c3p0.acquire_increment">1</property>
> <property name="hibernate.c3p0.idle_test_period">240</property>
> <property name="hibernate.c3p0.max_size">100</property>
> <property name="hibernate.c3p0.max_statements">0</property>
> <property name="hibernate.c3p0.min_size">10</property>
> <property name="hibernate.c3p0.timeout">300</property>
> <property
> name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
> To your hibernate.cfg.xml and make sure you have C3P0 as available library
> on the classpath.
> Should work ootb.
My pool was build with these requirements.
The problem seems to be in the Hibernate 4.x version.
Moving hibernate-c3p0 from version 4.1.7.Final to 3.6.10.Final resolved
the issue!
Thanks to all for pointing me in another direction! I thought it was
something wrong in my hibernate and c3p0 files.
--
jm
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Hibernate connection pool
Posted by antalk <na...@vankalleveen.net>.
Add this:
<property name="hibernate.c3p0.acquire_increment">1</property>
<property name="hibernate.c3p0.idle_test_period">240</property>
<property name="hibernate.c3p0.max_size">100</property>
<property name="hibernate.c3p0.max_statements">0</property>
<property name="hibernate.c3p0.min_size">10</property>
<property name="hibernate.c3p0.timeout">300</property>
<property
name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
To your hibernate.cfg.xml and make sure you have C3P0 as available library
on the classpath.
Should work ootb.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Hibernate-connection-pool-tp5717744p5717778.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Hibernate connection pool
Posted by willbro <ll...@yahoo.fr>.
salut
I just deleted the dependency. it did not changed anything! :-(
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Hibernate-connection-pool-tp5717744p5717839.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Hibernate connection pool
Posted by Jean-Michel OLTRA <jm...@imereos.fr>.
Bonjour,
Le jeudi 08 novembre 2012, willbro a écrit...
> how do i do that. which dependency should i delete? everytime i try and run
> mvn eclipse:eclipse the 3.5.6 version is still dowloaded!
You are requesting version 3.5.6 for Hibernate annotations!
--
jm
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Hibernate connection pool
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 08 Nov 2012 18:40:35 -0200, willbro <ll...@yahoo.fr> wrote:
> thanks fpr your answer
> how do i do that. which dependency should i delete? everytime i try and
> run mvn eclipse:eclipse the 3.5.6 version is still dowloaded!
This question is completely off-topic in this mailing list, so please post
it in an appropriate place.
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Hibernate connection pool
Posted by willbro <ll...@yahoo.fr>.
This is my pom
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>tutorial</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>tutorial Tapestry 5 Application</name>
<dependencies>
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-core</artifactId>
<version>${tapestry-release-version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.1.7.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.1.7.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>4.1.7.Final</version>
</dependency>
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-yuicompressor</artifactId>
<version>${tapestry-release-version}</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng-release-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>${easymock-release-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-test</artifactId>
<version>${tapestry-release-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api-release-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-javadoc</artifactId>
<version>${tapestry-release-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-hibernate</artifactId>
<version>${tapestry-release-version}</version>
</dependency>
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.7</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.21</version>
</dependency>
</dependencies>
<build>
<finalName>tutorial</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<optimize>true</optimize>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
<configuration>
<systemPropertyVariables>
<tapestry.execution-mode>Qa</tapestry.execution-mode>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.16</version>
<configuration>
<requestLog
implementation="org.mortbay.jetty.NCSARequestLog">
<append>true</append>
</requestLog>
<systemProperties>
<systemProperty>
<name>tapestry.execution-mode</name>
<value>development</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
<reporting/>
<repositories>
<repository>
<id>apache-staging</id>
<url>https://repository.apache.org/content/groups/staging/</url>
</repository>
</repositories>
<properties>
<tapestry-release-version>5.3.6</tapestry-release-version>
<servlet-api-release-version>2.5</servlet-api-release-version>
<testng-release-version>5.14.10</testng-release-version>
<easymock-release-version>3.0</easymock-release-version>
</properties>
</project>
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Hibernate-connection-pool-tp5717744p5717836.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Hibernate connection pool
Posted by willbro <ll...@yahoo.fr>.
thanks fpr your answer
how do i do that. which dependency should i delete? everytime i try and run
mvn eclipse:eclipse the 3.5.6 version is still dowloaded!
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Hibernate-connection-pool-tp5717744p5717833.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Hibernate connection pool
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 08 Nov 2012 17:32:39 -0200, willbro <ll...@yahoo.fr> wrote:
> Error invoking method public static
> org.apache.tapestry5.hibernate.HibernateSessionManager
> org.apache.tapestry5.hibernate.HibernateCoreModule.buildHibernateSessionManager(org.apache.tapestry5.hibernate.HibernateSessionSource,org.apache.tapestry5.ioc.services.PerthreadManager):
> org.hibernate.SessionFactory.openSession()Lorg/hibernate/classic/Session;
>
>
> extract og my prom:
>
> <dependency>
> <groupId>org.hibernate</groupId>
> <artifactId>hibernate-core</artifactId>
> <version>4.1.7.Final</version>
> </dependency>
>
> <dependency>
> <groupId>org.hibernate</groupId>
> <artifactId>hibernate-annotations</artifactId>
> <version>3.5.6-Final</version>
> </dependency>
You're mixing Hibernate versions: 4.1.7 and 3.5.6. Use just one.
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Hibernate connection pool
Posted by willbro <ll...@yahoo.fr>.
I think i have the same problem. none of the solutions proposed worked for
me.
I have been fighting for days with this problem. could someone help me
please
Error invoking method public static
org.apache.tapestry5.hibernate.HibernateSessionManager
org.apache.tapestry5.hibernate.HibernateCoreModule.buildHibernateSessionManager(org.apache.tapestry5.hibernate.HibernateSessionSource,org.apache.tapestry5.ioc.services.PerthreadManager):
org.hibernate.SessionFactory.openSession()Lorg/hibernate/classic/Session;
extract og my prom:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.1.7.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.5.6-Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>3.3.0.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.1.7.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>4.1.7.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.3.0.Final</version>
</dependency>
Thanks for any reply
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Hibernate-connection-pool-tp5717744p5717829.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Hibernate connection pool
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Wed, 07 Nov 2012 04:37:45 -0200, Jean-Michel OLTRA
<jm...@imereos.fr> wrote:
> Hi all,
Hi!
> Is there a way to get Tapestry-Hibernate working with an external
> connection pool? I tried c3p0, and proxool.
Just configure Hibernate for that as if Tapestry-Hibernate wasn't involved.
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org