Hi all, I configured a datasource under tomcat 5 and it works fine (i can save my object to the db with the connection got from the datasource object), but I'm having problems telling hibernate to use it...
Here's my hibernate.properties:
hibernate.connection.datasource=java:comp/env/jdbc/myoracle hibernate.transaction.factory_class=net.sf.hibernate.transaction.JTATransactionFactory hibernate.transaction.manager_lookup_class=net.sf.hibernate.transaction.JNDITransactionManagerLookup hibernate.dialect=net.sf.hibernate.dialect.OracleDialect hibernate.show_sql=true
...and here's my stack trace:
java.lang.UnsupportedOperationException: The user must supply a JDBC connection at net.sf.hibernate.connection.UserSuppliedConnectionProvider.getConnection(UserSuppliedConnectionProvider.java:32) at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:289) at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3361) at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3321) at net.sf.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:40) at net.sf.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:19) at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2251) at quickstart.CatCreator.doGet(CatCreator.java:55) ...
maybe it's obvious for some of you...
thanks a lot.
|