db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul French" <paul.fre...@kirona.com>
Subject RE: IBM J9 Personal Profile 1.1 + OSGi + Derby
Date Thu, 02 Oct 2008 08:22:26 GMT
Thanks Dan,

I had a look at the source code last night and noticed the EmbeddedActivator
instantiates a EmbeddedDataSource which by default uses java.sql.Driver.

I will probably write my own Activator instead. The problem now is the
DriverManager provides static methods to return connections where as we need
to deal with an instance of a javax.sql.DataSource to get connections. The
current Activator instantiates an EmbeddedDataSource and does not need to
retain a reference to it since connections are obtained via the static
DriverManager.getConnection method.

Ideally current EmbeddedActivator needs to do both. I suppose it can check
for the existence of the java.sql.Driver class whether to use a
EmbeddedDataSource or EmbeddedSimpleDataSource. But since the
java.sql.DriverManager and javax.sql.DataSource provided connections in a
different way I'm not sure how to accommodate both?

Any ideas?


-----Original Message-----
From: Daniel John Debrunner [mailto:djd@apache.org] 
Sent: 02 October 2008 01:00
To: Derby Discussion
Subject: Re: IBM J9 Personal Profile 1.1 + OSGi + Derby

Paul French wrote:
> Hello All,
> I noticed I derby.jar is an OSGi bundle and so I installed it in my 
> OSGi container (Knopflerfish 2.0.5) running on IBM J9 PP1.1
> I included the required jdbc.jar (JSR169) in the bootpath of the J9 jvm. 
> I can install the bundle no problems. When I try and start the bundle I
> java.lang.NoClassDefFoundError: java.sql.Driver
>  From reading this page on the wiki
> http://wiki.apache.org/db-derby/JavaMESupport?highlight=(j2me)
> I know java.sql.Driver does not exist in JSR169.
> Hence how do I tell the derby bundle not to use java.sql.Driver and 
> use instead javax.sql.DataSource

This is an outstanding bug, DERBY-873:



__________ NOD32 3488 (20081002) Information __________

This message was checked by NOD32 antivirus system.

View raw message