Issues with KNIME Batch Execution and Tiny API Integration

Hello,

I’m seeking assistance with an integration project involving the Tiny ERP system and KNIME Analytics Platform. I’ve encountered persistent issues when attempting to execute KNIME workflows in batch mode, particularly when integrating with the Tiny API to retrieve order data.

1. KNIME Batch Execution Issues:

When running KNIME workflows in batch mode, I consistently encounter the following error:

Java was started but returned exit code=2

This error occurs despite the workflow executing correctly in the KNIME GUI. I’ve attempted several solutions, including:

  • Modifying the knime.ini file to specify the correct Java Virtual Machine (JVM) path.
  • Adjusting memory settings in the knime.ini file.
  • Ensuring that the knime.ini file is correctly configured to point to the bundled Java runtime.

Despite these efforts, the issue persists.

2. Tiny API Integration:

The workflow involves consuming the Tiny API to retrieve order data. The API endpoint follows the RESTful architecture and requires the following parameters:

  • token: A unique key generated to identify the company.
  • id: The order ID in the Tiny system.
  • formato: The desired response format, typically json.

An example of a successful API request is:

https://api.tiny.com.br/api2/pedidos.obter.php?token=YOUR_TOKEN&id=ORDER_ID&formato=json

The response provides detailed information about the specified order, which is then processed within the KNIME workflow.

3. Request for Assistance:

Given the complexity of integrating KNIME with the Tiny API in batch mode, I would appreciate any guidance or suggestions from the community. Specifically, I’m interested in:

  • Best practices for configuring KNIME for batch execution, especially when dealing with external API integrations.
  • Troubleshooting steps for the “exit code=2” error in KNIME batch mode.
  • Insights into potential issues when consuming RESTful APIs within KNIME workflows.

Thank you in advance for your support.

Best regards,
Davi Rodrigues

@Davidrs049 my first question would be if it does work without batch in a knime workflow.

Then you might want to read about batch processing and possible alternatives. You could start by providing a full log to see what is going on - exit code 2 is not much of a hint.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.