OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
python
Python 2.7.12
jython
Jython 2.5.3
and I run OTP 1.2.0 as suggested in the doc:
java -Xmx2G -jar otp-1.2.0-shaded.jar --build otp --inMemory --script script.py
(see enclosed the script and the input data)
and got this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/python/core/PyException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.bsf.BSFManager.getLangFromFilename(BSFManager.java:604)
at org.opentripplanner.scripting.impl.BSFOTPScript.<init>(BSFOTPScript.java:43)
at org.opentripplanner.standalone.OTPMain.run(OTPMain.java:149)
at org.opentripplanner.standalone.OTPMain.main(OTPMain.java:86)
Caused by: java.lang.ClassNotFoundException: org.python.core.PyException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Despite much investigation, I still don't have a clue why this simple case crashes. What am I forgetting?
Thanks,
regards,
Xavier
$ java -cp otp-x.y.z-shaded.jar:jython-standalone.jar org.opentripplanner.standalone.OTPMain --graphs . --script myscript.py
java -Xmx2G -jar otp-1.2.0-shaded.jar --build otp --inMemory --script script.py
Exception in thread "main" java.lang.NoClassDefFoundError: org/python/core/PyException