Orginally we are using JTA but I think I got an exception trying to use that too... Will re-try that
On Fri, Mar 19, 2010 at 7:19 PM, Jean-Louis MONTEIRO < [email protected]> wrote: > > Hi, > > Duno if it's related or not, but within a container (OpenEJB) you should > use > JTA instead of RESOURCE_LOCAL. > > Jean-Louis > > > Murat Can ALPAY wrote: > > > > hello, I am an trying to use openejb for integration tests and I think I > > have run into similar issue like the one here : > > > > http://n4.nabble.com/Not-supported-by-BasicDataSource-tc982313.html#none > > > > My persistence.xml looks like the following : > > > > <persistence-unit name="icratest" transaction-type="RESOURCE_LOCAL"> > > > > > > > <provider>tr.com.innova.hukuk.ortak.base.persistence.HukukPersistence</provider> > > <mapping-file>typedefs.hbm.xml</mapping-file> > > <properties> > > <property name="hibernate.hbm2ddl.auto" value="none"/> > > <property name="hibernate.dialect" > > value="org.hibernate.dialect.Oracle10gDialect"/> > > <property name="hibernate.connection.driver_class" > > value="oracle.jdbc.OracleDriver"/> > > <property name="hibernate.connection.username" value="hope"/> > > <property name="hibernate.connection.password" value="hope"/> > > <property name="hibernate.connection.url" value=... > > </properties> > > </persistence-unit> > > > > While trying to run my tests I ended up getting the following stacktrace > : > > > > Caused by: java.lang.UnsupportedOperationException: Not supported by > > BasicDataSource > > at > > > org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:902) > > at > > > org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:43) > > at > > > org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) > > at > > > org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) > > at > > > org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161) > > at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573) > > > > I thought about using hsqldb for my tests but that doesn't seem to be > > promising because of the way we map doubles : > > > > @Column(name = "DBL", columnDefinition="number" ) > > private Double dbl; > > > > which makes hsqldb unhappy. > > > > Any pointers ? > > > > Cheers, > > > > -- > > Murat Can ALPAY > > http://mcatr.blogspot.com > > > > > > -- > View this message in context: > http://n4.nabble.com/Not-supported-by-BasicDataSource-tp1599614p1599704.html > Sent from the OpenEJB User mailing list archive at Nabble.com. > -- Murat Can ALPAY http://mcatr.blogspot.com
