You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am facing an issue whereby the ClassLoader seems unable to load classes in separate threads.
This is the error I get SEVERE: MASM0010: Unable to unmarshall metro config file from location [ jar:file:/E:/dev/code/java-lib/someapi.java8-12.0.7773.jar!/META-INF/jaxws-tubes-default.xml ]
It is not linked to a particular java version, happens in 8, 11 and 14. It started happening when I upgraded a 3rd party lib, which I have little control over.
I am using jnius 1.3 in python 3.6.6 in Windows 7 64 bit.
returns None in all new threads. And this explains why it cannot find the file which is indeed present in the jar. Maybe the 3rd party lib has changed the exact dynamic of class loading and now does it in each new thread.
Should another thread need to access the Java VM, it must first call AttachCurrentThread() to attach itself to the VM and obtain a JNI interface pointer. Once attached to the VM, a native thread works just like an ordinary Java thread running inside a native method. The native thread remains attached to the VM until it calls DetachCurrentThread() to detach itself.
and below
When a thread is attached to the VM, the context class loader is the bootstrap loader.
👋 We use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.
Let us know if this comment was made in error, and we'll be happy to reopen the issue.
I am facing an issue whereby the
ClassLoader
seems unable to load classes in separate threads.This is the error I get
SEVERE: MASM0010: Unable to unmarshall metro config file from location [ jar:file:/E:/dev/code/java-lib/someapi.java8-12.0.7773.jar!/META-INF/jaxws-tubes-default.xml ]
It is not linked to a particular java version, happens in 8, 11 and 14. It started happening when I upgraded a 3rd party lib, which I have little control over.
I am using jnius 1.3 in python 3.6.6 in Windows 7 64 bit.
After a lot of debugging I noticed that
jnius.autoclass('java.lang.Thread').currentThread().getContextClassLoader()
returns
None
in all new threads. And this explains why it cannot find the file which is indeed present in the jar. Maybe the 3rd party lib has changed the exact dynamic of class loading and now does it in each new thread.One way to fix this is to mirror the Android wrapper, https://github.com/kivy/pyjnius/blob/master/jnius/__init__.py#L76:
but I really think I am missing something here. Does
jnius
require any particular setup to work in multiple threads?The text was updated successfully, but these errors were encountered: