Questions tagged [load-time-weaving]

Binary weaving of aspects when a class is loaded.

Load-Time Weaving (LTW) is instrumentation (binary weaving of aspects) at class loading time in a VM.

For example, in Java, it is implemented by AspectJ.

Alternatively, in the .NET world, it is also called "Runtime Weaving" (see the PostSharp documentation).

162 questions
0
votes
0 answers

`LoadTimeWeaver` error when I updated my Spring Boot project from Java 8 to Java 17

I have this Java project (branch java11) that I am currently working with. Today I upgraded from Java 8 to Java 17. I changed some code regarding security, ACLs and the EHCache since many components were deprecated. My code now compiles, but it has…
Aleix Mariné
  • 110
  • 1
  • 9
0
votes
1 answer

Spring AOP LTW doesn't work, weaving doesn't happening

I'm creating simple experimental program, which use LTW to weave aspect into a class, however aspect load-time weaving doesn't happening. You can check and use code, which I will describe later, in GitHub. I'm using Java 17 and IntelliJ IDE. Used…
0
votes
2 answers

JavaConfig problem in web application (Vaadin + Spring)

UPDATED I found an suspicious log entry: org.springframework.beans.factory.wiring.BeanConfigurerSupport: BeanFactory has not been set on BeanConfigurerSupport: Make sure this configurer runs in a Spring container. Unable to configure bean of type…
cscsaba
  • 1,279
  • 3
  • 20
  • 31
0
votes
1 answer

@Aspect class is not executing when running individuall test from intelli j but executes when running mvn test

I have a UI automation framework that uses AspectJ for various purposes like logging steps, taking screenshots, etc. It is a maven project and uses TestNG, Selenium, etc as dependencies. Now, the problem is, When I try to run an individual test from…
CodeBlooded
  • 185
  • 5
  • 16
0
votes
1 answer

Spring application failed to start with enabled LoadTime weaving

Good day everyone! I have a spring boot web application for which I have added Load time weaving to be able to use AspectJ aspects for non-managed spring bean, but after that application failed to start. I have looked through many topics regarding…
user3411289
  • 177
  • 1
  • 1
  • 6
0
votes
1 answer

How is Load-Time Weaving to a .jar file with AspectJ done?

Some project background: I am working with an application that runs on Java. My goal is to collect real-time data to send it to an API running on a local server. The application is packaged into a .jar file and I have no access to source code.…
Seymour
  • 64
  • 8
0
votes
1 answer

Maven + AspectJ LTW [ERROR] [AppClassloader] and Joinpoint target null

I'm trying to make a simple app with Maven and AspectJ using LoadTime-Weaving. I have an aspect which targets an annotation and calculates if the method's execution time was longer than expected. But when it gets to call getSLAAnnotation() to get…
Agustín
  • 3
  • 2
0
votes
1 answer

How to weave a 3rd party jar that is present in tomcat library folder using aspectj?

I have tried weaving that 3rd party jar by putting it inside the projects lib folder and it worked correctly. But I want to weave that jar from the tomcat lib folder. Please suggest.
0
votes
1 answer

How to weave AspectJ java project into Spring boot project

I have java project named Test which have all aspects in it. I wan to use these aspects in another spring boot project. I am working on a poc to weave aspects in Test project into a spring boot application. What is the efficient way to do so and how…
0
votes
0 answers

WildFly Jboss EAS 7.2 loadtimeweaving issue with Spring 4.2.4

We are blocked with this issue, I will try to put it in words below. Please have a look at the image first or keep it opened in parallel. Project is an old Ant based project. Using Spring 4.2.4 currently. Configuration is XML-based. Class…
0
votes
1 answer

How to use load time weaving without -javaagent?

I am trying to enable loadtimeweaving without javaagent jar files of aspectweaver and spring-instrument. This what I have implemented to achieve the same But it's not…
0
votes
0 answers

Load-time weaving with AspectJ

I need to add aspects on runtime in AspectJ. Right now I am using Spring AOP. It is not allowing me to add aspects without restarting the JVM. The following is my aspect in Spring AOP. Now I need to add extra methods to my aspect during…
0
votes
2 answers

Is there a way to enable load time weaving in AspectJ without passing java agent arguments to JVM?

I've a requirement to use load time weaving in AspectJ in a spring application, from what I can see in different sources is that you've to pass the javaagent argument to your JVM for enabling the load time weaving.…
Sagar Verma
  • 25
  • 1
  • 4
0
votes
0 answers

Disable certain aspects during ant tests

I've an aspect. @Aspect public class MyAspect { private MethodInterceptor myInterceptor; public MyAspect() { no-op } public void setInterceptorFactory(@NonNull final InterceptorFactory interceptorFactory) { //code …
0
votes
1 answer

How to dynamically instrument JUnit tests?

I am using Invesdwin (https://github.com/subes/invesdwin-instrument) to dynamically load java agents into my Spring Boot project in the main method, before the context starts…
Martin
  • 1,977
  • 5
  • 30
  • 67