Error opening zip file or JAR manifest missing : /path/to/elastic-apm-agent-1.17.0.jar

I tried giving the same commandas per doc, but getting same error now also . Please help .

Error opening zip file or JAR manifest missing : /Users/bishanjitkumar/Downloads/elastic-apm-agent-1.17.0.jar
Error occurred during initialization of VM
agent library failed to init: instrument

Hi and thanks for your question.

Could you send me the output of this command?

ls -ahl /Users/bishanjitkumar/Downloads/elastic-apm-agent-1.17.0.jar

-rw-r--r--@ 1 bishanjitkumar staff 7.6M Aug 10 20:29 /Users/bishanjitkumar/Downloads/elastic-apm-agent-1.17.0.jar

Hm, that looks fine.

Error opening zip file or JAR manifest missing usually means that the JVM can't locate the jar. Maybe a permission problem or a typo somewhere?

Hi felixbarny,

Thanks for your response . I have tried giving the permission to all by using chmod 777 to the jar file and also i have tried accessing the jar file throught terminal and there is no issue with the path mentioned in the JVM command.

Please note i am getting this error while I am trying the set VM argument to my springboot application on STS.

Thanks & Regards,
Bishanjit Kumar

May STS execute your application in some kind of container that doesn't have access to your downloads folder? What's the output when you do System.out.println(new File("/Users/bishanjitkumar/Downloads/elastic-apm-agent-1.17.0.jar").canRead()); in your application?

false is the output for that execution.

We’re getting closer. Does it exists()?

exists() method returns true.

Then it seems to be a permission problem indeed. Try placing the agent into a different folder. Maybe your project directory.

Hi Felixbany,

Thanks a lot after placing the agent jar file into my project directory the issue is resolved now . Thanks a lot again for your swift support. :innocent: :innocent: :innocent: :innocent: :innocent:

Regards,
Bishanjit Kumar

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.