Announcement Announcement Module
Collapse
No announcement yet.
error at ::0 formal unbound in pointcut Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • error at ::0 formal unbound in pointcut

    greetings,

    my problem is related to other previously posted threads from a couple of years ago but is not correctable by any solutions that that had.

    I am trying to implement and after-throwing aspect but any flavor of spring aop configuration I use doesn't seem to work.

    here is the stack trace I get when running:

    org.springframework.web.context.ContextLoader - Context initialization failed
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'mil.army.inscom.csi.logging.LoggerInjectorBeanPos tProcessor#0' defined in class path resource [loggingContext.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.transaction.config.internalTr ansactionAdvisor': Cannot resolve reference to bean 'org.springframework.transaction.annotation.Annota tionTransactionAttributeSource#0' while setting bean property 'transactionAttributeSource'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.transaction.annotation.Annota tionTransactionAttributeSource#0': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error at ::0 formal unbound in pointcut
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:405)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.context.support.AbstractApplic ationContext.getBean(AbstractApplicationContext.ja va:880)
    at org.springframework.context.support.AbstractApplic ationContext.registerBeanPostProcessors(AbstractAp plicationContext.java:605)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:365)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:255)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:199)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 45)
    at org.jboss.resteasy.plugins.spring.SpringContextLoa derListener.contextInitialized(SpringContextLoader Listener.java:44)
    at org.mortbay.jetty.handler.ContextHandler.startCont ext(ContextHandler.java:543)
    at org.mortbay.jetty.servlet.Context.startContext(Con text.java:136)
    at org.mortbay.jetty.webapp.WebAppContext.startContex t(WebAppContext.java:1220)
    at org.mortbay.jetty.handler.ContextHandler.doStart(C ontextHandler.java:513)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(Web AppContext.java:448)
    at org.mortbay.component.AbstractLifeCycle.start(Abst ractLifeCycle.java:39)
    at org.mortbay.jetty.handler.HandlerCollection.doStar t(HandlerCollection.java:152)
    at org.mortbay.component.AbstractLifeCycle.start(Abst ractLifeCycle.java:39)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(H andlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:222)
    at org.mortbay.component.AbstractLifeCycle.start(Abst ractLifeCycle.java:39)
    at org.mortbay.xml.XmlConfiguration.main(XmlConfigura tion.java:977)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.mortbay.start.Main.invokeMain(Main.java:194)
    at org.mortbay.start.Main.start(Main.java:512)
    at org.mortbay.start.Main.main(Main.java:119)
    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.transaction.config.internalTr ansactionAdvisor': Cannot resolve reference to bean 'org.springframework.transaction.annotation.Annota tionTransactionAttributeSource#0' while setting bean property 'transactionAttributeSource'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.transaction.annotation.Annota tionTransactionAttributeSource#0': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error at ::0 formal unbound in pointcut
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:275)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:104)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1245)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:1010)
    .......


    The context.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:aop="http://www.springframework.org/schema/aop" xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schem...ring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schem...ng-context.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schem...ng-aop-2.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">

    <aop:aspectj-autoproxy proxy-target-class="true" />

    <bean id="csiRuntimeExceptionAdvice" class="mil.army.inscom.csi.services.CsiRuntimeExce ptionAdvice" />

    </beans>


    and the POJO:

    @Aspect
    public class CsiRuntimeExceptionAdvice //implements ThrowsAdvice
    {
    public CsiRuntimeExceptionAdvice () {}

    @Pointcut("execution(* *(..))")
    public void runtimeException() {}

    @AfterThrowing("runtimeException()")
    public void afterThrowing(RuntimeException e)
    {
    System.out.println("AOP Runtime CAUGHT: " + e.getMessage());
    }
    }



    I am relatively new using Spring AOP and would greatly appreciate any help. Thanks
Working...
X