Export data from JVM launch?

This may be a long question, but I ran into a very complex problem, and I'm not sure how to solve it.

In short, we have a Java application that currently uses JDBC to load data from a MysQL database at startup.

We had a crisis, and this database is no longer active and was lost forever, and therefore there is data that together with it will be very valuable.

However, the data is still stored in the heap of the running JVM that inserted it.

My only hope is to somehow extract data from the running JVM, in an ideal world that I could attach to it, and be able to run code that could access internal working classes.

So today my questions are:

  • Is my approach reasonable and feasible?
  • If so, how can I connect to the JVM and "Inject" code

Thanks for reading

+4
source share
2 answers

It seems that you want to use the command jmap. jmapcan be used to dump a heap of a running JVM into a file, which can then be analyzed off-line using tools such as jhator JVisualVM.

, JVM / , "", , , , , , , , , , OV JVisualVM .

., , .

0

Eclipse Memory Analyzer Tool . , . / .

, MAT , VisualVM, , , :

enter image description here

( , heapdump)

, Eclipse . , . - .

0

Source: https://habr.com/ru/post/1628621/


All Articles