Comments (4)
Hi,
Thanks a lot for the detailed report.
The root cause of the exception that you're facing originates from the improper handling of multiple Metrics annotations for a single method.
I implemented that proper support for multiple Metrics annotation per method in commit 507235c and released version 1.0.0-rc.4
on Maven Central so that you can test the fix.
Let me know if that addresses your error case and if you need further assistance.
from metrics-aspectj.
Hmmm. I upgraded to RC4 but now I can't even get the application to start because I get this error:
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.clarecontrols.licensing.cliq.FusionAPIFactory.build(FusionAPIFactory.java:85)
at com.clarecontrols.licensing.cliq.LicenseServerApplication.run(LicenseServerApplication.java:83)
at com.clarecontrols.licensing.cliq.LicenseServerApplication.run(LicenseServerApplication.java:1)
at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:42)
at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:76)
at io.dropwizard.cli.Cli.run(Cli.java:70)
at io.dropwizard.Application.run(Application.java:72)
at com.clarecontrols.licensing.cliq.LicenseServerApplication.main(LicenseServerApplication.java:46)
Caused by: javax.el.PropertyNotFoundException: ELResolver cannot handle a null base Object with identifier 'this'
at com.sun.el.lang.ELSupport.throwUnhandled(ELSupport.java:68)
at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:126)
at com.sun.el.parser.AstValue.getBase(AstValue.java:151)
at com.sun.el.parser.AstValue.getValue(AstValue.java:200)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
at javax.el.ELProcessor.getValue(ELProcessor.java:129)
at javax.el.ELProcessor.eval(ELProcessor.java:115)
at org.stefanutti.metrics.aspectj.JavaxElMetricStrategy.resolveMetricRegistry(JavaxElMetricStrategy.java:42)
at org.stefanutti.metrics.aspectj.MetricStaticAspect.ajc$after$org_stefanutti_metrics_aspectj_MetricStaticAspect$1$be47261c(MetricStaticAspect.aj:47)
at com.clarecontrols.licensing.cliq.service.impl.FusionAPIImpl.<clinit>(FusionAPIImpl.java:45)
... 8 more
Same configuration and code samples as before. 😦
from metrics-aspectj.
My mistake :-( I added the evaluation of the Metrics registry EL expression at class level though that leads to throwing that error when the class is having both non-static and static methods.
I've just reverted back to the previous behavior in commit a65d064 and added unit tests for that use case.
Would you mind testing your error case based on the head revision of the master
branch before I release a newer version this time? ;-) Let me know otherwise I'll trigger a new release.
from metrics-aspectj.
See #6
from metrics-aspectj.
Related Issues (12)
- v1.0.0 Is Not In Maven Central HOT 2
- @Timed method on base class throws NullPointerException when class is extended HOT 15
- Support histogram via return value and expression language HOT 2
- Gradle usage example would be "nice to have". HOT 3
- About metrics reporter HOT 1
- A metric named "AnnotationService.setSize" already exists HOT 3
- NullPointerException on timed methods with several parameters
- EL Expression is not working with @Metrics annotation HOT 7
- Introduction of default MetricRegistry HOT 1
- Clarify in README whether this plugin actually works with Spring AOP HOT 3
- @Metered doesn't execute the mark HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metrics-aspectj.