Re: config database in Tomcat

2009-11-24 Thread Jens Greven
As this is a part of the hibernate configuration rather than the database / datasource configuration the SQL dialect has to be configured in the hibernate configuration file, not in the context. Here's my SessionFactory class just in case: (I think this could be realized in a better way using

Re: config database in Tomcat

2009-11-24 Thread dishmily
gt; exception: >>>> java.lang.NullPointerException >>>>at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507) >>>>at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476) >>>>at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(Jdbc

Re: config database in Tomcat

2009-11-24 Thread Jens Greven
You can also use c3p0 with Tomcat JNDI, e. g. description="DB Connection" jdbcUrl="jdbc:mysql://server:3306/mysql?autoReconnect=true" driverClass="com.mysql.jdbc.Driver" user="root" password="password"

Re: config database in Tomcat

2009-11-24 Thread dishmily
un(BasicResourcePool.java:1810) >> at >> com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547) >> >> >> >> >> Pid Ster wrote: >>> >>> On 23/11/2009 13:00, dishmily wrote: >>>> &g

Re: config database in Tomcat

2009-11-23 Thread Pid
On 23/11/2009 16:03, dishmily wrote: i have made few changes, but it didn't work. (my project uses tomcat and hibernate.) You didn't mention that before. You need to configure Hibernate to use the DataSource "jdbc/mysql" that you've created. It doesn't appear to be correctly configured at t

Re: config database in Tomcat

2009-11-23 Thread dishmily
g that you're using Tomcat 6.0, because you didn't say. > The extensive documentation is often a good place to start: > > http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html > > > p > > ----------

Re: config database in Tomcat

2009-11-23 Thread dishmily
tional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/config-database-in-Tomcat-tp26477627p26478248.html Sent from the Tomcat - User mailing list archive at Nabble.com. -

Re: config database in Tomcat

2009-11-23 Thread Pid
On 23/11/2009 13:00, dishmily wrote: i use 3 tomcats in one PC, in each tomcat i have a webservice, for each webservice i use a mysql database. my question is: how can i write a config file in each tomcat to let tomcat1 load DB1, tomcat2 load DB2 and tomcat3 load DB3. thanks. I'm guessing

config database in Tomcat

2009-11-23 Thread dishmily
://old.nabble.com/config-database-in-Tomcat-tp26477627p26477627.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h