Salve instrumentation

2 views
Skip to first unread message

dev

unread,
Oct 22, 2008, 3:42:24 AM10/22/08
to Salve
Hello,

I've been trying to use salve in a web application deployed to a
glassfish appserver, I've added the -javaagent jvm option to the
glassfish jvm options and it seems to be running, however I believe I
may have not understand how to configure instrumentation.

I've tried placing salve.xml inside META-INF, with the following
contents:

<config>
<package name="org.devpower.wicket.cms">
<instrumentor
class="salve.depend.DependencyInstrumentor"/>
</package>
</config>

Inside my WebApplication#init() (using wicket):
DependencyLibrary.addLocator(new GuiceBeanLocator(injector));
Then, when I try to inject a dependency in a DataProvider for
example, I always get nullpointer exceptions: @Dependency ISomeService
service; the location of the DataProvider would be:
org.devpower.wicket.cms.widget.text.blog.EntryDataProvider.

What am I doing wrong? regards.

Edgar Merino

Igor Vaynberg

unread,
Oct 22, 2008, 11:05:48 AM10/22/08
to salve...@googlegroups.com
i havent tried the agent inside an application server. which META-INF
did you place salve.xml into? it should be inside your war's META-INF
not the servers.

if you get an NPE it means salve is not instrumenting your classes.
might be because the javaagent doesnt see the classes loaded by
glassfish' class loader.

i would recomment you use the maven2 plugin to instrument your code
instead - before it is deployed into glassfish.

-igor

Reply all
Reply to author
Forward
0 new messages