Giter Site home page Giter Site logo

Comments (4)

astefanutti avatar astefanutti commented on May 12, 2024

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.

gresrun avatar gresrun commented on May 12, 2024

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.

astefanutti avatar astefanutti commented on May 12, 2024

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.

gresrun avatar gresrun commented on May 12, 2024

See #6

from metrics-aspectj.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.