Can you send me your project as a zip file so I can try it out?...things
work here so I'd have to be able to duplicate to figure out what's causing
it.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jan Heise
Sent: Monday, January 24, 2005 1:00 AM
To: Jan Heise
Cc: [email protected]
Subject: [Andromda-user] Spring w/o EJB: Exception: No SessionFactory
specified

Any suggestions on this one, if it's a bug or if I'm missing something  
with the config?

thx,

Jan

Am 23.01.2005 um 12:24 schrieb Jan Heise:

> but now I have the following problem:
>
> [12:14:02.213] java.lang.IllegalArgumentException: No SessionFactory  
> specified
> [12:14:02.213]  at  
> org.springframework.util.Assert.notNull(Assert.java:90)
> [12:14:02.213]  at  
> org.springframework.orm.hibernate.SessionFactoryUtils.getSession(Sessio 
> nFactoryUtils.java:273)
> [12:14:02.213]  at  
> org.springframework.orm.hibernate.SessionFactoryUtils.getSession(Sessio 
> nFactoryUtils.java:183)
> [12:14:02.213]  at  
> org.andromda.samples.springanimalquiz.decisiontree.DecisionItemDaoBase. 
> findRoot(DecisionItemDaoBase.java:187)
> [12:14:02.213]  at  
> org.andromda.samples.springanimalquiz.decisiontree.DecisionItemDaoBase. 
> findRoot(DecisionItemDaoBase.java:178)
> [12:14:02.213]  at  
> org.andromda.samples.springanimalquiz.decisiontree.DecisionItemDaoBase. 
> findRoot(DecisionItemDaoBase.java:160)
> [12:14:02.213]  at  
> org.andromda.samples.springanimalquiz.decisiontree.DecisionServiceImpl. 
> handleGetFirstQuestion(DecisionServiceImpl.java:33)
> [12:14:02.213]  at  
> org.andromda.samples.springanimalquiz.decisiontree.DecisionServiceBase. 
> getFirstQuestion(DecisionServiceBase.java:106)
>
> AFAI can see, applicationContext.xml looks good to me and references a  
> SessionFactory:
>
>     <!-- Hibernate SessionFactory -->
>     <bean id="sessionFactory"  
> class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
>         <property name="dataSource"><ref  
> local="dataSource"/></property>
>         <property name="mappingResources">
>             <list>
>                  
> <value>org/andromda/samples/springanimalquiz/decisiontree/ 
> DecisionItem.hbm.xml</value>
>             </list>
>         </property>
>         <property name="hibernateProperties">
>             <props>
>                 <prop key="hibernate.show_sql">true</prop>
>                 <prop  
> key="hibernate.dialect">net.sf.hibernate.dialect.PostgreSQLDialect</ 
> prop>
>                 <prop  
> key="hibernate.cache.use_query_cache">false</prop>
>                 <prop  
> key="hibernate.cache.provider_class">net.sf.hibernate.cache.EhCacheProv 
> ider</prop>
>                 <prop  
> key="hibernate.cache.query_cache_factory">net.sf.hibernate.cache.Standa 
> rdQueryCacheFactory</prop>
>             </props>
>         </property>
>     </bean>
>
>     <!-- The Hibernate interceptor -->
>     <bean id="hibernateInterceptor"  
> class="org.springframework.orm.hibernate.HibernateInterceptor">
>         <property name="sessionFactory"><ref  
> bean="sessionFactory"/></property>
>     </bean>
>
>     <!-- Transaction Manager -->
>     <bean id="transactionManager"  
> class="org.springframework.orm.hibernate.HibernateTransactionManager">
>         <property name="sessionFactory"><ref  
> local="sessionFactory"/></property>
>     </bean>
>
> This is my implementation for getFirstQuestion from  
> DecisionServiceImpl:
>
>     protected  
> org.andromda.samples.springanimalquiz.decisiontree.DecisionItem  
> handleGetFirstQuestion()
>         throws java.lang.Exception
>     {
>         try {
>               DecisionItemDaoBase d = new DecisionItemDaoImpl();
>               
>             java.util.Collection dItems = d.findRoot();
>             DecisionItem dItem;
>             if (dItems.isEmpty()) {
>               dItem = new AnimalDaoImpl().create( "elephant", true );
>             }
>             else {
>                 dItem = (DecisionItem) dItems.iterator().next();
>             }
>             return dItem;
>         }
>         catch (DecisionException e) {
>             throw new Exception(e);
>         }
>     }
>
> perhaps I'm missing something else regarding the initalization of some  
> stuff?
>
> Jan
>
>



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Andromda-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Andromda-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to