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

  • Home
  • SEARCH
  • 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 6101145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:28:00+00:00 2026-05-23T13:28:00+00:00

I try to run a simple aop example in this site. I have spring

  • 0

I try to run a simple aop example in this site. I have spring aop and aspectj, aspectjweaver jars:

@Aspect
public class StringAspect {

    @Pointcut("call(* String.toLowerCase())")
    public void toLowerCasePointcut() {}

    @Around("toLowerCasePointcut()")
    public String toLowerCaseAroundAdvice(ProceedingJoinPoint joinPoint) throws Throwable {
        String text = ((String) joinPoint.getTarget()).toUpperCase();
        return text;
    }
}

When I run this example in Test.java like “AaBbCc”.toLowerCase(), I get this exception;

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean ... Initialization of bean failed; nested exception is org.aspectj.weaver.tools.UnsupportedPointcutPrimitiveException: Pointcut expression call(* String.toLowerCase()) contains unsupported pointcut primitive 'call'

Spring AOP doesnt contain “call”, but why aspectj weaving is not working, ,do you have an idea? Thank you.

edit:

In my spring config file I only have bean definition of @aspect annotated class and <aop:aspectj-autoproxy />.
my jars are : spring-aop-3.0.5, aopalliance, aspectjrt1.6.8, aspectjweaver1.5.0

  • 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-23T13:28:00+00:00Added an answer on May 23, 2026 at 1:28 pm

    Have you tried to use the AspectJ Eclipse plugin to do the weaving? (It is also included in SpringSource Tool Suite)

    If you have some aspect configuration in your Spring configuration. Try to remove it and just enable AspectJ nature on the project. Also remove all AspectJ jar files and only use those that is attached automatically by the plugin.

    With this setup it works for me at least.

    Updated: Weaving the aspect advice into code

    You get an exception from the Spring container because of your call pointcut. But you want AspectJ weavingweave the aspect. Then you need to use either compile-time or load-time weaving. Compile-time weaving is the simplest alternative ant the alternative offered by the plugin.

    You can look at the AspectJ compiler as an advanced Java compiler that also supports AspectJ. So you can run your compiled code anywhere.

    Also, you do not need the plugin to compile. You can for example compile with an Ant task as I have showed here.

    But the easiest alternative is to use the plugin. This also gives you extra help which I have described briefly here.

    I hope this helps!

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

Sidebar

Related Questions

I've created this simple program in Eclipse: import java.util.*; import java.io.*; public class prob1
I try to run a simple test following RailsGuides instructions . I have a
I try to run this simple code in node.js: var YUI = require(yui3); YUI.use(function(Y)
I try to run a simple Hello World ASP.NET web site on my system,
Ok I have a very simple mysql database but when i try to run
I'm getting the following error when I try to run a simple Java JDBC
I've come across a situation where I try to run a simple line of
I get the following error when I try to run sample example of Google
When I try to run a simple, basic Silverlight application, I got the following
When I try to run even simple rails commands such as: rails -h I

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.