-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BeanCreationException: Error creating bean #1
Comments
I haven't had time to run all test cases with Automon yet. My spring_woven project actually doesn't use spring to do the monitoring. It instead uses aspectj's Build-time weaving. I would like to work with you to get an example that uses the more traditional spring aop like you are trying to do. Please create a minimal spring project that duplicates the problem and I will look into it as the issue is not clear to me just from your message above. |
"He recognizes only the first argument in runtime (_monitor)." Also, note that the spring_woven example uses aspectj's compiler and not javac. That is defined in the spring_woven pom.xml file. To see if you can get it to work try to copy the spring_woven project and modify it instead of creating a project from scratch. |
Ah, now I see the comment in pom.xml of spring_woven module regarding this specific exception. I'll try to play around and see if anything useful comes out of it. |
Also, you could also copy the whole code from SpringBase and make your own @around method. I think the problem may be that Spring uses a ProceedingJoinPoint and in my base class I use JoinPoint.StaticPart. So if you try to rewrite the following using straight java and @AspectJ annotations that may fix the problem. It is mostly copying and pasting. Once we figure it out I can make any needed changes to Automon. Let me know if you need help. I am on travel right now, but I will have more time to focus on it in a few days.
|
Sorry it took me so long to get around to this, but Automon now works with Spring (automon 1.0.2). I am posting this just in case someone else looks on this thread to see if it was resolved. Here is an example maven module using spring: https://github.com/stevensouza/automon/tree/master/spring_aop Here is how you would define it in your application context file: https://github.com/stevensouza/automon/blob/master/spring_aop/src/main/resources/applicationContext.xml Cheers, |
Resolved and now works with spring. |
Hi,
I'm having an issue with starting my service with automon. I'm not that into aspectj, so I hope you could give me a hint whether my setup is just wrong or something could be improved in automon project.
I get:
in
AbstractAspectJAdvice
has only oneString
inargumentNames
when trying to bindObject around() throws Throwable : _monitor()
fromAutomonAspect.aj
. He recognizes only the first argument in runtime (_monitor
).I'm using spring 3.2.4.RELEASE (which I tested with your spring-woven example - works fine). Instead of using xml based bean definition, I use
org.springframework.context.annotation.Bean
s and pointcuts and aspects.My
ServiceApplicationConfiguration
which is annotated withorg.springframework.context.annotation.Configuration
andEnableAspectJAutoProxy(proxyTargetClass = true)
should load my Aspect which extends yourSpringBase
and defines pointcuts same as you do in spring-woven example. If you have any idea what I'm doing wrong, I'd appreciate the hints.Cheers,
Nikola
P.S. Perhaps it's unclear. I'd see to get some example in my fork with minimal code representing the issue soon.
The text was updated successfully, but these errors were encountered: