tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: hibernate not finding global resource datasource defined by tomcat
Date Mon, 14 Jun 2010 22:03:19 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yuccal Nel,

On 6/14/2010 4:26 PM, yuccanel@live.co.za 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwWpyYACgkQ9CaO5/Lv0PDoKwCgoVpt0TcF0EPX8yMhNH2JHivf
ce8AoK6T283631l+J1hWmxUpFpIyMC8y
=CZ3Y
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message