Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to find Agent-Class manifest attribute from jolokia-agent-jvm-2.0.2.jar #667

Closed
davsclaus opened this issue Mar 22, 2024 · 3 comments

Comments

@davsclaus
Copy link

This is from META-INF/MANIFEST.MF in jolokia-jvm-1.7.2 JAR

Manifest-Version: 1.0
Premain-Class: org.jolokia.jvmagent.JvmAgent
Archiver-Version: Plexus Archiver
Built-By: roland
Agent-Class: org.jolokia.jvmagent.JvmAgent
Can-Redefine-Classes: false
Can-Retransform-Classes: false
Can-Set-Native-Method-Prefix: false
Created-By: Apache Maven 3.8.6
Build-Jdk: 1.8.0_352
Main-Class: org.jolokia.jvmagent.client.AgentLauncher

And this is from META-INF/MANIFEST.MF in jolokia-jvm-agent-2.0.2 JAR

Manifest-Version: 1.0
Created-By: Maven JAR Plugin 3.3.0
Build-Jdk-Spec: 17
@davsclaus
Copy link
Author

@grgrzybek it seems maybe those manifest headers are no longer in the build, and that they should be added back

@davsclaus
Copy link
Author

Ah sorry my mistake - I forgot to specify the classifier = javaagent

@grgrzybek
Copy link
Contributor

@davsclaus there's an important change in 2.x. See:

There's a problem in 1.7.x (not in 1.6.x) that agent-jvm without classifier is actually the one with shaded libraries and it causes problems in Maven (has both shaded libraries and dependencies).

If you need agent - the library with proper manifest, you need org.jolokia:jolokia-agent-jvm library with javaagent Maven classifier:

<dependency>
    <groupId>org.jolokia</groupId>
    <artifactId>jolokia-agent-jvm</artifactId>
    <version>2.0.2</version>
    <classifier>javaagent</classifier>
</dependency>

See:

Manifest-Version: 1.0
Created-By: Maven JAR Plugin 3.3.0
Build-Jdk-Spec: 17
Agent-Class: org.jolokia.jvmagent.JvmAgent
Can-Redefine-Classes: false
Can-Retransform-Classes: false
Can-Set-Native-Method-Prefix: false
Main-Class: org.jolokia.jvmagent.client.AgentLauncher
Premain-Class: org.jolokia.jvmagent.JvmAgent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants