python-duckling icon indicating copy to clipboard operation
python-duckling copied to clipboard

clojure issue

Open SreenijaK opened this issue 6 years ago • 2 comments

Hi, When i run d = Duckling()

I get the following issue.

File "C:\Users\hi\Anaconda3\lib\site-packages\duckling\duckling.py", line 53, in init self.clojure = jpype.JClass('clojure.java.api.Clojure')

File "C:\Users\hi\Anaconda3\lib\site-packages\jpype_jclass.py", line 73, in JClass raise _RUNTIMEEXCEPTION.PYEXC("Class %s not found" % name)

java.lang.RuntimeExceptionPyRaisable: java.lang.RuntimeException: Class clojure.java.api.Clojure not found

How do i fix the same

SreenijaK avatar Feb 27 '19 07:02 SreenijaK

I met the same issue,could you fix it?

azuredsky avatar Apr 30 '19 01:04 azuredsky

I found a solution. I had been importing another python library that already initialized a JVM. So when I tried to initialize Duckling(), it skipped over the JVM creation and also skipped over the additions to the classpath. I was able to fix it by removing the other library which creates a JVM. But I would guess there is also a way to use the jvm_started=True flag and load the required jars into your existing JVM manually. Hope this helps!

sumitovant-alan-menaged avatar Dec 02 '21 17:12 sumitovant-alan-menaged