I was getting this exception with the latest RC1-SNAPSHOT (since a couple of 
days), I wasn't having this before



bear in mind, I only scratched Spring's surface .. I'm far from knowledgeable 
about the subject



java.lang.IllegalArgumentException: sessionFactory is required

        at 
org.springframework.orm.hibernate3.HibernateTransactionManager.afterPropertiesSet(HibernateTransactionManager.java:331)

        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:962)

        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:354)

        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:223)

        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)

        at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176)

        at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)

        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:916)

        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:727)

        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:336)

        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:223)

        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)

        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277)

        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:312)

        at 
org.springframework.context.support.ClassPathXmlApplicationContext.<init>&#40;ClassPathXmlApplicationContext.java&#58;80&#41;

&nbsp; &nbsp; &nbsp; &nbsp; at 
org.springframework.context.support.ClassPathXmlApplicationContext.<init>&#40;ClassPathXmlApplicationContext.java&#58;65&#41;

&nbsp; &nbsp; &nbsp; &nbsp; at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0&#40;Native Method&#41;

&nbsp; &nbsp; &nbsp; &nbsp; at 
sun.reflect.NativeConstructorAccessorImpl.newInstance&#40;NativeConstructorAccessorImpl.java&#58;39&#41;

&nbsp; &nbsp; &nbsp; &nbsp; at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance&#40;DelegatingConstructorAccessorImpl.java&#58;27&#41;

&nbsp; &nbsp; &nbsp; &nbsp; at 
java.lang.reflect.Constructor.newInstance&#40;Constructor.java&#58;274&#41;



it seemed to be coming from the transaction manager, which I found in 
applicationContext-dataSource.xml, this is what it looks like:



&nbsp; &nbsp; <bean id="transactionManager" 
class="org.springframework.orm.hibernate3.HibernateTransactionManager">

&nbsp; &nbsp; </bean>





now, when I configure the sessionFactory property everything seems to work well:





&nbsp; &nbsp; <bean id="transactionManager" 
class="org.springframework.orm.hibernate3.HibernateTransactionManager">

&nbsp; &nbsp; &nbsp; &nbsp; <property name="sessionFactory"><ref 
bean="sessionFactory"/></property>

&nbsp; &nbsp; </bean>





is this the correct thing to do ? is it a bug in Spring ? why isn't anyone else 
posting about this issue (why only me) ?
--
Wouter Zoons - [EMAIL PROTECTED]

http://www.andromda.org/
_________________________________________________________
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2493#2493
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to