Atomikos Forum

Oracle driver not found in OSGi

I was excited by the recent announcement of OSGi compatibility, so I just downloaded TransactionEssentials 3.6.2 and have been trying to use it in Spring DM server 2.0.  However, when I use the Atomikos datasource class, I get a complain that no suitable jdbc driver (oracle.jdbc.driver.OracleDriver) can be found.  I have tried including the jdbc driver jar inside my bundle (rather than as a separate bundle), including the atomikos jars in the same bundle as well, and even putting the oracle driver on the container classpath.  But I get the same error regardless.  I'm using Spring, with a datasource configuration that looks like this:

    <bean id="dictionaryDS" class="com.atomikos.jdbc.nonxa.AtomikosNonXADataSourceBean">
        <property name="uniqueResourceName" value="dictionaryNonXADS5" />
        <property name="user" value="test"/>
        <property name="password" value="test"/>
        <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
        <property name="url" value="jdbc:oracle:thin:@localhost:1521:XE" />
        <property name="poolSize" value="1" />
        <property name="borrowConnectionTimeout" value="60" />

Any ideas what I'm doing wrong?  I was able to use the datasource just fine before (without transactions) when using an apache datasource class.
Michael Van Orman Send private email
Wednesday, March 03, 2010
Hard to say right now - I have created an issue to look at this soon.

Thanks for the feedback!
Guy Pardon Send private email
Thursday, March 04, 2010

my db config works fine under OSGi using embedded DerbyDB.

You can checkout my code here :

and mostly have a look on what is done here :

and here :

Unfortunatly, I never tried to configure a AtomikosNonXADataSourceBean (for the time being).
Pascal Leclercq Send private email
Sunday, March 07, 2010

I just test with
 <bean id="dynaresumeDataSource" class="com.atomikos.jdbc.nonxa.AtomikosNonXADataSourceBean">
        <property name="uniqueResourceName" value="dynaDS2" />
        <property name="driverClassName" value="org.apache.derby.jdbc.EmbeddedDriver" />
        <property name="url" value="${user.home}/dynaresume" />
        <property name="poolSize" value="1" />
        <property name="borrowConnectionTimeout" value="60" />
 and I get a 2610 [SpringOsgiExtenderThread-12] WARN  org.hibernate.cfg.SettingsFactory  - Could not obtain connection metadata
com.atomikos.jdbc.AtomikosSQLException: Driver class not found: 'org.apache.derby.jdbc.EmbeddedDriver' - please make sure the spelling is correct.

Which seems to be caused by a ClassLoading/OSGi issues inside the "ClassLoadingHelper".
Pascal Leclercq Send private email
Sunday, March 07, 2010

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics