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 1061239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:26:50+00:00 2026-05-16T18:26:50+00:00

This should be simple. Question How do you get a pointcut in one project

  • 0

This should be simple.

Question

How do you get a pointcut in one project to advise the code/classes within another project?


Context
I’m working in eclipse with two projects. For ease of explanation, let’s call one science project and the other math project and say the science project relies on the math project and I’m developing in both projects, concurrently. The math project is a core product, in production, and life will be easier if I don’t modify the code much.

Currently, I’m debugging the interaction between these two projects. To assist with that, I’m writing an Aspect (within the science project) to log key information as the math code (and science code) executes.


Example
I running a simple example aspect along the lines of:

package org.science.example;

public aspect ScientificLog {
    public pointcut testCut() : execution (public * *.*(..));
    before() : testCut() {
        //do stuff
    }
}

Problem
The problem is, no matter what pointcut I create, it only advises code from the science project. No classes from org.math.example are crosscut, AT ALL!

I tried adding the math project to the inpath of the science project by going to proect properties > AspectJ Build > Inpath and clicking add project and choosing the math project. That didn’t work but it seems like I need to do something along those lines.

Thanks, in advance, for any suggestions…

-gMale


EDIT 1:
Since writing this, I’ve noticed the project is giving the following error:

Caused by: org.aspectj.weaver.BCException: Unable to continue, this version of AspectJ
supports classes built with weaver version 6.0 but the class
com.our.project.adapter.GenericMessagingAdapter is version 7.0
when batch building BuildConfig[null] #Files=52 AopXmls=#0

So maybe this is setup properly and the error is more subtle. BTW, the class mentioned is from the “science project,” so to speak. This happens even after I clean the project. I’m currently googling this error…


EDIT 2:
I found the solution to the error above in
comment #5 here

The problem is the maven-aspectj-plugin’s pom file declares a dependency on aspectjtools version 1.6.7. So, when configuring the plugin, that transient dependency has to be modified. Here’s the related code snippet for the pom file that fixes the problem by specifying version 1.6.9 instead of 1.6.7:

                    <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>aspectj-maven-plugin</artifactId>
                            <version>1.3</version>
                            <dependencies>
                                <dependency>
                                    <groupId>org.aspectj</groupId>
                                    <artifactId>aspectjtools</artifactId>
                                    <version>1.6.9</version>
                                </dependency>
                            </dependencies>
                            <configuration>
                                    <source>1.6</source>
                                    <target>1.6</target>
                            </configuration>
                            <executions>
                                    <execution>
                                            <goals>
                                                    <goal>compile</goal>
                                                    <goal>test-compile</goal>
                                            </goals>
                                    </execution>
                            </executions>
                    </plugin>
  • 1 1 Answer
  • 1 View
  • 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-16T18:26:50+00:00Added an answer on May 16, 2026 at 6:26 pm

    Your second problem is unrelated to the first. It is saying that com.our.project.adapter.GenericMessagingAdapter was originally compiled and woven against a new version of AspectJ but is being used to binary weave against an older version of AspectJ.

    This is essentially the same problem as when you try to run Java classes compiled under 1.6 on a 1.5 VM.

    The version number was revved up for the release of AspectJ 1.6.8 (I think, or maybe it was 1.6.7).

    The solution is to make sure you are using the latest version of AspectJ for all of your projects (eg- 1.6.9, or dev builds of 1.6.10).

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

Sidebar

Related Questions

This should be a simple question, but I can't get it to work :(
Another simple question. I found this really cool snippet of code: $date_str = Jan
This should be a simple question, but I just can't recall the relevant API.
This should be a simple question, but I just can't seem to figure it
This should be very simple question. There are many programming languages out there, compiled
This should be a fairly simple question to answer, but I am interested to
This is (should be) a simple question. I'd like to create a component like
This should be fairly simple question. I'm using DocX library to create new word
I think this should be a simple question to answer. I have the next
This seems like it should be a simple question. I have two QSpinBoxes in

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.