Closed AnujGandhi123 closed 5 years ago
The warnings are due to an incompatibility between Java 9+ and Jython, see http://bugs.jython.org/issue2705. It should be fixed in Jython 2.7.2, so you can try changing the dependency if it's already been released. I don't have time to try it out right now, but if you do, please try it and issue a pull request if it works.
I am not sure if the import error is a consequence of the warnings, but I suspect it might be so. The module "random" is, after all, included in the Jython standard library and therefore imports should really never fail.
Unfortunately, Jython 2.7.2 has not been released yet, so if you need to get this running right now, I think you might have to use Java 8 instead of Java 9.
Do you have a copy of the generated database file in the mean time? I'd like to take a look at that.
Turns out the warnings actually weren't the problem. It was a dependency issue introduced during the migration to Maven. The issue has been fixed with the latest commit 83e6e18. Rebuild using maven (mvn package), then rerun make_apps, and you should be good to go.
genDB -b gen.py trainUniversity WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.python.google.common.base.internal.Finalizer (file:/home/anuj/.m2/repository/org/python/jython/2.5.3/jython-2.5.3.jar) to field java.lang.Thread.inheritableThreadLocals WARNING: Please consider reporting this to the maintainers of org.python.google.common.base.internal.Finalizer WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release Exception in thread "main" Traceback (most recent call last): File "gen.py", line 5, in
from random import choice, randint, shuffle
ImportError: No module named random
i get this error when i run genDB...How do i solve it?