Currently, Ignite on start creates JVM instance internally, but
it never stops it. Also, it currently can not work with already started

So when you start Ignite the first time, it loads JVM, when you stop
and unload it, the JVM remains loaded in process memory. When
you start Ignite again, it discovers that JVM was already loaded, and
as it can not work with pre-loaded JVM, it just returns you the error.

To solve the issue, the following ticket should be implemented [1], but
currently, it is not. As a workaround you may try to call 
JNI_DestroyJavaVM() after you have unloaded Ignite, I'm not sure
of the result though. This is simply is not a use case we have tested.

[1] - https://issues.apache.org/jira/browse/IGNITE-4618

Best Regards,

On Mon, Jan 28, 2019 at 3:49 PM F.D. <free.devel.70@gmail.com> wrote:
Hi Igniters,
I'm trying to use Ignite in a dll (using c++) that is dinamically loaded. I wrapped the method start/end/... bihind a "c" pure interface that I export.

It works quite well. I can call the LoadLibrary and start a Ignite node. I can stop it and restart it again smoothly.

I've the problem when I LoadLibrary and then I call FreeLibrary (and until here it works), but when I try to LoadLibrary again and to start the node, I get the error: Failed to initialize JVM [errCls=, errMsg=JVM already created.]

Do you any ideas why I got this error?