getting NoClassDefFound on CommonDataSource...

40 views
Skip to first unread message

Elhanan

unread,
Aug 17, 2010, 11:21:32 AM8/17/10
to jdbcdslog-discuss
hi..

my spring configuration is this:

<bean id="transactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager"
p:transactionManager-ref="bitronixTransactionManager"
p:userTransaction-ref="bitronixTransactionManager" />

<bean id="pmpPoolDs_underwrite" p:targetDS-
ref="pmpPoolDs_underwrite_org"
class="org.jdbcdslog.ConnectionPoolXADataSourceProxy"/>

<bean id="pmpPoolDs_underwrite_org"
class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
destroy-method="close"
p:allowLocalTransactions="true"
p:className="oracle.jdbc.xa.client.OracleXADataSource"
p:uniqueName="myOracleDataSource" p:maxPoolSize="5" >
<property name="driverProperties">
<props>
<prop key="URL">jdbc:jdbcdslog:oracle:thin:@drp_db:
1531:PHNXQA;targetDS=bitronix.tm.resource.jdbc.PoolingDataSource</
prop>

<prop key="user">${hibernate.connection.username}</
prop>
<prop key="password">${hibernate.connection.password}
</prop>
</props>
</property>
</bean>

org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'pmpPoolDs_underwrite' defined in class path
resource [tr-ctx.xml]: Instantiation of bean failed; nested exception
is java.lang.NoClassDefFoundError: javax/sql/CommonDataSource
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:
883)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:
839)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:
440)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:
380)
at org.springframework.beans.factory.support.AbstractBeanFactory
$1.getObject(AbstractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:
221)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:
261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
164)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:
254)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
164)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:
429)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:
729)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:
381)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:
139)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:
93)
at com.pnx.underwrite.bo.utils.FakeEnvForBo.<init>(FakeEnvForBo.java:
95)
at
com.pnx.underwrite.command.underwritemodel.tests.TestDBUnit.setUp(TestDBUnit.java:
26)
at junit.framework.TestCase.runBare(TestCase.java:128)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:
130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:
38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:
390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:
197)
Caused by: java.lang.NoClassDefFoundError: javax/sql/CommonDataSource
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.getDeclaredConstructor(Class.java:1953)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:
54)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:
877)
... 33 more

Andriy Kolyadenko

unread,
Aug 17, 2010, 11:27:41 AM8/17/10
to jdbcdslo...@googlegroups.com
Hi Elhanan,

I think it's happened because you are using jdbcdslog jar for Java 6 but
your environment works on Java # < 6(i.e. java 5). Please try to use
jdbcdslog-1.0.5-jdk14.jar.

On Tue, 17 Aug 2010 08:21:32 -0700 (PDT), Elhanan <elh.m...@gmail.com>
wrote:

Reply all
Reply to author
Forward
0 new messages