Announcement Announcement Module
Collapse
No announcement yet.
Issue migrating to running on JDK7 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue migrating to running on JDK7

    I have some code (a large application, several years old), happily running on JDK6. I updated its runtime to JDK7 and this error now happens on startup:

    Caused by: java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut businessServiceLayer
    at org.aspectj.weaver.tools.PointcutParser.parsePoint cutExpression(PointcutParser.java:316)
    at org.springframework.aop.aspectj.AspectJExpressionP ointcut.buildPointcutExpression(AspectJExpressionP ointcut.java:205)
    at org.springframework.aop.aspectj.AspectJExpressionP ointcut.checkReadyToMatch(AspectJExpressionPointcu t.java:192)
    at org.springframework.aop.aspectj.AspectJExpressionP ointcut.getClassFilter(AspectJExpressionPointcut.j ava:173)
    at org.springframework.aop.support.AopUtils.canApply( AopUtils.java:198)
    at org.springframework.aop.support.AopUtils.canApply( AopUtils.java:253)
    at org.springframework.aop.support.AopUtils.findAdvis orsThatCanApply(AopUtils.java:287)
    at org.springframework.aop.framework.autoproxy.Abstra ctAdvisorAutoProxyCreator.findAdvisorsThatCanApply (AbstractAdvisorAutoProxyCreator.java:113)
    at org.springframework.aop.framework.autoproxy.Abstra ctAdvisorAutoProxyCreator.findEligibleAdvisors(Abs tractAdvisorAutoProxyCreator.java:85)
    at org.springframework.aop.framework.autoproxy.Abstra ctAdvisorAutoProxyCreator.getAdvicesAndAdvisorsFor Bean(AbstractAdvisorAutoProxyCreator.java:66)
    at org.springframework.aop.framework.autoproxy.Abstra ctAutoProxyCreator.wrapIfNecessary(AbstractAutoPro xyCreator.java:360)


    I have done nothing else other than change the JDK runtime. Here is an example of my pointcut being used:
    Code:
    @Aspect
    public final class AuthenticationAdvice
    {
    
        @Before("myapp.server.advice.SystemArchitecture.businessServiceLayer() && args(user,..) && @annotation(auth)")
        public void checkSecurity(JoinPoint jp, User user, Authenticate auth) throws Throwable {
    And here is the pointcut itself...

    Code:
    @Aspect
    public class SystemArchitecture
    {
    
        @Pointcut("execution(public * myapp.server.service.impl..*.*(..))")
        public void businessServiceLayer() {}
    I am using Spring 2.5.5 which involves having these on my classpath:

    /spring/spring-framework-2.5.5/lib/aspectj/aspectjweaver.jar
    spring/spring-framework-2.5.5/lib/asm/asm-2.2.3.jar
    spring/spring-framework-2.5.5/lib/asm/asm-commons-2.2.3.jar
    spring/spring-framework-2.5.5/lib/asm/asm-util-2.2.3.jar
    spring/spring-framework-2.5.5/lib/cglib/cglib-nodep-2.1_3.jar
    Does anyone have a solution to this?

  • #2
    I'd try to upgrade to Spring 3. I don't think that Spring 2 was designed to be used with Java 7.

    Comment


    • #3
      Already on Spring 3

      Did you find a solution to this problem, I don't want to jump on your thread, but i upgraded to 7 and ran into a similar issue. Was already on Spring 3.03

      Comment


      • #4
        No - I haven't spent much time on it. The "migrate to Spring 3" was not an answer I had much truck with, as obviously this is AOP-specific and, in any case, Spring 3 was out *quite a long time before* Java7

        Comment

        Working...
        X