Skip to Content
Menu
This question has been flagged
1 Reply
1382 Views
 Im trying to send request using Java xmlrpc but getting error 500. Server logs missing.
final String url = "http://localhost:8069",
db = "test",
username = "***",
password = "***";
final
XmlRpcClient client = new XmlRpcClient();
final
XmlRpcClientConfigImpl common_config = new XmlRpcClientConfigImpl();
common_config.setServerURL(new URL(String.format("%s/xmlrpc/2/common", url)));
client.execute(common_config, "version", emptyList());

HTTP server returned unexpected status: INTERNAL SERVER ERROR

But Python solution works well.

import xmlrpc.client
url = "http://localhost:8069"
db = "test"
username = "***"
password = "***"
common = xmlrpc.client.ServerProxy('{}/xmlrpc/2/common'.format(url))print(common.version())

{'server_version': '16.0-20221116', 'server_version_info': [16, 0, 0, 'final', 0, ''], 'server_serie': '16.0', 'protocol_version': 1}
Avatar
Discard
Best Answer

It seems like you are trying to access the Odoo server using XML-RPC, but you are getting a 500 error. This is likely due to a problem with your configuration or with the server itself.

One thing you can try is to check the server logs to see what the error is. In the case of Odoo, the logs are typically located in the log directory inside the Odoo installation directory. If you are unable to find the logs, you may need to check the server configuration to see where the logs are being saved.

Once you have found the logs, you can check them to see if there are any error messages that can help you troubleshoot the issue. It's also a good idea to compare the configuration of your Java and Python code to see if there are any differences that could be causing the problem.

If you are still unable to resolve the issue, you may need to reach out to the Odoo support team or a professional developer for help.

Avatar
Discard
Related Posts Replies Views Activity
1
Jul 24
1997
1
Jan 23
1336
3
Jan 23
4831
1
Jun 22
2451
2
Apr 22
6960