It is always good that post your code snippet and exception that system throws.
here is what i can suggest based on your post.
In tomcat, we create datasource in server.xml and also we can use context.xml inside meta-inf folder to define a datasource.
Then we create a reference to that datasource in our web.xml and use it in our web based application.
When we use hibernate, usually we create a describe session factory configuration inside hibernate.cfg.xml or whatever its name is.
in the session factory configuration we can use a datasource as connection provider for the session factory. in this case we use full JNDI name of datasource in a property named connection.datasource .
Now, by what you are doing and what i explained you may explain your problem better.
Do you have JDBC driver of your database in shared lib folder of tomcat or in the classpath?
Do you have problem with defining session factory?
Do you have problem to define a datasource in your Tomcat (do you tried tomcat administration?)
Do you have the datasource and you have problem to accessing it?