Hi,
I'm running into an odd problem with m2e and AJDT. With Andy's help on the
SpringSource STS forum, I think I have managed to isolate the problem a
little better, but not sure if I am encountering a bug, or if there is
something I am missing in my Eclipse configuration.
My original thread
Hi,
I'm trying to wrap a LTW aspect around a third-party webapp to do some
debugging/profiling. I have no access to change/modify the code, but at
least I was hoping to see where/why some things were happening. The
webapp is running under a Tomcat 6.0.35 server.
I tried to write up a small,
I've got a Spring-MVC 3.2.4 mavenized project, where I've run into the need
to weave an Aspect into a Spring-MVC class. I'm able to run the aspect and
the webapp through Eclipse without any problems (Tomcat), but when I try to
package the war from the command line, AspectJ throws a whole bunch of
then it won't be looking at all the calls made
everywhere.
cheers,
Andy
On 14 November 2013 19:58, Eric B ebenza...@gmail.com wrote:
I've got a Spring-MVC 3.2.4 mavenized project, where I've run into the
need to weave an Aspect into a Spring-MVC class. I'm able to run the
aspect
I'm using Roo 1.2.4 which has generated a bunch of aspects for my entities.
Everything compiles properly and works as expected. Code completion while
editing my main classes works properly.
However, whenever I try to work in my unit tests, Eclipse does not seem to
pick up any of the aspects.
be at fault but nothing in the problems view and
errors in the editor indicate it is AJDT.
Andy
On 4 December 2013 08:51, Eric B ebe...@hotmail.com wrote:
On 13-12-04 11:24 AM, Eric B wrote:
I'm trying to attach a screenshot of my eclipse window to illustrate
what I mean. I don't know
On Tue, Mar 11, 2014 at 3:41 PM, Matthew Adams matt...@matthewadams.mewrote:
I think what you mean on the declare @type is the following. I don't have
an IDE in front of me right now, but I think you're missing the rest of the
type pattern. Notice the missing * (highlighted).
declare
I'm using Roo and Compile Time Weaving for my application. One of the
classes that Roo has generated is my `UserIntegrationTest`:
@RooIntegrationTest(entity = User.class)
@WebAppConfiguration
@ActiveProfiles(test)
@DirtiesContext
@RequiredUserDetails(roles=Role.ROOT)
This is both a Spring and AspectJ question. I'm having trouble configuring
AspectJ aspects with Spring and JavaConfig. According to Spring's
Documentation (
http://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/aop.html#aop-aj-configure)
in order to configure an aspect for
) that was
the pre java5 form of the class. Those helper methods just call the real
aspectOf() under the covers which should have been added via LTW by the
time you make the invocation.
cheers,
Andy
On 3 April 2014 21:16, Eric B ebenza...@gmail.com wrote:
This is both a Spring and AspectJ
Hi Andy,
Have you had a chance to look at this at the sample application at all (
https://github.com/benze/AspectJUnitTestError)? Is this an aspectJ bug or
a limitation? Or am I doing something wrong?
Thanks,
Eric
On Thu, Apr 10, 2014 at 3:08 PM, Eric B ebenza...@gmail.com wrote:
Hi Andy
a chance to have a look. Probably worth logging
an AspectJ bug in bugzilla so it is appropriately tracked as an issue.
cheers,
Andy
On 17 April 2014 21:44, Eric B ebenza...@gmail.com wrote:
Hi Andy,
Have you had a chance to look at this at the sample application at all (
https://github.com
...@gmail.com wrote:
Hi,
Sorry, I just haven't had a chance to have a look. Probably worth logging
an AspectJ bug in bugzilla so it is appropriately tracked as an issue.
cheers,
Andy
On 17 April 2014 21:44, Eric B ebenza...@gmail.com wrote:
Hi Andy,
Have you had a chance to look
Hi Erik,
I'm a little confused as to what you are trying to accomplish. Are you
trying to get access to a Java bean from within your Aspect? Can you not
use a factory-style approach to access it? Is the bean a singleton?
The aspect isn't anything magical; from what I know, you have to use
Hi Erik,
I hope you don't mind, but I've copied my answer to this in StackOverflow
b/c I think you might get more extra traction there than you will in this
mailing list.
(
http://stackoverflow.com/questions/23511287/injecting-a-component-in-an-aspect-in-a-non-spring-environment
)
Without
I'm trying to write a pointcut which will intercept getters for annotated
members.
public class MyClass {
private String volume;
@MyAttribute
private Validity validity;
public void setValidity( Validity obj ){
validity = obj;
}
public Validity getValidity(){
After playing around with AspectJ, I finally rediscovered the join point I
was looking for:
pointcut embeddedGetter() : get( @MyAnnotation Validity *..* );
Thanks,
Eric
On Mon, Jul 7, 2014 at 9:38 PM, Eric B ebenza...@gmail.com wrote:
I'm trying to write a pointcut which will intercept
I've got the following issue that I am trying to solve with AspectJ.
Given an entity class with a null @Embedded field, when trying to access it
with a getter, instantiate it first if it is null.
For example:
@Entity
public class MyClass {
@Id
private long id;
@Embedded
private
();}
}
*return* value;
}
Andy
On 8 July 2014 04:34, Eric B ebenza...@gmail.com wrote:
I've got the following issue that I am trying to solve with AspectJ.
Given an entity class with a null @Embedded field, when trying to access
it with a getter, instantiate it first if it is null
?
-Archie
On Tue, Jul 8, 2014 at 10:35 AM, Eric B ebenza...@gmail.com wrote:
Thanks Andy,
That's what I was thinking as well. However, one thing that I haven't
been able to find is how to get the type of obj that needs to be
instantiated.
Currently, it is a Validity object. However, if I
I've posted this question on StackOverflow (
http://stackoverflow.com/q/24786391/827480), but am sending it here as well
as not everyone monitors StackOverflow.
have the need to log any changes to fields in an entity - whether it is a
String change, or addition/deletion to a collection/map.
On Wed, Jul 16, 2014 at 10:31 PM, Eric B ebenza...@gmail.com wrote:
I'm trying to write a pointcut against a Collection.add() method given a
specific type of argument, but everytime I specify the argument type the
pointcut fails to advise.
Given the following code:
ListString x = new
With AJ 1.8 released and Luna released, is there a new AJ development tools
plugin released for Luna as well?
I checked the AJDT site (http://www.eclipse.org/ajdt/downloads/) and it
only lists AJDT 2.2 for Kepler (4.3) and nothing for Luna.
Is AJDT 2.2 sufficient to work with AJ1.8?
Thanks,
a pretty nasty race condition.
I'm not quite sure which team to discuss this with - if it is an ajc issue,
or a lombok issue.
Thanks,
Eric
On Wed, Sep 17, 2014 at 11:27 PM, Eric B ebenza...@gmail.com wrote:
I'm trying to use Lombok (http://projectlombok.org/) in an AspectJ
project
on both java and
aspectj builders to get it to work a little better. the java builder
allowing lombok to run then AspectJ running afterwards but that sounds
pretty ugly so I've never tried it.
cheers,
Andy
On 17 September 2014 20:27, Eric B ebenza...@gmail.com wrote:
I'm trying to use Lombok
on the lombok code to replace occurrences org
org.eclipse.jdt. with org.aspectj.org.eclipse.jdt. might get it into a
working state.
cheers,
Andy
On 18 September 2014 09:41, Eric B ebenza...@gmail.com wrote:
Hi Andy,
Your reply just came in as I was writing my addendum. I ran across the
following
I'm trying to use @DeclareMixin for the first time, and either I am doing
something incorrect, or there is a bug somewhere.
I've published my sample code to github:
https://github.com/benze/AspectJError.git. I'm pasting the little bits
here as well.
If I look at the compiled code of
Hi,
I've got the following base class that I would like to change to a Mixin
aspect instead.
abstract public class BaseServiceImplT implements BaseServiceT {
abstract protected BaseRepositoryT getRepo();
public void save(T entity) {
getRepo().save(entity);
}
public
This is a followup to my previous thread:
https://dev.eclipse.org/mhonarc/lists/aspectj-users/msg14782.html
I think I have found the problem that I am having to be m2e-connector
related. This would obviously imply an Eclipse integration issue and not
an AspectJ issue as such.
But who is
wrote:
Hi Eric.
Please find my answer at http://stackoverflow.com/a/30954233/1082681.
Basically I have added a default M2E lifecycle mapping for AspectJ Maven
Plugin and now it works.
Enjoy
--
Alexander Kriegisch
http://scrum-master.de
Eric B schrieb am 20.06.2015 21:43:
Hi
as well.
Is there no way in Eclipse to differentiate which files are tests and which
are src?
Tx,
Eric
On Fri, Jun 19, 2015 at 9:32 PM, Eric B ebenza...@gmail.com wrote:
Hi Andy,
Thanks for the reply. Are you saying that there is no way in Eclipse to
differentiate which are test classes
.
Regards
--
Alexander Kriegisch
http://scrum-master.de
Eric B schrieb am 18.06.2015 20:25:
I posted a question on StackOverflow, but haven't received much traction
there, so I thought I would check with people on this list as well.
I'm having trouble with Eclipse weaving aspects from my
out encapsulation that it
> can't really keep, but then OTOH any time you bring in byte code
> manipulation all bets are off - after all, that's what byte code
> manipulation is for.
>
> HTH
> Jaime
>
> *From:* Eric B <ebenza...@gmail.com>
> *Sent:* Sunday, 8
t; to threads in this case?
>
> From my understanding so if a user going to access the webpage, then he or
> she needs to "somehow" pass on this id to MDC, then I believe it works as
> required.
>
> Correct me if I'm wrong.
>
> Anto.
> On 5 Nov 2015 16:10, &q
I have originally posted this question on StackOverflow (
http://stackoverflow.com/q/33576324/827480) as a Spring question, but the
more I investigate the more I feel that it is something due to AspectJ
weaving.
I have a bunch of JUnit tests that all function individually. Each one is a
true
What logging platform are you using?
If you are using Log4j, you can use the MappedDiagnosticContext (MDC) class
https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/MDC.html.
This is managed on a per-thread basis, so you can assign an ID in the MDC
as part of a request listener, and any
h better answer for you, as usual. :-)
>
> Regards
> --
> Alexander Kriegisch
> https://scrum-master.de
>
>
> Am 21.08.2016 um 23:01 schrieb Eric B <ebenza...@gmail.com>:
>
> Hi Alex,
>
> Actually, there are some struts classes I want to advise. But I hav
085585.n4.nabble.com/how-to-UML-aspects-td2078998.html
>
> A recent article that I did not yet study is:
> http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4130365/
>
>
> HTH, dsp
>
>
> Am 30.08.2016 um 20:33 schrieb Eric B:
> > Thanks, but unfortunately I fear tha
dience.
>
> cheers,
> Andy
>
> On 26 August 2016 at 18:52, Eric B <ebenza...@gmail.com> wrote:
>
>> Does anyone have any good examples/references for diagrams/documentation
>> of Aspect libraries?
>>
>> I just finished writing a bunch of logging aspects
I'm using AspectJ 1.6 with JBoss 4.2.1 configured with LoadTimeWeaving.
I have added the aspectjweaver.jar to the startup parameters:
-javaagent:c:/dev/Java/aspectj1.6/lib/aspectjweaver.jar
AspectJ is properly loaded and indeed is weaving my classes as
desired/expected. However, any weaveinfo
Does anyone have any good examples/references for diagrams/documentation of
Aspect libraries?
I just finished writing a bunch of logging aspects that cross-cut into the
application and would like to document them as much as possible for the
less knowledgeable. Although the code itself is well
wrote:
> I think if you don't want to fork then you need to just increase the
> memory provided to the overall ant launch.
>
> http://allscm.com/archives/how-to-increase-heap-size-for-
> ants-outofmemory-error-using-ant_opts.html
>
> cheers
> Andy
>
> On 26
I'm not the biggest fan of Ant, but I need to use if for this project.
However, I'm getting the following error message in my build script:
_compile:
[mkdir] Created dir: C:\dev\Projects\hotfix\aspects\dist\compile
[echo] Java target: 1.6
[iajc] maxMem ignored unless forked: 256m
;
Where OM is the interface to the EJB bean:
@PermitAll
@TransactionAttribute(TransactionAttributeType.NEVER)
public List getThirdPartyOrgsForLogin(String username,
BusinessContextInfo contextInfo) throws IzoneBusinessException {
...
...
}
Any ideas what I can do?
Thanks,
Eric
On Sun,
"username = "+username);
> }
> }
> ---
>
> prints
>
> username = fooname
> username = barone
>
> Please raise an issue on: https://bugs.eclipse.org/
> bugs/enter_bug.cgi?product=AspectJ
>
> I'm suspecting the pointcut validation and rewriting that go
ame into the MDC
MDCUtils.setUsername(username);
}
Not surprisingly, this produces the exact same results.
Is this a bug, or just me doing this incorrectly?
Thanks,
Eric
On Tue, Dec 13, 2016 at 3:25 PM, Eric B <ebenza...@gmail.com> wrote:
> Hi,
>
> I just posted this on StackOverflow, but then real
Hi,
I just posted this on StackOverflow, but then realized I might have better
success asking a specific question like this here:
I've got an pointcut that I am trying to use with LTW. I have 2 methods
that I am trying to advise, each with a different parameter list. However,
they both have a
I'm trying to use cflow to limit the scope of my pointcut, but it when I
add the cflow argument, the pointcut is not intercepting the call at all.
In my build process, the cflow target is not part of the weaving at all.
Does the cflow target need to be part of the build/weave process? Or is my
. Hell, if I was not so busy, I would
> even like to give it a try myself. :-)
>
> Good luck
> --
> Alexander Kriegisch
> https://scrum-master.de
>
>
> Am 07.10.2017 um 19:49 schrieb Eric B <ebenza...@gmail.com>:
>
> While I don't disagree with your answer, I dont have t
t see why not). There is a 1.8.11 you could also
> try but the packaging has not changed there. I am confused why the check
> above is failing for you. You could raise an issue but without being able
> to recreate I'm not sure how I'd diagnose things. What JDK are you running
> the
I'm trying to use LTW in Wildfly 10, and running into an interesting
quandry with the classloader/module structure. In WF10, class loading is
based on modules that have to define explicit dependencies on other modules
(similar in concept to Jigsaw classloader I believe).
So in order to launch my
her module which requires noverify in the first
place. Generating broken bytecode does not sound like a wise approach to me.
--
Alexander Kriegisch
> Am 07.10.2017 um 02:55 schrieb Eric B <ebenza...@gmail.com>:
>
> I'm running into a problem with AspectJ 1.8.10, and not sure how to
r
Just a quick followup - this is JEE application - NOT a Spring application,
if that makes any difference to enabling LTW dynamically.
Thanks,
Eric
On Tue, Oct 17, 2017 at 11:54 AM, Eric B <ebenza...@gmail.com> wrote:
> Hi,
>
> I recently read something on a Redhat
nt accepted my corresponding patch a while
> ago.
>
> See https://www.eclipse.org/aspectj/doc/released/README-187.html.
>
> Regards
> --
> Alexander Kriegisch
> https://scrum-master.de
>
>
> Am 17.10.2017 um 17:56 schrieb Eric B <ebenza...@gmail.com>:
>
>
little while. And if there isn’t a ticket, things tend to fall
> off the radar I’m afraid… (And I don’t recall seeing one).
>
> cheers,
> Andy
>
> On Oct 20, 2017, at 10:37 AM, Eric B <ebenza...@gmail.com> wrote:
>
> Hi Andy,
>
> Was anything ever done about this, or
So this is probably more of a Wildfly question than an AspectJ question as
such, and I have already asked the Wildfly team about it, but I thought I
would try to get additional clarity from the AJ pros to understand exactly
how the LTW agent works.
My use case is that I want to use use AspectJ to
ndition. You could turn
> on verbose output for LTW and see if the things you are expecting to get
> modified *are* modified.
>
> cheers,
> Andy
>
> On 11 June 2018 at 14:07, Eric B wrote:
>
>> I have a multi-module EAR application that is comprised of:
>> - EJB jar
Basically annotation style just hasn't got equal test coverage
> with code style so we are going to hit things like this occasionally.
> Excluding via @Aspect annotation is quite a clever workaround :)
>
> Andy
>
> On 13 June 2018 at 19:02, Eric B wrote:
>
>> I ha
I have a multi-module EAR application that is comprised of:
- EJB jar
- WAR
- aspect library
- supporting libs
My AspectJ library is designed to be used as LTW; it has pointcuts
targetting some of the 3rd party libs.
I have now created a new jar module in which I would like to use CTW. I
have
n exclude in the weaver XML for that
> ClientErrorExceptionHandler - if excluding it entirely is the reweavable
> state ignored?
> - run with overweaving on - should avoid reweavable processing.
>
> I’m not saying there isn’t a problem here just collecting more data points
> and look
Hi Andy,
Was anything ever done about this, or a ticket opened for it? I'm running
AJ 1.8.10 and still seeing the same behaviour, so I figure it was probably
never addressed (ticket or otherwise).
Thanks,
Eric
On Thu, Oct 6, 2016 at 3:49 PM, Eric B <ebenza...@gmail.com> wrote:
> Ok
"file:")) {
> *try* {
> String fpath = *new* URL(nextDefinition).getFile();
> File configFile = *new* File(fpath);
>
> If you just run default then it will be making calls to getClassLoader().
> getResources(name); for those three variants above. So you are at the
> mercy of whatev
; cheers,
> Andy
>
>
> On Oct 26, 2017, at 11:37 AM, Eric B <ebenza...@gmail.com> wrote:
>
> Thanks for the info. I've been digging through AJ and WF code some more
> to try to figure this out, but am still not sure how the classloader is
> working. I'm s
Kriegisch
> https://scrum-master.de
>
>
> Eric B schrieb am 12.07.2018 23:22:
> >
> > I'm trying to figure out a way to inject dependencies into an Aspect that
> > is running under Wildfly 10 with CDI.
> >
> >
> > From what I can tell, by definition,
I'm trying to figure out a way to inject dependencies into an Aspect that
is running under Wildfly 10 with CDI.
>From what I can tell, by definition, I need to have a no-argument
constructor in the Aspect, which already implies AJ cannot support the
constructor injection pattern. Please correct
> logging or tracing. For aspects which are designed to only be used after
> the
> > application is already wired up, you might have a chance. Someone else
> might be
> > able to help you there. Does it work for you if you ask some kind of
> factory to
> > provide you with a dep
I'm using aspectj 1.8.13 LTW'ing with Wildfly 10. Generally speaking,
everything is working as expected. However, I have recently added in a new
Pointcut which is causing core dumps by the weaver:
2018-11-15 14:56:30,033 SEVERE [org.aspectj.weaver.loadtime.Aj]
I've tried to write a pointcut that combines a couple of different
cflow()/cflowbelow() together, but it does not seem to work as expected.
That is, the advise is still being executed even though one of the cflow()
pointcuts is clearly in the stacktrace.
My pointcut in question is:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=541325
>
> I can give you a dev build with that in if that would be useful, I wasn’t
> planning on an imminent 1.9.3 (this would be fixed in 1.9 line, not the 1.8
> line)
>
> cheers,
> Andy
>
> On Nov 16, 2018, at 8:19 AM, Er
ps://www.eclipse.org/aspectj/doc/released/README-184.html
> [3]
> http://git.eclipse.org/c/aspectj/org.aspectj.git/tree/org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypeCategoryTypePattern.java#n35
>
>
> --
> Alexander Kriegisch
> https://scrum-master.de
>
>
> Eric B schrieb
you provide the code of UserAccount.getAccountOwner().
> >
> > Regards
> > --
> > Alexander Kriegisch
> > https://scrum-master.de
> >
> > Eric B schrieb am 25.11.2018 19:59:
> >>
> >>
> >> I've tried to write a pointcut that
I've got a JEE application with some performance issues. I suspect that it
is due to MQ listeners (MessageDrivenBeans) that are not executing enough
threads concurrently and figured that an easy way to validate my theory
would be to write a quick Aspect to profile the number of threads being
t; your assumptions? Or profiling tools like VisualVM? Anyway, this one is
> interesting purely from an AOP perspective. ;-)
>
> Kind regards
> --
> Alexander Kriegisch
> https://scrum-master.de
>
>
> Eric B schrieb am 11.02.2019 00:13:
>
> I've got a JEE application w
I remember trying to get Lombok to play nice with AspectJ several years
back and failed miserably. While it can be used for basic enhancement (ex:
around, before pointcut, etc) trying to use it with mixins was a total
failure as Lombok needed to use AJC to compile the code (chicken and egg
thing
I'm using the JCache API, in which a design decision made by the JSR-107
team in implementing the Reference Implementation is causing me a
significant headache. The class in question is:
org.jsr107.ri.annotations.cdi.CacheLookupUtil from package org.jsr107.ri:
cache-annotations-ri-cdi:1.1.0.
't use an "execution" pointcut expression -- you want a "call".
>
> On Aug 8, 2019, at 9:20 AM, Eric B wrote:
>
> I'm using the JCache API, in which a design decision made by the JSR-107
> team in implementing the Reference Implementation is causing me a
>
>
> Now as you can see, the no-args resolver factory constructor is still
> executed but the resulting object is no longer assigned to the member
> because the advice proceeds with the object you want to be assigned instead.
>
> If you want to be very specific in your asp
Hi,
I've been forced to revisit a hackish approach that I put together to get
AspectJ working in Wildfly a couple of years ago, It led me to this ticket:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=502093
Looking through the code on github, I see that the Jdk14Trace.jav
g.aspectj.tracing.factory". This also means that
> you can override it and choose a different implementation.
>
> Regards,
> Andrei
>
> On Fri, Nov 27, 2020 at 12:40 AM Eric B wrote:
>
>> Hi,
>>
>> I've been forced to revisit a hackish approach that I pu
ctjtools
> ${aspectj.version}
>
>
>
> ...
>
>
> Besides, your module does not need aspectjweaver for CTW, only for LTW. So
> you can eliminate that from your dependency list and just keep aspectjrt.
>
> Cheers
> --
I've been away from AJ for a while, but needed to add it to my Java 17
project recently. This i my first time trying to use AJ with Java 11+.
I tried adding the aspectjrt and weaver dependencies to my POM and enabling
CTW using the aspectj-maven-plugin as follows:
org.aspectj
aspectjrt
81 matches
Mail list logo