Closed Harpsichord1207 closed 5 years ago
py4j.protocol.Py4JNetworkError: Answer from Java side is empty
This is a generic Py4J layer error. The execution gets stuck when launching the Py4J gateway, because there doesn't seem to be a Java installation available.
Do you have Java 1.8 (or newer) installed and available on system path? To test it, open a command prompt, and type java -version
. What do you see?
@vruusmann Thanks for replying, Yes I have a java, maybe the version is incompatible?
$ java -version
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
Version 11(.0.2) is definitely newer/greater than the minimum required version 8.
There shouldn't be any problems with Java 11 from the JPMML-Evaluator library perspective. But perhaps there are some issues with the Py4J "carrier layer" perspective.
You should try making a parallel Java 8 installation into your computer. Then, export to the location of the Java 8 installation as JAVA_HOME
environment variable (AFAIK, this is how Py4J locates the Java version to use), and try again.
Thanks, I solved the problem by changing all "Interger" to "Double" in the pmml file.
@Harpsichord1207 This is no real solution. One cannot go on manually correcting PMML files. You should really inform the KNIME team about this issue, and ask them to fix their software.
Version 11(.0.2) is definitely newer/greater than the minimum required version 8.
There shouldn't be any problems with Java 11 from the JPMML-Evaluator library perspective. But perhaps there are some issues with the Py4J "carrier layer" perspective.
You should try making a parallel Java 8 installation into your computer. Then, export to the location of the Java 8 installation as
JAVA_HOME
environment variable (AFAIK, this is how Py4J locates the Java version to use), and try again.
I install a Java 8, and get the same error:
$ java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
Thanks, I solved the problem by changing all "Interger" to "Double" in the pmml file.
@Harpsichord1207 This is no real solution. One cannot go on manually correcting PMML files. You should really inform the KNIME team about this issue, and ask them to fix their software.
Thanks, I'll feed back this issue to KNIME team.
It's now possible to choose between PyJNIus and Py4J backends (see the README file).
Please give the PyJNIus backend a try (if the Py4J backend keeps failing).
I copied the code in readme except replace the pmml file and csv file , and then raise a error.
Code:
Error: