You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Warner Onstine <wa...@gmail.com> on 2005/11/01 01:13:11 UTC
testing issue
Hi all,
I'm using a recent version from HEAD and I've run into an issue. We
used to be able to run our tests with this kind of config:
<jdbc-connection-descriptor
jcd-alias="dataSource"
default-connection="true"
platform="Oracle9i"
jdbc-level="3.0"
batch-mode="false"
useAutoCommit="0"
ignoreAutoCommitExceptions="false">
<sequence-manager
className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl"
/>
</jdbc-connection-descriptor>
With this declared inside of our spring descriptor:
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>${kuali.jdbc.driverClassName}</value>
</property>
<property name="url">
<value>${kuali.jdbc.url}</value>
</property>
<property name="username">
<value>${kuali.jdbc.username}</value>
</property>
<property name="password">
<value>${kuali.jdbc.password}</value>
</property>
</bean>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: testing issue
Posted by Warner Onstine <wa...@gmail.com>.
Ok, looks like it's a problem between head and spring. After dropping
down to 1.0.4-rc1 (from the 1_0_release branch) things are working
again.
Thanks for the assist!
-warner
On 11/2/05, Thomas Dudziak <to...@gmail.com> wrote:
> On 11/1/05, Warner Onstine <wa...@gmail.com> wrote:
>
> > Sorry, (stupid gmail). The rest of my question when trying to connect
> > with a test I get this error message:
> > 2005-10-31 16:49:54,927 [main] ERROR
> > org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl ::
> > Instantiation of jdbc driver failed
> > java.lang.NullPointerException
>
> I think you get this exception because you're not using the correct
> connection factory (you seem to use ConnectionFactoryPooledImpl which
> is not Spring-aware, and this connection factory uses the jdbc driver
> directly).
>
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: testing issue
Posted by Thomas Dudziak <to...@gmail.com>.
On 11/1/05, Warner Onstine <wa...@gmail.com> wrote:
> Sorry, (stupid gmail). The rest of my question when trying to connect
> with a test I get this error message:
> 2005-10-31 16:49:54,927 [main] ERROR
> org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl ::
> Instantiation of jdbc driver failed
> java.lang.NullPointerException
I think you get this exception because you're not using the correct
connection factory (you seem to use ConnectionFactoryPooledImpl which
is not Spring-aware, and this connection factory uses the jdbc driver
directly).
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: testing issue
Posted by Warner Onstine <wa...@gmail.com>.
Sorry, (stupid gmail). The rest of my question when trying to connect
with a test I get this error message:
2005-10-31 16:49:54,927 [main] ERROR
org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl ::
Instantiation of jdbc driver failed
java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at org.apache.ojb.broker.util.ClassHelper.getClass(ClassHelper.java:149)
at org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.newConnectionFromDriverManager(ConnectionFactoryAbstractImpl.java:278)
at org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl$ConPoolFactory.makeObject(ConnectionFactoryPooledImpl.java:287)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)
at org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl.checkOutJdbcConnection(ConnectionFactoryPooledImpl.java:97)
at org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.lookupConnection(ConnectionFactoryAbstractImpl.java:153)
at org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.getConnection(ConnectionManagerImpl.java:108)
at org.springframework.orm.ojb.PersistenceBrokerTransactionManager.doBegin(PersistenceBrokerTransactionManager.java:198)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:289)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:202)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:49)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
However, earlier in the config Spring loads the driver just fine, so
there appears to be a disconnect between Spring an OJB (this works in
the earlier version of OJB - 1.0.4).
-warner
On 10/31/05, Warner Onstine <wa...@gmail.com> wrote:
> Hi all,
> I'm using a recent version from HEAD and I've run into an issue. We
> used to be able to run our tests with this kind of config:
> <jdbc-connection-descriptor
> jcd-alias="dataSource"
> default-connection="true"
> platform="Oracle9i"
> jdbc-level="3.0"
> batch-mode="false"
> useAutoCommit="0"
> ignoreAutoCommitExceptions="false">
> <sequence-manager
> className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl"
> />
> </jdbc-connection-descriptor>
>
> With this declared inside of our spring descriptor:
>
> <bean id="dataSource"
> class="org.springframework.jdbc.datasource.DriverManagerDataSource">
> <property name="driverClassName">
> <value>${kuali.jdbc.driverClassName}</value>
> </property>
> <property name="url">
> <value>${kuali.jdbc.url}</value>
> </property>
> <property name="username">
> <value>${kuali.jdbc.username}</value>
> </property>
> <property name="password">
> <value>${kuali.jdbc.password}</value>
> </property>
> </bean>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org