<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=steven.warren" rel="nofollow">Steven Warren</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-688?redirect=false" rel="nofollow">SPR-688</a></strong> and commented</p>
<p dir="auto">Proxy receives a Class[] that contains the interfaces to be supported by the proxy. The order of classes in the array are significant to Proxy as it uses that ordering to resolve method signature conflicts.</p>
<p dir="auto">AdvisedSupport returns an Array of interfaces supported, but the ordering is undefined. This can lead to unpredictable behaviour of the proxy class.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 1.1.4</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=geniusgroup" rel="nofollow">G</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4367?redirect=false" rel="nofollow">SPR-4367</a></strong> and commented</p>
<p dir="auto">Autowiring failed when one of the bean contains factory-method (Static setter). Even we don't apply autowire in that bean, it will also crash the whole framework.</p>
<p dir="auto">Reference: <a href="http://forum.springframework.org/showthread.php?t=48399" rel="nofollow">http://forum.springframework.org/showthread.php?t=48399</a></p>
<p dir="auto">Partial XML:</p>
<p dir="auto">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</p>
<p dir="auto">&lt;beans xmlns="<a href="http://www.springframework.org/schema/beans" rel="nofollow">http://www.springframework.org/schema/beans</a>"<br>
xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow">http://www.w3.org/2001/XMLSchema-instance</a>"<br>
xmlns:context="<a href="http://www.springframework.org/schema/context" rel="nofollow">http://www.springframework.org/schema/context</a>"<br>
xsi:schemaLocation="<a href="http://www.springframework.org/schema/beans" rel="nofollow">http://www.springframework.org/schema/beans</a> <a href="http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" rel="nofollow">http://www.springframework.org/schema/beans/spring-beans-2.5.xsd</a><br>
<a href="http://www.springframework.org/schema/context" rel="nofollow">http://www.springframework.org/schema/context</a> <a href="http://www.springframework.org/schema/context/spring-context-2.5.xsd%22%3E" rel="nofollow">http://www.springframework.org/schema/context/spring-context-2.5.xsd"&gt;</a></p>
<p dir="auto">&lt;context:annotation-config /&gt;</p>
<p dir="auto">&lt;bean id="hibernateUtil" class="com.foo.hibernate.HibernateUtil"<br>
factory-method="setSessionFactory"&gt;<br>
&lt;constructor-arg ref="sessionFactory" /&gt;<br>
&lt;/bean&gt;<br>
&lt;/beans&gt;</p>
<p dir="auto">Java:<br>
package com.foo.hibernate;</p>
<p dir="auto">import org.hibernate.SessionFactory;</p>
<p dir="auto">public class HibernateUtil {</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="private static SessionFactory sessionFactory_;

public static SessionFactory getSessionFactory() { return sessionFactory_; }
public static void setSessionFactory(SessionFactory sessionFactory) { sessionFactory_ = sessionFactory; }"><pre class="notranslate"><code class="notranslate">private static SessionFactory sessionFactory_;

public static SessionFactory getSessionFactory() { return sessionFactory_; }
public static void setSessionFactory(SessionFactory sessionFactory) { sessionFactory_ = sessionFactory; }
</code></pre></div>
<p dir="auto">}</p>
<p dir="auto">Error:<br>
ERROR|14:45:57,234| ContextLoader:215 - Context initialization failed<br>
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateUtil' defined in ServletContext resource [/WEB-INF/conf/applicationContext-hibernate.xml]: Initialization of bean failed; nested exception is java.lang.NullPointerException<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:445)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)<br>
at java.security.AccessController.doPrivileged(Native Method)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)<br>
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)<br>
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:400)<br>
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:736)<br>
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)<br>
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)<br>
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)<br>
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)<br>
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)<br>
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)<br>
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)<br>
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)<br>
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)<br>
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)<br>
at org.apache.catalina.core.StandardService.start(StandardService.java:516)<br>
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)<br>
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br>
at java.lang.reflect.Method.invoke(Unknown Source)<br>
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)<br>
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)<br>
Caused by: java.lang.NullPointerException<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:876)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:437)<br>
... 28 more</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5.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="398084676" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9024" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9024/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9024">#9024</a> NPE in AbstractAutowireCapableBeanFactory#populateBean() if bean wrapper is null and InstantiationAwareBeanPostProcessor are registered (<em><strong>"duplicates"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398085065" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9075" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9075/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9075">#9075</a> CLONE -Autowiring failed when one of the bean contains factory-method (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>