tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John D. Ament" <my.repr...@gmail.com>
Subject RE: Not supported by BasicDataSource
Date Sat, 10 Oct 2009 00:47:21 GMT
It's actually the hbm2ddl tool that's doing this.  Is it possible to use
hibernate's c3po inside of openejb?

-----Original Message-----
From: David Blevins [mailto:david.blevins@visi.com] 
Sent: Friday, October 09, 2009 8:39 PM
To: users@openejb.apache.org
Subject: Re: Not supported by BasicDataSource


On Oct 9, 2009, at 2:24 AM, Joshua Daniel wrote:

> Hi,
>
> I am trying to unit test a simple JBoss Seam component exposed as a
> stateless session bean. I get this error on object lookup. Not sure  
> what
> additional configuration is needed to get this running (Note: I have  
> tried
> this with openejb-core 3.1.1 as well as with 3.1.2-SNAPSHOT with the  
> same
> error output).
> Any pointers to resolve this issue is deeply appreciated.
>
>
> Caused by: org.apache.openejb.OpenEJBException:  
> java.lang.UnsupportedOperat
> ionException: Not supported by BasicDataSource: Not supported by  
> BasicDataS
> ource
>        at  
> org.apache.openejb.assembler.classic.Assembler.createApplication
> (Assembler.java:487)
>        ... 37 more
> Caused by: java.lang.UnsupportedOperationException: Not supported by  
> BasicD
> ataSource
>        at  
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataS
> ource.java:902)

Seems like the Seam code is calling the 'getConnection(String  
username, String password)' method on the DataSource, which isn't  
supported as the DataSource isn't a real datasource but a reference to  
a database connection pool.  I.e. calling getConnection doesn't create  
any connections, it just gets you a handle to a connection from the  
pool or a reference the connection that's already being used in the  
transaction (if one exists).  The username and password are configured  
with the pool itself.

Do you know if it's possible to get Seam to use the regular  
DataSource.getConnection() method?

-David


No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.421 / Virus Database: 270.14.9/2426 - Release Date: 10/09/09
18:43:00


Mime
View raw message