Announcement Announcement Module
Collapse
No announcement yet.
Global tracing Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Global tracing

    Is there a way I can configure Spring AOP to allow printing of entry and exit of methods for multiple classes without defining individual proxies for each one?

  • #2
    Yes. You can use BeanNameAutoProxyCreator to apply the Trace Advisor. BeanNameAutoProxyCreator can proxy singletons as well as prototypes.
    HTH

    Comment


    • #3
      Or another "auto proxy creator" like DefaultAdvisorAutoProxyCreator. This looks at all Advisors defined in your context, and checks whether the pointcut matches each bean defined.

      Comment


      • #4
        I'm trying to use the DefaultAdvisorAutoProxyCreator as such:
        Code:
         
            <bean id="autoProxyCreator" class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"/> 
        
            <bean id="tracingBeforeAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor"> 
                <property name="pattern"><value>.*</value></property> 
                <property name="advice"><bean class="com.test.service.audit.TraceBeforeAdvice"/></property> 
            </bean>
        TraceBeforeAdvice is the same as the Spring TraceInterceptor, but logs input arguments as well. When I add these beans, I get the following exception first thing:

        Code:
        org.springframework.beans.TypeMismatchException&#58; Failed to convert property value of type &#91;$Proxy40&#93; to required type &#91;com.test.data.jdbc.AppConfigJdbcImpl&#93; for property 'appConfig' 
           at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary&#40;BeanWrapperImpl.java&#58;1010&#41; 
           at org.springframework.beans.BeanWrapperImpl.setPropertyValue&#40;BeanWrapperImpl.java&#58;772&#41;
        I can provide a longer stack trace if that would help. The AppConfig bean is the first one created and being injected. I'm using 1.2RC2. My property takes the interface (com.test.data.AppConfig). I took what I found in the reference docs and Pro Spring, but probably made a mistaken assumption in filling in the blanks. Are there any examples of application-wide (all classes/all methods) tracing using AOP in any of the projects or sub-projects? I checked the samples and didn't see anything.

        The app works fine without it.

        Thanks in advance.

        Comment


        • #5
          did you find a solution for your problem? Please let me know. Iam interested.

          Comment


          • #6
            Are you using com.xxx.AppConfigJdbcImpl as the parameter type for the setAppConfig() method? You should instead have an interface, namely AppConfig and then have AppConfigJdbcImpl implement this interface. It looks like a JDK-proxy (which implements interfaces) and you are asking for a specific implementation.

            Jess

            Comment


            • #7
              I am wondering if adding cglib would solve this?

              Comment


              • #8
                Resolved?

                Did anyone find out what the cause of this is?

                I am trying to do the same thing, using BeanNameAutoProxyCreator, and getting the same error. The proxy creator is applying enter/exit tracing to methods, and also logging exceptions to a particular log.

                Code:
                Code:
                       <bean id="proxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
                       		<property name="beanNames">
                       			<list>
                       				<value>*</value>
                       			</list>
                       		</property>
                       		<property name="interceptorNames">
                       			<list>
                       				<value>loggingThrowsAdvice</value>
                       				<value>tracingBeforeAdvice</value>
                       				<value>tracingAfterAdvice</value>
                       			</list>
                       		</property>
                       </bean>
                       
                       <!-- Advice -->
                       <bean id="loggingThrowsAdvice" class="com.nike.gtcustoms.business.LoggingThrowsAdvice"/>
                       <bean id="tracingBeforeAdvice" class="com.nike.gtcustoms.business.TracingBeforeAdvice"/>
                       <bean id="tracingAfterAdvice" class="com.nike.gtcustoms.business.TracingAfterAdvice"/>
                The full stack trace looks like this:
                Code:
                2006-03-06 10:42:07,739 ERROR org.springframework.web.context.ContextLoader - Context initialization failed
                org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: At least one handler method must be found in class [class $Proxy0]
                java.lang.IllegalArgumentException: At least one handler method must be found in class [class $Proxy0]
                	at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.<init>(ThrowsAdviceInterceptor.java:86)
                	at org.springframework.aop.framework.adapter.ThrowsAdviceAdapter.getInterceptor(ThrowsAdviceAdapter.java:41)
                	at org.springframework.aop.framework.adapter.DefaultAdvisorAdapterRegistry.getInterceptors(DefaultAdvisorAdapterRegistry.java:77)
                	at org.springframework.aop.framework.AdvisorChainFactoryUtils.calculateInterceptorsAndDynamicInterceptionAdvice(AdvisorChainFactoryUtils.java:77)
                	at org.springframework.aop.framework.HashMapCachingAdvisorChainFactory.getInterceptorsAndDynamicInterceptionAdvice(HashMapCachingAdvisorChainFactory.java:47)
                	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:156)
                	at $Proxy2.getConnection(Unknown Source)
                	at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)
                	at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
                	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
                	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
                	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:885)
                	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:797)
                	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:860)
                	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:829)
                	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:409)
                	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:238)
                	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:148)
                	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:247)
                	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:331)
                	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:155)
                	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:240)
                	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:178)
                	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
                	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3692)
                	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4127)
                	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
                	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
                	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
                	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
                	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
                	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
                	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
                	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
                	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
                	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
                	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
                	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
                	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
                	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
                	at org.apache.catalina.core.StandardServer.start(StandardServer.java:680)
                	at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
                	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                	at java.lang.reflect.Method.invoke(Unknown Source)
                	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
                	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
                Without the aspects, the application runs fine.
                Since I am applying these aspects to all beans (including beans that are already being proxied), is it possible that I'm proxying proxied objects, which is creating this error?

                Comment


                • #9
                  Oops . . Clarification

                  So,
                  I tried running the app with one advice at a time. The stack trace in my previous post is when I only have the ThrowsAdvice advice enabled.
                  The following stack trace occurs when I only have the TracingBeforeAdvice enabled (it is similar to the stack trace in a previous posting in this thread).

                  Code:
                  2006-03-06 14:33:13,328 ERROR org.springframework.web.context.ContextLoader - Context initialization failed
                  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'LiquidationDAO' defined in ServletContext resource [/WEB-INF/applicationContext-hibernate.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested PropertyAccessExceptions are: [org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy7] to required type [org.springframework.orm.hibernate3.HibernateTemplate] for property 'hibernateTemplate'; nested exception is java.lang.IllegalArgumentException: No matching editors or conversion strategy found]
                  PropertyAccessExceptionsException (1 errors)
                  org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy7] to required type [org.springframework.orm.hibernate3.HibernateTemplate] for property 'hibernateTemplate'; nested exception is java.lang.IllegalArgumentException: No matching editors or conversion strategy found
                  java.lang.IllegalArgumentException: No matching editors or conversion strategy found
                  	at org.springframework.beans.PropertyTypeConverter.doTypeConversionIfNecessary(PropertyTypeConverter.java:156)
                  	at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:723)
                  	at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:575)
                  	at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:769)
                  	at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:796)
                  	at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:785)
                  	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:775)
                  	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:575)
                  	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:405)
                  	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:238)
                  	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:148)
                  	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:253)
                  	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:331)
                  	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:155)
                  	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:240)
                  	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:178)
                  	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
                  	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3692)
                  	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4127)
                  	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
                  	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
                  	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
                  	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
                  	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
                  	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
                  	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
                  	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
                  	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
                  	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
                  	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
                  	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
                  	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
                  	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
                  	at org.apache.catalina.core.StandardServer.start(StandardServer.java:680)
                  	at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
                  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  	at java.lang.reflect.Method.invoke(Unknown Source)
                  	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
                  	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

                  Comment


                  • #10
                    Try changing the order of interceptors from

                    <list>
                    <value>loggingThrowsAdvice</value>
                    <value>tracingBeforeAdvice</value>
                    <value>tracingAfterAdvice</value>
                    </list>


                    to ..........

                    <list>
                    <value>tracingBeforeAdvice</value>
                    <value>loggingThrowsAdvice</value>
                    <value>tracingAfterAdvice</value>
                    </list>

                    Comment


                    • #11
                      No Go

                      Changing the order of the interceptors did not work. The following stack trace in the logs on deployment:

                      Code:
                      2006-03-06 17:31:05,907 ERROR org.springframework.web.context.ContextLoader - Context initialization failed
                      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: At least one handler method must be found in class [class $Proxy1]
                      java.lang.IllegalArgumentException: At least one handler method must be found in class [class $Proxy1]
                      	at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.<init>(ThrowsAdviceInterceptor.java:86)
                      	at org.springframework.aop.framework.adapter.ThrowsAdviceAdapter.getInterceptor(ThrowsAdviceAdapter.java:41)
                      	at org.springframework.aop.framework.adapter.DefaultAdvisorAdapterRegistry.getInterceptors(DefaultAdvisorAdapterRegistry.java:77)
                      	at org.springframework.aop.framework.AdvisorChainFactoryUtils.calculateInterceptorsAndDynamicInterceptionAdvice(AdvisorChainFactoryUtils.java:77)
                      	at org.springframework.aop.framework.HashMapCachingAdvisorChainFactory.getInterceptorsAndDynamicInterceptionAdvice(HashMapCachingAdvisorChainFactory.java:47)
                      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:156)
                      	at $Proxy4.getConnection(Unknown Source)
                      	at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)
                      	at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
                      	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
                      	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
                      	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:885)
                      	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:797)
                      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:860)
                      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:829)
                      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:409)
                      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:238)
                      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:148)
                      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:247)
                      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:331)
                      	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:155)
                      	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:240)
                      	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:178)
                      	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
                      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3692)
                      	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4127)
                      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
                      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
                      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
                      	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
                      	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
                      	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
                      	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
                      	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
                      	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
                      	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
                      	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
                      	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
                      	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
                      	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
                      	at org.apache.catalina.core.StandardServer.start(StandardServer.java:680)
                      	at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
                      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                      	at java.lang.reflect.Method.invoke(Unknown Source)
                      	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
                      	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
                      The code for the LoggingThrowsAdvice is simple and right now just does a System.out:
                      Code:
                      public class LoggingThrowsAdvice implements ThrowsAdvice {
                      	
                      	private Logger log = Logger.getLogger(LoggingThrowsAdvice.class);
                      	
                      	public void afterThrowing(Throwable t) {
                      		System.out.println("BREAK 1");
                      		
                      		//log.error("An error has occurred in method");
                      		//log.error(t);
                      	}
                      	
                      	public void afterThrowing(Method method, Object[] args, Object target, Throwable t) {
                      		System.out.println("BREAK 1");
                      		
                      		//log.error("An error has occurred in method " + method.getName() + " with args " + args.toString());
                      		//log.error(t);
                      	}
                      	   
                      }

                      Comment


                      • #12
                        Please show all/more of your Spring config.

                        Jess

                        Comment


                        • #13
                          Spring Config

                          Please bear with me, since this is my first foray into AOP.

                          I'm running into a couple of issues here, so to simplify I am just trying to setup an AfterThrows advice.
                          My aspect is setup like so:
                          Code:
                                 <bean id="proxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
                                 		<property name="beanNames">
                                 			<list>
                                 				<value>*</value>
                                 			</list>
                                 		</property>
                                 		<property name="interceptorNames">
                                 			<list>
                                 				<value>loggingThrowsAdvice</value>
                                 			</list>
                                 		</property>
                                 </bean>
                                 
                                 <bean id="loggingThrowsAdvice" class="com.nike.gtcustoms.business.LoggingThrowsAdvice"/>
                          The exception stack trace, which occurs upon deployment, looks like this:
                          Code:
                          2006-03-07 16:46:29,556 ERROR org.springframework.web.context.ContextLoader - Context initialization failed
                          org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: At least one handler method must be found in class [class $Proxy0]
                          java.lang.IllegalArgumentException: At least one handler method must be found in class [class $Proxy0]
                          	at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.<init>(ThrowsAdviceInterceptor.java:86)
                          	at org.springframework.aop.framework.adapter.ThrowsAdviceAdapter.getInterceptor(ThrowsAdviceAdapter.java:41)
                          	at org.springframework.aop.framework.adapter.DefaultAdvisorAdapterRegistry.getInterceptors(DefaultAdvisorAdapterRegistry.java:77)
                          	at org.springframework.aop.framework.AdvisorChainFactoryUtils.calculateInterceptorsAndDynamicInterceptionAdvice(AdvisorChainFactoryUtils.java:77)
                          	at org.springframework.aop.framework.HashMapCachingAdvisorChainFactory.getInterceptorsAndDynamicInterceptionAdvice(HashMapCachingAdvisorChainFactory.java:47)
                          	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:156)
                          	at $Proxy2.getConnection(Unknown Source)
                          	at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)
                          	at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
                          	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
                          	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
                          	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:885)
                          	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:797)
                          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:860)
                          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:829)
                          	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:409)
                          	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:238)
                          	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:148)
                          	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:247)
                          	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:331)
                          	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:155)
                          	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:240)
                          	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:178)
                          	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
                          	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3692)
                          	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4127)
                          	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
                          	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
                          	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
                          	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
                          	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
                          	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
                          	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
                          	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
                          	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
                          	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
                          	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
                          	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
                          	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
                          	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
                          	at org.apache.catalina.core.StandardServer.start(StandardServer.java:680)
                          	at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
                          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                          	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                          	at java.lang.reflect.Method.invoke(Unknown Source)
                          	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
                          	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
                          Looks like its throwing up on the ThrowsAdvice I setup, which is very simple (for debugging purposes).
                          Code is:
                          Code:
                          public class LoggingThrowsAdvice implements ThrowsAdvice {
                          	
                          	public void afterThrowing(Throwable t) {
                          		System.out.println("BREAK 1");
                          	}
                          	
                          	public void afterThrowing(Method method, Object[] args, Object target, Throwable t) {
                          		System.out.println("BREAK 1");
                          	}
                          	   
                          }
                          Everything works ok when I comment out the auto proxy bean.

                          Comment

                          Working...
                          X