> Here is my config, which is in my classpath.
>
[quoted text clipped - 61 lines]
>> Can't really help you unless you provide your config files. I'm currently
>> running Hibernate with Oracle and have had no problems.
Just an update:
I can get it going now using a Driver_class property, but NOT with a
datasource property. I want to use my datasource set up though.
I have to say. the documentation for this stuff is very misleading and not
at all clear. Even reading 'professional Hibernate" is very weak on set up.
(Actually that whole book is a bit of a joke -there isn't an ounce of source
code in there that would comiple and th etypos and grammar is the worst I
have ever seen - and I have read a LOT of tech books!)
Anyway, I am starting to see a few places I may be going wrong - for example
having a driver_class AND a datasource property was likely not a clever
thing to do!
Getting closer....
> Sorry - heres my resource declareation in server.xml and the relavant
> web.xml
[quoted text clipped - 116 lines]
>>> Can't really help you unless you provide your config files. I'm
>>> currently running Hibernate with Oracle and have had no problems.
IINET - 23 Dec 2004 03:58 GMT
Talking to myself a bit now, I know:
I have managed to get Hibernate working, but only using the driver class
property. I want it to work with my tomcat defined JNDI datasource and I am
expecting something like the following to work:
hibernate.connection.datasource = java:comp/env/jdbc/webApps
hibernate.connection.username = fedup
hibernate.connection.password = *****
My JNDI is set up correctly, I can connect using other hibernate options
(non jndi), I have tried many configurations over the last 2 days, and I can
only afford to plod on one more day before switching over to toplink (with
our jdeveloper/oracle license) as I have had success withing ten minutes
with using this product.
> Just an update:
> I can get it going now using a Driver_class property, but NOT with a
[quoted text clipped - 131 lines]
>>>> Can't really help you unless you provide your config files. I'm
>>>> currently running Hibernate with Oracle and have had no problems.
[Please don't top-post]
> Sorry - heres my resource declareation in server.xml and the relavant
> web.xml
You commented in one of your posts on typos in a book. The words 'pot',
'kettle' and 'black' come to mind ;-)
> SERVER.XML
>
> <resource name="jdbc/webApps" auth="container" type="javax.sql.DataSource">
> <resourceParams>
These elements should be Resource and ResourceParams, respectively (note
the capitalisation, and apply the same to the closing elements). I don't
believe Tomcat is actually binding your DataSource into JNDI (although you
say somewhere that it is).
During startup, I get NameNotFoundException and HibernateException if I
use your spelling (with Tomcat 5.0.28 and Hibernate 2.1.7b).
I'm not saying that's the only error you've made (and you acknowledge
at least one other in later posts), but it's one I spotted having fallen
foul of it myself in the past.
FWIW, I prefer to leave server.xml alone when defining this sort of thing,
and create context-specific files for the relevant virtual host.
HTH.

Signature
Mark Scott
mark@codebrewer.com
GPG Key ID: 0x2CCE1173 - signed/encrypted mail preferred
IINET - 23 Dec 2004 11:44 GMT
re:
You commented in one of your posts on typos in a book. The words 'pot',
'kettle' and 'black' come to mind ;-)
Hey, when I put this post on sale at $75 a pop, I will ficks upp the
mincsteaks, okay.
re:
> believe Tomcat is actually binding your DataSource into JNDI (although you
> say somewhere that it is).
It is - has been for ages, no issues there whatsoever.
re:
> FWIW, I prefer to leave server.xml alone when defining this sort of thing,
> and create context-specific files for the relevant virtual host.
Actually, I did that too. I am using JBuilder with tomcat in embedded mode,
this is the only way you can do it.
Thanks for the feedback though - much appreciated.
> [Please don't top-post]
>
[quoted text clipped - 26 lines]
>
> HTH.