Atomikos Forum |
|
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" /> </bean> 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.
Hi,
my db config works fine under OSGi using embedded DerbyDB. You can checkout my code here : http://dynaresume.googlecode.com/svn/trunk and mostly have a look on what is done here : http://code.google.com/p/dynaresume/source/browse/#svn/trunk/infrastructure/org.dynaresume.infrastructure.db and here : http://code.google.com/p/dynaresume/source/browse/#svn/trunk/infrastructure/org.dynaresume.infrastructure.db.derby Unfortunatly, I never tried to configure a AtomikosNonXADataSourceBean (for the time being).
Hi,
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" /> </bean> 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". |