-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Java class fails to load #1972
Comments
its probably missing a .jar dependency - which should be reported better in latest 1.7.x |
Thanks for your response! I don't think it is a .jar dependency as the linked jar file is a standalone release. I can still reproduce the problem with current versions: Script: require 'java'
require 'josm-snapshot-10130.jar'
op = org.openstreetmap.josm.data.osm.OsmPrimitive Error:
Jar file download: https://josm.openstreetmap.de/download/josm-snapshot-10130.jar Environment:
|
OK, thanks for the feedback - was able to reproduce this time. |
still the cause seems to be the .jar itself (NPE) and seems to have nothing to do with JRuby :
|
converting the ruby script into a java class words :( but
also works with jruby. not sure where this extra method is called when running java and why we miss it in JRuby |
kares: You are right, it is a NPE in the Java code. It works with proper intialization. Sorry for the noise, the error message was misleading me, especially the "method_missing" bit. Given the stack trace you posted, I would have figured it out. mkristian: Cannot reproduce, I get the same error in Java code (changing abstract class OsmPrimitive to subclass Node): public static void main(String[] args) {
Node n = new Node();
} error:
|
@bastik right, maybe my java class did not run the |
@bastik yes the cause in this case got hidden - generally adding |
Trying to load a Java class from jruby results in an error.
Script:
Error:
Observations:
OsmPrimitive
are also affectedOsmPrimitive
work fineHow to reproduce:
Environment:
The text was updated successfully, but these errors were encountered: