tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <yucca...@live.co.za>
Subject Re: hibernate not finding global resource datasource defined by tomcat
Date Tue, 15 Jun 2010 05:23:24 GMT


--------------------------------------------------
From: "Christopher Schultz" <chris@christopherschultz.net>
Sent: Tuesday, June 15, 2010 12:03 AM
To: "Tomcat Users List" <users@tomcat.apache.org>
Subject: Re: hibernate not finding global resource datasource defined by 
tomcat

> -----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. :) No I was just trying 
> to hurry to get working copy up :)
>
>> 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?

Can you explain?
>
>> 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?

No I was merely referring to the fact that I included driver in the lib 
directory of server
>
> - -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
>
> 

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


Mime
View raw message