Runtime dynamic instrumentation

101 views
Skip to first unread message

Igor Polevoy

unread,
May 13, 2014, 1:13:39 AM5/13/14
to activejd...@googlegroups.com
Hello, community. 

Quite a few people complain about having to run instrumentation for ActiveJDBC projects. While I do not understand all the fuzz, I respect other people's opinions, and as such implemented runtime instrumentation. With it, you no longer need to run instrumentation script before running tests in development environment. Just supply a parameter to the JVM

Please, see details on dynamic instrumentation here: https://github.com/javalite/activejdbc/tree/master/activejdbc-instrumentation

Happy coding!
igor

Keuller Magalhaes

unread,
Jun 13, 2014, 4:10:21 PM6/13/14
to activejd...@googlegroups.com
Hi Igor,

I've tried to use it, but doesn't works. Do you know if has some issue using Java 8 as runtime ?

This is the error:

objc[12496]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

Failed to find Premain-Class manifest attribute in build_libs/runtime/activejdbc-instrumentation.jar

Error occurred during initialization of VM

agent library failed to init: instrument

Regards.

Igor Polevoy

unread,
Jun 14, 2014, 12:17:38 AM6/14/14
to activejd...@googlegroups.com
Keuller, there can be a number of issues here. We recently discovered that dynamic instrumentation has some issues with Java 8 Lambda expressions. 
If you use a model's static method that has been instrumented inside of a lambda expression, it generates an exception. The exception is different from the one you have. 

The exception you are getting tells me that you might  be using the wrong activejdbc-instrumentation.jar file. Where did you get it? 
Dynamic instrumentation is not released yet, and only exists in a snapshot version: https://oss.sonatype.org/content/repositories/snapshots/org/javalite/activejdbc-instrumentation/1.4.10-SNAPSHOT/
Grab one from there and try again. 
Do not forget that for production deployment, we recommend static instrumentaion so you do not need to deploy the Java Agent. 

let us know if this works 

tx
Reply all
Reply to author
Forward
0 new messages