Skip to content
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

error while importing oscP5 #367

Open
joachimheintz opened this issue Oct 8, 2022 · 5 comments
Open

error while importing oscP5 #367

joachimheintz opened this issue Oct 8, 2022 · 5 comments

Comments

@joachimheintz
Copy link

i have oscP5 installed, and it works in java code.
but for any simple code in processing.py, for instance ...

add_library('oscP5')
def setup():
size(400,400)

... i get this error:
java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
at jycessing.LibraryImporter.addJarToClassLoader(LibraryImporter.java:315)
at jycessing.LibraryImporter.recursivelyAddJarsToClasspath(LibraryImporter.java:164)
at jycessing.LibraryImporter.addLibrary(LibraryImporter.java:140)
at jycessing.LibraryImporter$1.call(LibraryImporter.java:82)
at org.python.core.PyObject.call(PyObject.java:480)
at org.python.core.PyObject.call(PyObject.java:484)
at org.python.pycode._pyx54.f$0(oscP5_python.pyde:1)
at org.python.pycode._pyx54.call_function(oscP5_python.pyde)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1614)
at org.python.core.Py.exec(Py.java:1658)
at org.python.pycode._pyx53.f$0(/home/jh/sketchbook/oscP5_python/oscP5_python.pyde:96)
at org.python.pycode._pyx53.call_function(/home/jh/sketchbook/oscP5_python/oscP5_python.pyde)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1614)
at org.python.core.Py.exec(Py.java:1658)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:276)
at jycessing.PAppletJythonDriver.processSketch(PAppletJythonDriver.java:233)
at jycessing.PAppletJythonDriver.findSketchMethods(PAppletJythonDriver.java:613)
at jycessing.Runner.runSketchBlocking(Runner.java:399)
at jycessing.mode.run.SketchRunner.lambda$2(SketchRunner.java:112)
at java.base/java.lang.Thread.run(Thread.java:833)

@joachimheintz
Copy link
Author

i should add:
Processing 4.0.1
Debian Linux 11

@baltner
Copy link

baltner commented Nov 13, 2022

I am seeing the same thing with add_library('pdf'). Question: Is the java runtime used by Processing 4.0.1 included in the download or is it assumed that the host machine already has a jre installed? I do not have one on my Macbook Pro (12.6.1).

@ThomasNLy
Copy link

I got the same error when trying to use the sound library too

@tabreturn
Copy link

Processing JRE is bundled with Processing. Try Processing 3.5.4 instead.

@colpiche
Copy link

I got the same error when trying to use the sound library too

Definitely the same error, with sound library too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants