-
Notifications
You must be signed in to change notification settings - Fork 211
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
getting an exception when starting the JVM on a server #180
Comments
Hi, can you post how you created your JavaGateway instance and how you are accessing it? It seems that the constructor parameters are wrong. Also, which version of Py4J are you using locally and on your server? |
Hi,
Now this is what i creat in the main class in java :
And this is the exceptions i get when i run the code in wildfly and i try to execute the java code from python:
For the Py4j version i used easy_install for the installation on python |
Try to replace The exception you are seeing is because the python process cannot connect to the Java process. |
Thank you for the suggestion.
I dont know if the problem is related to the port or not. Maybe it is related to the address localhost (127.0.0.1) which is used by py4j for listens to the IPv4 and this address is also in used by the wildfly server. |
Both servers can listen on the same address as long as they use different port. Can you post, maybe in a gist, most of the python and java code that handles the connection? The IndexError pop from empty queue is very strange and this is the first time I see it with adequate parameters. |
I have created an application using py4j that makes it possible to save data from python in to SQL database using a java application,everything works so fine when i run the JVM as an application and it actually saves the data. But when i run the code in a server it gives me back an exception.Therfore i thought maybe my server(Wildfly) and Py4j are using the same port so i changed the default py4j port as the turotial suggested but i m still having an exception:
Traceback (most recent call last):
File "C:\Users\user\Desktop\test.py", line 4, in
DBin = gateway.jvm.com.packtpub.wflydevelopment.ch.Application(10,3)
File "C:\Users\user\AppData\Local\Programs\Python\Python35-32\lib\site-packages\py4j-0.9-py3.5.egg\py4j\java_gateway.py", line 1185, in getattr
answer = self._gateway_client.send_command(
AttributeError: 'GatewayParameters' object has no attribute 'send_command'
Any suggestions would be very much appreciated
The text was updated successfully, but these errors were encountered: