Ok, here are the relevant configuration files. By the way.. is there anyone who use MySQL + Tapernate + c3p0? Maybe it couldbe MySQL specific?
On 5/2/06, Andreas Bulling <[EMAIL PROTECTED]> wrote:
Hi Ted, to be honest I don't think that this has something to do with Tapernate because I'm using Tapernate quite happily with Hibernate and c3p0 without any problems. Can you post your configuration as something rather seems to be wrong there IMHO.. Cheers, Andreas On 02. Mai 2006 - 01:38:10, Ted Steen wrote: | I'm trying to switch to c3p0:s connection pooling, but when I do that I get | this error | http://rafb.net/paste/results/W4tsCJ17.html | | I'm not doing anything fancy here, I just set c3p0.max_size=100 | | When I switch back to Hibernates native connection provider it works.. | Is there anything I should set in order to get c3p0 to work? | | I couldn't find anything on this subject on google, so I'm suspecting | that it is a tapernate specific problem --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- /ted
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <!-- configuration pool via c3p0--> <property name="c3p0.acquire_increment">1</property> <property name="c3p0.idle_test_period">100</property> <!-- seconds --> <property name="c3p0.max_size">100</property> <!-- det är denna som avgör om hibernate ska använda c3p0 eller inte --> <property name="c3p0.max_statements">0</property> <property name="c3p0.min_size">10</property> <property name="c3p0.timeout">100</property> <!-- seconds --> <mapping package="net.keso.ted.tapestrySandbox.entity" /> <mapping class="net.keso.ted.tapestrySandbox.entity.user.Address" /> <mapping class="net.keso.ted.tapestrySandbox.entity.user.Customer" /> <mapping class="net.keso.ted.tapestrySandbox.entity.user.Comment" /> <mapping class="net.keso.ted.tapestrySandbox.entity.user.CustomerAddress" /> <mapping class="net.keso.ted.tapestrySandbox.entity.user.Employee" /> <mapping class="net.keso.ted.tapestrySandbox.entity.user.ShoppingCart" /> <mapping class="net.keso.ted.tapestrySandbox.entity.user.ShoppingCartItem" /> <mapping class="net.keso.ted.tapestrySandbox.entity.user.User" /> <mapping class="net.keso.ted.tapestrySandbox.entity.user.WishList" /> </session-factory> </hibernate-configuration>
<?xml version="1.0"?> <module id="tapestrySandbox" version="1.0.0" package="net.keso.ted.tapestrySandbox.services"> <!-- Tells "tapernate" what the root entity class is. This way it knows how to tell Tapestry what types of objects it can "squeeze." --> <contribution configuration-id="tapernate.DataClasses"> <data-class>net.keso.ted.tapestrySandbox.entity.IPersistent</data-class> </contribution> <sub-module descriptor="hivemodule.tx.xml" /> <sub-module descriptor="hivemodule.dao.xml" /> <!-- sub-module descriptor="hivemodule.data.xml" / --> <contribution configuration-id="tapestry.url.ServiceEncoders"> <page-service-encoder id="page" extension="html" service="page"/> <page-service-encoder id="external" extension="ext" service="external"/> <direct-service-encoder id="direct" stateless-extension="direct" stateful-extension="sdirect"/> <asset-encoder id="asset" path="/assets"/> <!-- extension-encoder id="extension" extension="svc" after="*"/ --> </contribution> </module>
<?xml version="1.0"?> <module id="tapestrySandbox.tx" version="1.0.0" package="net.keso.ted.tapestrySandbox.tx"> <!-- Hibernate configuration information. --> <contribution configuration-id="spring.hibernate3.Configuration"> <configuration-file>hibernate.cfg.xml</configuration-file> <property name="hibernate.connection.url" value="jdbc:mysql:///tapestrySandbox" /> <property name="hibernate.cglib.use_reflection_optimizer" value="true" /> <property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.JDBCTransactionFactory" /> <property name="hibernate.connection.username" value="****" /> <property name="hibernate.connection.password" value="****" /> <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" /> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" /> <property name="hibernate.show_sql" value="true" /> <property name="hibernate.format_sql" value="true" /> <property name="hibernate.query.substitutions" value="true 1, false 0, yes 'Y', no 'N'" /> <property name="hibernate.hbm2ddl.auto" value="update" /> </contribution> </module>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]