Questions tagged [javaagents]

A Java agent allows for the instrumentation of a Java application by using another Java program that is specified on the command line.

All Java classes concerned with instrumentation are collected in the java.lang.instrument package. The package description defines the layout of a Java agent as follows:

An agent is deployed as a JAR file. An attribute in the JAR file manifest specifies the agent class which will be loaded to start the agent. For implementations that support a command-line interface, an agent is started by specifying an option on the command-line. Implementations may also support a mechanism to start agents some time after the VM has started. For example, an implementation may provide a mechanism that allows a tool to attach to a running application, and initiate the loading of the tool's agent into the running application. The details as to how the load is initiated, is implementation dependent.

538 questions
0
votes
2 answers

Java agents throw ClassNotFoundException when using javassist

I wrote a simple java agent to instrument some activity in java based web applications using the javassist library. The problem is when I attach my agent to the jp2launcher process I'm getting ClassNotFoundException thrown because it cannot find the…
stylo
  • 496
  • 4
  • 12
0
votes
0 answers

java "execute" method to load library

I'm trying to figure out how does the VirtualMachine.loadAgentPath works in a native way, Because of some difficulties I can't use the java code to perform my agent loading and have to make it with native code. I looked into the implementations of…
stylo
  • 496
  • 4
  • 12
0
votes
1 answer

Cannot get mapper or reducer stack trace with Java agent

I'm having a problem with profiling JVM for hadoop using Java agent as in https://github.com/etsy/statsd-jvm-profiler The agent gets stack traces using management API at runtime. The -javaagent argument is specified in the mapred-site.xml file as…
dazzphot
  • 307
  • 1
  • 3
  • 11
0
votes
2 answers

Java Newbie: How to use Java Agent From the Command Line for Instrumentation

I am attempting to load a java agent to use java.lang.instrument.Instrumentation to measure the size of an object. Here is my Java: package com.example.memory.usage; import java.lang.instrument.Instrumentation; import java.util.*; public class…
David Williams
  • 8,388
  • 23
  • 83
  • 171
0
votes
1 answer

java.lang.ClassFormatError: Code attribute in native or abstract methods in class file

I'm instrumenting a code with asm library and receive such error. What does it mean? Does anybody know how it can be fixed? Please, note that i'm skipping interfaces in Agent agentmain method: if (clazz.isPrimitive() || clazz.isInterface() ||…
Iana Mykhailenko
  • 553
  • 5
  • 15
0
votes
1 answer

How to provide jar as javaagent in properties file?

I have a maven repository known as jolokia-jvm.jar. I need to put this as a -javaagent in the properties file, as follows: AppName.JAVA_MEM=-Xms500M -Xmx500M -XX:MaxPermSize=128m -javaagent:jolokia-jvm-1.2.3.jar=port=9001,host=* I have downloaded…
Nagendra Singh
  • 61
  • 1
  • 11
0
votes
1 answer

Issues with a Spring @Configurable class not getting its dependencies autowired

I am trying to configure Load Time Weaving for my Spring Boot app to properly autowire dependencies on a @Configurable java class. Here is my configuration/main class: package com.bignibou; @Configuration @EnableAutoConfiguration(exclude = {…
balteo
  • 23,602
  • 63
  • 219
  • 412
0
votes
0 answers

HttpURLConnection: empty header causing NullPointerException in Notes Java Agent

A couple of months ago I wrote a Java Agent that synchs documents in Notes databases with tickets in a Redmine system. The agent opens a Notes document through an HttpURLConnection and it worked perfectly until two weeks ago (no changes to the code…
0
votes
2 answers

$_SESSION not passing to javascript

This is probably a simple issue but I would appreciate any help I have loaded a $_SESSION variable from my MVC model , its a multidimensional area of latitude and longitude points in a map. here where I loaded this from for($i=0;…
Jan
  • 41
  • 1
  • 8
0
votes
1 answer

-javaagent Eclipse Spring

I have a problem runing my webapp under eclipse using tomcat. It seems to be related to -javaagent argument, so I added the necessary argument like…
user2490936
  • 129
  • 2
  • 14
0
votes
1 answer

NoClassDefException, need to add something in JBoss AS 7

I installed a java agent on my jboss AS 7. But when I run the standalone.bat, it throw NoClassDefException. I find the troubleshooting guide of the agent which says " Also verify whether the application uses OSGi. If it does (as in JBoss 7), add…
Pythagorean
  • 33
  • 1
  • 3
0
votes
1 answer

Where would managed-beans.xml be stored inside a Domino database for use by a Java agent?

I have successfully created a standalone Java application, communication with our Connections server. The endpoint is defined in the src\META-INF\managed-beans.xml while the sbt.properties is stored in the root of the project. I want to move the…
Bob Voith
  • 35
  • 8
0
votes
3 answers

How can I display the result of an LDAP query (in my case a list of OUs), done with some Java code, in a IBM Notes Dialog List?

I'd like to add a list of strings to a Dialog list with an Java agent. Item's value changes but it doesn't show the values on form. Session session = getSession(); AgentContext agentContext = session.getAgentContext(); Database…
0
votes
1 answer

Java : Logging on demand on production

I am working on a legacy software developed in swing and core java. I wanted to add a logging feature in the system where If something goes wrong in production system admin can enable logging without shutting down/restarting application. Admin…
0
votes
1 answer

Advices to correctly manage threads

I have a big Domino Web application, which uses numerous calls "OpenAgent" to Java agents to retrieve data via ajax. The application is used by several users. What are the main parameters that you advise me to check and adjust on server, in order to…
Andrea Baglioni
  • 303
  • 1
  • 2
  • 20