Does your bundle import the org.apache.derby.jdbc package? If not you 
won't be able to load the class since your bundle's class loader has no 
access to it.

PS. I have not used the derby bundle so I am not sure what the suggested 
way to use it is. Since you got it from Eclipse, you may want to ask on 
the appropriate Eclipse newsgroup about the recommended way to use it.
-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[EMAIL PROTECTED]

office: +1 386 848 1781
mobile: +1 386 848 3788




From:
Kevin Fonner <[EMAIL PROTECTED]>
To:
[email protected]
Date:
2007-10-10 13:04
Subject:
[osgi-dev] osgi and derby



Anybody get the derby bundle from orbit(http://www.eclipse.org/orbit/) 
working successfully?  I not sure how I should use the Derby bundle. 
I'm trying to establish an embedded connection....

public String driver = "org.apache.derby.jdbc.EmbeddedDriver";
Class.forName(driver).newInstance();

But it fails with....
java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver

You can't use "Class.forName" in an osgi bundle correct?

So how should I should I create an embedded connection to a database 
with the derby bundle?  I have read articles seeing people referring to 
it but never actually seen an example.

Thanks for your help,
Kevin

-- 
Kevin Fonner

[EMAIL PROTECTED]
http://kevin.fonner.net/

_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev


_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev

Reply via email to