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
3
votes
2 answers

Spring 4 LTW not compatible with 64 bit JVM and Tomcat

As part of moving to Java 8 and in honor of Spring 4, I thought I'd upgrade to all 64 bit code. This application runs perfectly on 32 bit but load time weaving does not work (in fact doesn't even load) on 64 bit. Specifics of the architecture: Java…
Terry
  • 911
  • 10
  • 26
3
votes
1 answer

I use load time weaving in spring. How can i set class loader in jetty?

I use load time weaving in spring. All works fine with websphere, because it has own class loader, but i have troubles in dev mode, where i use embedded jetty. How can i set class loader in jetty? When i run it i see following error [INFO]…
kraken
  • 484
  • 7
  • 18
3
votes
1 answer

why cant i get spring load time weaving to work

i have been trying to get an example @Configuration build to work (in groovy) so i can trigger dependency injection outwith a spring container but all i get is error about the -javaagent which i cant seem to fix I have a beanConfig class like this…
WILLIAM WOODMAN
  • 1,185
  • 5
  • 19
  • 36
2
votes
2 answers

AspectJ and Spring LTW doesn't work when upcasting

I setup LTW with AspectJ and spring pretty quick and successfull. Here is the setup: beans.xml:
2
votes
1 answer

Ist there a way to run JUnit 4 tests with Spring AspectJ LTW without using a jvm agent?

I have a spring tomcat project configured with aspectJ LTW, I would like to run unit tests with AspectJ LTW. According to the spring docs running with LTW for a standalone JVM requires passing in arguments for a JVM agent. Passing a JVM agent to…
ams
  • 60,316
  • 68
  • 200
  • 288
2
votes
1 answer

Load Time Weaving 3rd Party Class on Websphere 8 using Aspectj

We are using AspectJ(1.6.12) for weaving a third party library class (SpringBeanELResolver). We enable LTW using , and our aspect uses AspectJ annotation configuration. Everything works fine on jetty with full list of…
iesen
  • 65
  • 2
  • 11
2
votes
1 answer

NoSuchMethodException aspectOf in aspectj load time weaving in spring boot

I used spring ltw documentation to configure load time weaving in my spring boot app. below dependencies are in pom file: org.aspectj aspectjrt
Mina Kh
  • 127
  • 1
  • 12
2
votes
1 answer

Spring AspectJ Load Time Weaving not working with 5.3.3 and Tomcat 9.0.37

I am involved in a review task of an older project. The task is to update certain libraries to more recent versions. This project successfully used load-time-weaving with spring (4.3.14.RELEASE) together with AspectJ (1.9.0) and Tomcat 8.0.20 under…
Sebastian Götz
  • 459
  • 7
  • 15
2
votes
1 answer

AspectJ with jar classloader

I am trying to instrument Oracle Rest Data Service (ORDS) which is built on Jetty. The aspect should trace JDBC calls. I do not see the weaving happening. I have tried AspectJ in a different standalone application which used JDBC and also profiled…
2
votes
0 answers

Using aspectJ with Cucumber

I am trying to use aspectJ with cucumber project to add conditional statements with cucumber(you may think why.. but I am). It intercepts the cucumber step definitions that I have in my current project but I have dependency jars as well that I want…
2
votes
1 answer

How to use load time weaver in JBoss 6 with Spring 3 for AspectJ?

I tried using AspectJ, Spring 3 and JBoss 6 and ran into the problem that the load time weaving is not working at all. Creating small sample showed that the same war file that has a simple bean and a simple aspect works fine on JBoss 5.1 but does…
ctron
  • 538
  • 3
  • 13
2
votes
2 answers

@SpringBootTest interferes with EclipseLink dynamic weaving

My company is developing a web application using Spring Boot, Spring MVC, JPA with EclipseLink and dynamic weaving. My task is to prepare implementation of UI and integration tests spinning up the application using JUnit and @SpringBootTest and…
cdpm
  • 41
  • 6
2
votes
0 answers

AspectJ Load Time Weaving - Command Line Project

i am struggling since days on a simple project that i just can't get to run. My goal is to extend the functionality of a .jar-File in order to get more information about the inner workings of that jar. The .jar is not open source. I came accross a…
HurrDurr
  • 51
  • 6
2
votes
1 answer

How to compute the disassembly of a Java class at _runtime_?

I'm trying to investigate whether dynamic weaving is being applied to my classes. First, here's some context… It is very easy to prove whether static weaving is occurring. You use javap -c MyCoolEntity to see the disassembly of some Java class…
Birchlabs
  • 7,437
  • 5
  • 35
  • 54
2
votes
1 answer

Spring Cache With Couchbase Using LoadTimeWeaving - Strangely Not Working

I'm adding Spring Cache on an existing spring project using annotations. I'm using Couchbase as cache provider. I want to use load time weaving using AspectJ to allow private method calls and case class method calls to be cached as well. It's been…
Harshil Sharma
  • 2,016
  • 1
  • 29
  • 54