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
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
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"
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
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
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
>
> ----------
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.
-
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
://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