tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: hibernate not finding global resource datasource defined by tomcat
Date Mon, 14 Jun 2010 22:03:19 GMT
Hash: SHA1

Yuccal Nel,

On 6/14/2010 4:26 PM, wrote:
> Please advise as to why hibernate us unable to find jndi datasource
> configured in tomcat?

I'm not sure why Hibernate can't find your JNDI resource, but...

>     <property
> name="connection.url">jdbc:mysql://localhost:3306/yucca123_thejarbar</property>
>     <property
> name="connection.driver_class">com.mysql.jdbc.Driver</property>
>     <property name="connection.username">yucca123_tom</property>
>       <property name="current_session_context_class">thread</property>
>     <property name="connection.password">pookie123</property>

Why do you need these properties in your hibernate configuration? The
DataSource already knows all these things and you're just confusing
Hibernate (and yourself) by having them in here.

> 2) moving resource and realm element to context.xml with adding
> localdatasource attribute to  resource (true) and get same exception?

IIRC, localDataSource is a <Realm> option, and has nothing to do with
the <Resource> or any Hibernate configuration.

> What am I missing here?

Maybe you need a <resource-ref> element in your web.xml?

> tomcat is latest 6.0.26
> mysql 5 with global connector (inside common/lib)

Tomcat 6 doesn't have a common/lib by default. Did you add that?

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message