<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=cduplichien" rel="nofollow">Clark Duplichien</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8211?redirect=false" rel="nofollow">SPR-8211</a></strong> and commented</p>
<p dir="auto">Documentation on the SPEL PropertyAccessor.class reads:</p>
<blockquote>
<p dir="auto">Property resolvers are considered to be ordered and each will be called in<br>
turn. The only rule that affects the call order is that any naming the target class directly in<br>
getSpecifiedTargetClasses() will be called first, before the general resolvers.</p>
</blockquote>
<p dir="auto">However, the attached test case shows property accessors being utilized in an order other than what they are registered in.<br>
It may be intended for the property accessors to be utilized in inverse order of their being added to the evaluationContext; if this is the case, it could be made clearer in the javadocs.</p>
<hr>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/17993/PropertyAccessorsEvaluatedOutOfOrderTest.java" rel="nofollow">PropertyAccessorsEvaluatedOutOfOrderTest.java</a> (<em>4.11 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/17994/SPR-8211-patch.txt" rel="nofollow">SPR-8211-patch.txt</a> (<em>1.54 kB</em>)</li>
</ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=hammerstein" rel="nofollow">Oliver-Arne Hammerstein</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2516?redirect=false" rel="nofollow">SPR-2516</a></strong> and commented</p>
<p dir="auto">I transferred my working code from Spring 2.0 RC2 to RC3 and yield problems by using &lt;tx:annotation-driven /&gt; in conjunction with a LocalContainerEntityManagerFactoryBean. This was the error:</p>
<p dir="auto">org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor': Instantiation of bean failed; nested exception is java.lang.NullPointerException<br>
Caused by: java.lang.NullPointerException<br>
at org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor$TransactionAttributeSourcePointcut.getTransactionAttributeSource(TransactionAttributeSourceAdvisor.java:102)<br>
at org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor$TransactionAttributeSourcePointcut.hashCode(TransactionAttributeSourceAdvisor.java:121)<br>
at java.lang.Object.toString(Object.java:209)<br>
at java.lang.String.valueOf(String.java:2577)<br>
at java.lang.StringBuffer.append(StringBuffer.java:220)<br>
at org.springframework.aop.support.AbstractPointcutAdvisor.toString(AbstractPointcutAdvisor.java:71)<br>
at java.lang.String.valueOf(String.java:2577)<br>
at java.lang.StringBuffer.append(StringBuffer.java:220)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:383)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:242)<br>
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:239)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:155)<br>
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:303)<br>
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)<br>
at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:92)<br>
at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:77)<br>
at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:68)<br>
at de.oc.test.AppContextTest.testname(AppContextTest.java:23)<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 junit.framework.TestCase.runTest(TestCase.java:154)<br>
at junit.framework.TestCase.runBare(TestCase.java:127)<br>
at junit.framework.TestResult$1.protect(TestResult.java:106)<br>
at junit.framework.TestResult.runProtected(TestResult.java:124)<br>
at junit.framework.TestResult.run(TestResult.java:109)<br>
at junit.framework.TestCase.run(TestCase.java:118)<br>
at junit.framework.TestSuite.runTest(TestSuite.java:208)<br>
at junit.framework.TestSuite.run(TestSuite.java:203)<br>
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)<br>
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)<br>
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)<br>
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)<br>
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)<br>
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)</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="398069268" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7102" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7102/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7102">#7102</a> NPE with TransactionAttributeSourceAdvisor.TransactionAttributeSourcePointcut when debug enabled (<em><strong>"duplicates"</strong></em>)</li>
</ul>