-
1. Re: Errors with datasources
ffang Mar 11, 2011 9:01 PM (in response to larasith)Hi,
JDBC driver class not found actually is a frequently asked question, please see the similar discussion[1] and , this problem generally from a bundle(let's say it bundle A) using some code like classForName(jdbc_driver_classname) to init a jdbc driver class, this is a big problem in OSGi world, as if BundleA not import package for jdbc_driver_classname, you'll see the problem. However BundleA actually can't know about package name for jdbc_driver_classname beforehand, as the jdbc_driver_classname generally is passed in through configuration during runtime, it can't be determined during build time, so you can't add correct package import when you generate bundle A.
The general solution for this issue is that you create JDBC driver as a fragment bundle, and attach it to bundle A(bundle A is host bundle now), so that all resource from fragment bundle is available for the host bundle.
http://fusesource.com/forums/thread.jspa?messageID=7745
http://fusesource.com/forums/thread.jspa?messageID=8620
Freeman