Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6387259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:07:45+00:00 2026-05-25T03:07:45+00:00

my question is related to this question We have different aspect class that do

  • 0

my question is related to this question

We have different aspect class that do @around advice on different part of an application (fat client in Swing) to measure the execution time.

I have another aspect (ExceptionHandler) that do @around on all the aspects method i wrote.

I did this to avoid that the aspects created would throw exception and make the client application fails. So basically, i try catch the Proceed of my other @around method and just log exception that arise. I only throw an exception when i detect it come from the proceedingJoinPoint

if (joinPoint.getSignature().getDeclaringTypeName().equalsIgnoreCase("org.aspectj.lang.ProceedingJoinPoint")) {
            throw exception;
        }

Is it valid to do this?

In Eclipse with AJDT the app run fine and i tested the ExceptionHandler and it worked as expected.

But in other env. (Integration) the application fail as soon as it meet a line advised by the exceptionHandler with this Error

Exception in thread "main" java.lang.NoSuchMethodError:     com.xxx.yyy.aop.aspect.ExceptionHandlerAspect.aspect
 Of()Lcom/xxx/yyy/aop/aspect/ExceptionHandlerAspect;
    at     com.xxx.yyy.aop.aspect.ecs.AspectBaseEcs.inspectLoginInfo(AspectBaseEcs.java:65)
    at com.xxx.yyy.app.es.security.Security.loadApplications(Security.java:172)
    at com.xxx.yyy.app.es.gui.VSDlgLogin.loadSecurity(VSDlgLogin.java:346)
    at com.xxx.yyy.app.es.ApplicationSuite.start(ApplicationSuite.java:839)
    at com.xxx.yyy.app.es.ApplicationSuite.main(ApplicationSuite.java:501)

I have also decompile the code to see if aspectOf() was weaved into my ExceptionHandler and the method is there!!!!!!!???????????

Why this error rise…?

I’m clueless.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:07:46+00:00Added an answer on May 25, 2026 at 3:07 am

    Finally found the problem. Our Application had a dependency on common module jar that was containing aspect too.

    The base package name was the same : com.xxx.aop and the base class we used for our aspects was the same name!!!! So 2 com.xxx.aop.AspectBase.class were loaded.

    Since we used a flag in our ant build file to enable compile time weaving at yes/no, one of our AspectBase.class was not weaved while the other was.

    Can’t believe i didn’t see that before!!!!!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is related to my previous question , but a different one. I have
Another question related to this one . I have a List<SortableObjects> that is the
Related to this question (I too have had this error in an application). Error
I have an SQL question, related to this and this question (but different). Basically
This question is related to two different questions I have asked previously: 1) Reproduce
I have a question related to this one . I don't want to do
I have a question related to this one : I'm trying to attach an
This question is related to this one . I have a page table with
Much related to this question , we have a scenario on my team where
Although somewhat related to this question , I have what I think is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.