View Full Version : Openaccess 4.0.0 and Spring 1.2
springtesteur
Nov 23rd, 2005, 08:32 AM
Hi all,
basically, I try to use OpenAccess 4.0.0 with Spring 1.2. and I did not succed in it.
I have the following exception when Spring use applicationContext file:
Hit uncaught exception org.springframework.beans.factory.BeanCreationExce ption
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is com.versant.core.common.NotImplementedException:
com.versant.core.common.NotImplementedException:
at com.versant.core.common.BindingSupportImpl.notImpl emented(VOA 4.0.0 -------------:394)
If some have any experience in that field or idea or can redirect me to documentation this will help me a lot.
Thanks in advance,
SpringTesteur.
Costin Leau
Nov 23rd, 2005, 10:58 AM
I'm just guessing here: The exception comes from com.versant package - whatever this package does. As you are using it along with the TM I assume it might be because transaction are not supported by these package (by the name of the exception).
springtesteur
Nov 24th, 2005, 01:12 AM
Hi,
Basically I use the following bean persistence manager factory definition:
<bean id="persistenceManagerFactory"
class="org.springframework.orm.jdo.LocalPersistenceManage rFactoryBean">
<property name="jdoProperties">
<props>
<prop key="javax.jdo.PersistenceManagerFactoryClass">com.versant.core.jdo.PersistenceManagerFactoryImp</prop>
<prop key="javax.jdo.option.NontransactionalRead">${i}</prop>
<prop key="javax.jdo.option.ConnectionDriverName">${h}</prop>
<prop key="javax.jdo.option.ConnectionUserName">${g}</prop>
<prop key="javax.jdo.option.ConnectionURL">${f}</prop>
<prop key="versant.initSql">${e}</prop>
<prop key="versant.validateSql">${d}</prop>
<prop key="versant.psCacheMax">${c}</prop>
<prop key="versant.remoteAccess">${b}</prop>
<prop key="versant.metadata.0">${a}</prop>
</props>
</property>
</bean>
I'am not sure if javax.jdo.PersistenceManagerFactoryClass value is correct or not ?
Thanks for your Help,
Springtesteur.
PhilAtSpring
Feb 26th, 2009, 09:42 AM
Hi,
I, basically, have the same problem as I am trying to integrate spring in an existing JDO project, which is using the JDO-implementation from Openaccess/Versant.
This is my configuration for the transaction manager:
<bean id="pmf"
class="org.springframework.orm.jdo.LocalPersistenceManage rFactoryBean">
<property name="configLocation">
<value>classpath:versant.properties</value>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.jdo.JdoTransactionManager">
<property name="persistenceManagerFactory">
<ref local="pmf" />
</property>
</bean>
and here is the content of file versant.properties
javax.jdo.PersistenceManagerFactoryClass=com.versa nt.core.jdo.BootstrapPMF
javax.jdo.option.ConnectionDriverName=oracle.jdbc. driver.OracleDriver
javax.jdo.option.NontransactionalRead=true
javax.jdo.option.ConnectionUserName=myusername
javax.jdo.option.ConnectionPassword=mypassword
javax.jdo.option.ConnectionURL=jdbc\:oracle\:thin\ :@10.1.1.1\:1521\:mydb
versant.maxActive=5
versant.maxIdle=3
versant.initSql=
versant.validateSql=
versant.retryCount=10
versant.psCacheMax=
versant.server=myserver
versant.remotePMs=false
versant.hyperdrive=false
versant.l2QueryCacheMaxQueries=10000
versant.metadata.0=myproject.jdo
versant.l2CacheEnabled=false
versant.l2QueryCacheEnabled=false
remote.access=false
javax.jdo.option.Multithreaded=true
Currently I am stuck with this exception:
2009-02-26 16:08:58.471::WARN: Nested in org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'pmf' defined in class path resource [data-source-context.xml]: Invocation of init method failed; nested exception is com.versant.core.common.NotImplementedException: :
com.versant.core.common.NotImplementedException:
at com.versant.core.common.BindingSupportImpl.notImpl emented(VOA 4.0.2 -------------:394)
at com.versant.core.jdo.PersistenceManagerFactoryBase .notImplemented(Versant Open Access 4.0.2 --------:971)
at com.versant.core.jdo.PersistenceManagerFactoryBase .getConnectionFactory(Versant Open Access 4.0.2 --------:400)
at org.springframework.orm.jdo.LocalPersistenceManage rFactoryBean.afterPropertiesSet(LocalPersistenceMa nagerFactoryBean.java:239)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1368)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1334)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
...
I am wondering if it is possible to configure Spring in a way that it won't accesses the unimplemented methods. I appreciate any suggestions.
Thanks, Phil
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.