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
1
vote
1 answer

AspectJ and Springboot not working together

In my project i want to use pure aspectj in combination with spring-boot While configuring the project we ran into some issues. Found another similar problem but that doesnt help us. This is what we did: got springboot project defined 2 aspects, 1…
Marcel Hinderlich
  • 213
  • 1
  • 3
  • 19
1
vote
1 answer

TomcatLoadTimeWeaver breaks Log4j 2

I have a serious problem with TomcatLoadTimerWeaver and Log4j and I don't know how to solve it. I'm using the following: Tomcat 8 Spring Framework 4.1.2 Log4j 2.1 SLF4J 1.7.7 EclipseLink 2.5.2 All logging is routed to SLF4J, and I'm using Log4j…
Mauro Molinari
  • 1,246
  • 2
  • 14
  • 24
1
vote
1 answer

AspectJ load time weaving isn't work

I want to configure my spring project to work with AspectJ load time weaving. I've done following: added a in my application contex added aspectj in cache added lines in my pom.xml
kraken
  • 484
  • 7
  • 18
1
vote
1 answer

AspectJ load time weaving not working for Spring beans

I am facing the same issue as: AspectJ load time weaving not working on Spring beans The solution of returning 'Object' is working, but I don't know the reason. I have gone…
Azazle
  • 37
  • 1
  • 9
1
vote
4 answers

How to run Spring LoadTimeWeaving for JPA Repository

I am trying to add Repository support to an Eclipselink JPA Spring project. Eclipselink requires LoadTimeWeaving - even though that's not absolutely true I'd later like to get Aspects working as well. The production application runs under Tomcat,…
Terry
  • 911
  • 10
  • 26
1
vote
1 answer

EnableLoadTimeWeaving did not weave other config in web application context

I try to use spring weblogic LTW in my project to do some aop stuff. my project is a simple webapp servlet2.5 use spring mvc 3.2.6, running on weblogic 10.0. I have following app level configuration setup in…
huahua
  • 285
  • 2
  • 5
  • 17
1
vote
1 answer

How to autowire classes in unmanaged instances?

I have a class that gets created within server startup. It serves as entry method for the client application. I cannot change this behaviour. Though I'd like to use Spring @Autowired inside this unmanaged class. I read that aspectj weaving might be…
membersound
  • 81,582
  • 193
  • 585
  • 1,120
1
vote
1 answer

AspectJ not seeing META-INF/aop.xml

I am trying to get Load Time Weaving working with my Tomcat 7 webapp, in order to weave a class from an external jar file (located in WEB-INF/lib). I have done the following: Started Tomcat with the following parameters:…
Val Blant
  • 1,664
  • 2
  • 24
  • 34
1
vote
1 answer

Is there any solution about Load Time Bytecode Transformation without specify javaagent option in java command line

As an Open Source Lifecycle Framework API provider, I want to try my best to hiding internal designs with an implicit manner to Provide Lifecycle API, so that will bring much more convenience to API Client. It is expected to avoid doing…
Barry Zhong
  • 470
  • 3
  • 17
1
vote
1 answer

How to use AspectJ load time weaving with Tomcat? (without Spring)

I want to pass AspectJ load time weaving JVM arguments when starting tomcat server from commandline, something like this: "%JAVA_HOME%\bin\java" -ea %_DEBUG% -Duser.dir="%CATALINA_HOME%\bin" -DTEST_PLUGINS_HOME=%TEST_HOME%\plugins …
1
vote
0 answers

Spring Tomcat6 "No LoadTimeWeaver available" Error on Code configured webapp context

I'm developing a Spring 3.2.1 based webapp (RestFull Services) to be deployed on a Tomcat 6 server. Because of Jpa, Transaction and features from other custom dependency projects I have to enable loadTime weaving. To do so first I configured my…
AleZ
  • 31
  • 4
1
vote
0 answers

Any OpenJDK equivalent to JRockit's Weaving/AOP API?

I'm rather impressed by what I see of JRockit's built-in weaving/AOP support. Is there any similarly-easy-to-use support for AOP weaving on OpenJDK? The code I am trying to instrument is often loaded via Maven, so hooking in to classloaders to e.g.…
Michael Ekstrand
  • 28,379
  • 9
  • 61
  • 93
1
vote
2 answers

Load Time Weaving on classes not within my project

I'm trying to use Spring to provide load time weaving to several classes in a project I've created. I'm having trouble getting it to work when I call a class that is not within my local project. I created a class named ExampleClass and when I…
Nicholas
  • 7,403
  • 10
  • 48
  • 76
0
votes
0 answers

AspectJ LTW with "second" aop.xml file

I recently started using AspectJ LTW. I use Eclipse with the AJDT. I basically use the "outjar" option to create my "AspectJ Library (.jar file)" with the compiled .aj files. Next step is to use this jar file within a "normal" Eclipse Java project…
Domi
  • 1,451
  • 2
  • 13
  • 25
0
votes
1 answer

spring web app monitor newrelic conflicts loadtimeweaver with entity manager

A Spring web application is required to be monitor with newrelic. spring-agent is being load as loadTimeWeaver , spring agent uses for jpa load enhane and custom config ,when spring-agent and newrelic configure to load with java_opts, when…
andare
  • 21
  • 6