-
Notifications
You must be signed in to change notification settings - Fork 183
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
Failure to start JVM with jpype 1.5.1 on Windows #1242
Comments
Do you happen to know the path to the org.jpype.jar? If it is locatable and on the path, then the next issue is why java.instrument is missing. |
I'll try to find out (I don't have access to Windows at home) and I'll report! |
Maybe some new information! I have reproduced the issue on another machine.
Then:
Fiddling around I noticed
So I moved my jdk-17 to a similar place, and it worked!
Now.... what is wrong with the previous jdk-17 path? I have no idea and I hope you can figure out! |
It sounds like someone has shipped a partial copy of the JVM. There are lots of reasons that that can happen, though there is never a guarantee we will run without a full JVM. It must be JE only version. I will have to have to make some options to catch that case.
|
It seems like the best plan would be to make agent an option rather than the default and add logic to specifically add org.jpype to the classpath automatically. Our original solution was bad because our module was a second class citizen cause we were never loaded into the main system class loader. This always presented a problem because I run my testing with org.jpype on the classpath which meant I was constantly getting better results than typical runs. I tried to rectify this by loading as agent which has the huge advantage that we guarantee to load first, and we can register ourselves as the controlling module. Running as an agent is a privileged position, but it requires java.instrumentation module which apparently some distributions are shipping without.
The problem is that we have thus created a new requirement and someone is shipping out stripped down copies of the JVM. Stripped down copies are for light installs and typically used when you are serving just one application thus you know in advance all the classes that need to be provided. There was NEVER a guarantee that JPype will run with a stripped down JVM. It is always subject to breakage because at any time we may add a new call to org.jpype and if stripped down JVM doesn’t have it then it will fail.
So the logic choice is try to get everything working as a first class citizen and do a 1.5.2 release. I am guessing a month or so depending on my availability over the holidays. In the meantime either 1.5.0 or if Python 3.13 is required then we must use a full copy of the OpenJDK.
|
I just did a bit of testing and it seems the problem is actually occurring on a full OpenJDK from https://jdk.java.net/23/. This is not the distro I typically use but I bet a lot of people do. UPDATE: Actually something else weird might be going on in my case....OpenJDK may be fine after all. |
The real issue is looking like a conflict between 2 different versions of Java being used at the same time...one on the PATH, and a different one on JAVA_HOME. |
I may have an appropriate fix. It seems to be an issue that has been present in jpype for a long time and the changes in 1.5.1 just only caused it to appear. I'll give it a go tonight. |
A temporary workaround that I've confirmed works is to ensure that your |
@ryanmkurtz Please test with #1245 @astrelsky I put a PR that fixes it on my side, but as I still don't know the exact origin of the problem there are still questions. I am going to also take a shot at the non-ascii path issue in the same go. |
I can test on Friday. |
In case it's useful, although it looks like it's been solved, but this wasn't the case for me.
|
I also see reports of some failures on osx. So clearly there is more than one issue. We are currently guessing:
We have two PR addressing these. Hopefully there isn't a third. |
jpype version 1.5.1 fails to start the JVM on Windows for currently unknown reasons. See #70 and jpype-project/jpype#1242.
Just doing a quick check in on the progress of JPype 1.5.2 to address this issue. |
With 1.5.0 on this env I could start the JVM.
Updating to jpype 1.5.1 it fails:
The text was updated successfully, but these errors were encountered: