Hi team We are currently encountering an issue with Seatunnel involving an unknown exception error. The specific error message is as follows:
java.util.LinkedHashMap cannot be cast to java.util.ArrayList This error, identified by issue #5700, arises when creating the Seatunnel engine and web application within a Docker container. While the application starts successfully and generates the necessary configuration file in the base directory (application dir/profile), the issue occurs when attempting to run the job from the UI after clicking the "Run Job" button. This problem has been reported previously, and a GitHub issue is already open for reference. Please find the GitHub URL link below for more details: https://github.com/apache/seatunnel/issues/5700 We are currently working on resolving this issue using two approaches: 1. Java Code Implementation: We have tested job execution by creating the jobId.conf file outside the base directory and running the job via a script from the command line. The job executed successfully. We are planning to implement a Java code solution to execute the script programmatically when an unknown exception occurs. Here is a sample code snippet to be added to the jobExecute() method of the org.apache.seatunnel.app.service.impl.JobExecutorServiceImpl class in seatunnel-web: Long jobInstanceId = null; try { jobInstanceId = executeJobBySeaTunnel(userId, configFile, executeResource.getJobInstanceId()); } catch (ClassCastException e) { execute(); // Calling the method below } public void execute(String[] arr) { String command = "ls -l"; // Replace with our command try { // Get the runtime object Runtime runtime = Runtime.getRuntime(); // Execute the command Process process = runtime.exec(new String[] { "bash", "-c", command }); // Get the output of the command BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); String line; while ((line = reader.readLine()) != null) { System.out.println(line); } // Wait for the process to complete int exitCode = process.waitFor(); System.out.println("Exited with code: " + exitCode); } catch (Exception e) { e.printStackTrace(); } } 2.Docker Image Integration: As part of an ongoing initiative, we have created a Dockerfile for Sea Tunnel that integrates both the engine and web components. The Docker image has been successfully built and deployed in a single container. You can find the image at the following link: SeaTunnel Docker Image<https://hub.docker.com/r/ibmopensource/ibmseatunnel>. However, we encountered an issue where the container throws an unknown exception in certain environments, particularly CentOS. Interestingly, the image works as expected in macOS and Ubuntu but not consistently across all Mac environments. After further investigation, we discovered that building a snapshot of both the engine and web components during container runtime (at the entry point) resolves the issue. However, this approach significantly increases the container creation time to over 7 minutes. We would greatly appreciate your insights and recommendations on the best method for resolving this issue. Please let us know your thoughts on the most realistic solution. Thank you for your attention to this matter.