Results 1 to 4 of 4

Thread: Issue migrating to running on JDK7

  1. #1
    Join Date
    Sep 2011
    Posts
    2

    Default 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. #2
    Join Date
    Jul 2010
    Location
    Venice, Italy
    Posts
    710

    Default

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

  3. #3

    Default 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

  4. #4
    Join Date
    Sep 2011
    Posts
    2

    Default

    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •