<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=simpor" rel="nofollow">Simon Rydberg</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2925?redirect=false" rel="nofollow">SPR-2925</a></strong> and commented</p>
<p dir="auto">Using this Sessionfactory:</p>
<p dir="auto">&lt;!-- Hibernate SessionFactory --&gt;<br>
&lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;<br>
&lt;property name="dataSource" ref="dataSource"/&gt;<br>
&lt;property name="mappingResources"&gt;<br>
&lt;value&gt;library.hbm.xml&lt;/value&gt;<br>
&lt;/property&gt;<br>
&lt;property name="hibernateProperties"&gt;<br>
&lt;props&gt;<br>
&lt;prop key="hibernate.dialect"&gt;${hibernate.dialect}&lt;/prop&gt;<br>
&lt;!--				&lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;--&gt;<br>
&lt;!--				&lt;prop key="hibernate.generate_statistics"&gt;true&lt;/prop&gt;--&gt;<br>
&lt;prop key="hibernate.query.substitutions"&gt;true 1, false 0, yes 'Y', no 'N'&lt;/prop&gt;<br>
&lt;prop key="hibernate.cache.use_second_level_cache"&gt;false&lt;/prop&gt;<br>
&lt;prop key="hibernate.cache.use_query_cache"&gt;false&lt;/prop&gt;<br>
&lt;/props&gt;<br>
&lt;/property&gt;<br>
&lt;property name="eventListeners"&gt;<br>
&lt;map&gt;<br>
&lt;entry key="merge"&gt;<br>
&lt;bean class="org.springframework.orm.hibernate3.support.IdTransferringMergeEventListener"/&gt;<br>
&lt;/entry&gt;<br>
&lt;/map&gt;<br>
&lt;/property&gt;<br>
&lt;property name="schemaUpdate"&gt;<br>
&lt;value&gt;true&lt;/value&gt;<br>
&lt;/property&gt;<br>
&lt;/bean&gt;<br>
and setting the property schemaUpdate=true, causes the error message below. This worked perfectly in Spring 1.2.8 but after the upgrade I can't set the property to true. It's no problem when schemaUpdate=false.<br>
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [/home/simonrydberg/projects/trains/web/WEB-INF/applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: SessionFactory not initialized yet<br>
Caused by: java.lang.IllegalStateException: SessionFactory not initialized yet<br>
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.getSessionFactory(AbstractSessionFactoryBean.java:175)<br>
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.updateDatabaseSchema(LocalSessionFactoryBean.java:918)<br>
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:762)<br>
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:131)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)<br>
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)<br>
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)<br>
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)<br>
at org.springframework.context.support.FileSystemXmlApplicationContext.&lt;init&gt;(FileSystemXmlApplicationContext.java:89)<br>
at org.springframework.context.support.FileSystemXmlApplicationContext.&lt;init&gt;(FileSystemXmlApplicationContext.java:74)<br>
at se.transrail.trains.domain.railway.RailwayImport2.createDatabaseFromFile(RailwayImport2.java:44)<br>
at se.transrail.trains.domain.railway.RailwayImport2.main(RailwayImport2.java:36)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:585)<br>
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0.1</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398071453" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7358" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7358/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7358">#7358</a> LocalSessionFactoryBean initialization fails with  "java.lang.IllegalStateException: SessionFactory not initialized yet " when schemaUpdate is set to true (<em><strong>"duplicates"</strong></em>)</li>
</ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=kdonald" rel="nofollow">Keith Donald</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2569?redirect=false" rel="nofollow">SPR-2569</a></strong> and commented</p>
<p dir="auto">This particularly complicates life for Web Flow users who like the convenience of putting BindException in flow scope with "alwaysRedirectOnPause" turned on... (validation errors are preserved beyond one request but property editors are lost).</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0 RC3</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398071502" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7363" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7363/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7363">#7363</a> Implementations of AbstractPropertyBindingResult do not preserve the custom property editors (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>