-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
java.util.LinkedHashMap cannot be cast to java.util.ArrayList #5700
Comments
2.3.3源码执行seatunnel-examples seatunnel-engine-examples遇到了同样的问题 |
**web1.0.0+seatunnel2.3.3遇到了同样问题,帮忙解决解答谢谢 |
遇到了一样的问题,盼早日解决 |
@anacondapy6 |
@guodachao @RenHuifeng @wachoo can anyone share your job config here to help debug? thanks. |
|
This job config file get from seatunnel-web? |
@EricJoy2048
in a non working scenario it is trtransformed to below format(which is how it is stored in the file without any change in syntax)
|
@EricJoy2048 @haneeshpld the full stack:
I guess the st-web generated config file format is wrong. |
I'm not sure if the is issue is occurring here. In my case, I have a working scenario as well as a non-working scenario. When containerizing the application (both web and engine), it works if I run the image on the same machine where it is built. However, when I use the image on a different machine with almost identical configurations (same OS), it shows the above error. Upon checking both the working and non-working scenarios, the above code produces the same output. Therefore, I im not sure the issue is arising from this code. working scenario Jdbc { non workig scenario Jdbc { there is a file being written after the transformation in st-web (bin\profile\12261501203968.conf) which is in identical format in both working and non working scenario, when it is transformed again in the engine side we get the issue. |
I resolve this problem with repackage the Just change <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<minimizeJar>true</minimizeJar>
<createSourcesJar>true</createSourcesJar>
<shadeSourcesContent>true</shadeSourcesContent>
<shadedArtifactAttached>false</shadedArtifactAttached>
<createDependencyReducedPom>false</createDependencyReducedPom>
<filters>
<filter>
<artifact>com.typesafe:config</artifact>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/NOTICE</exclude>
<exclude>com/typesafe/config/ConfigParseOptions.class</exclude>
<exclude>com/typesafe/config/ConfigMergeable.class</exclude>
<exclude>com/typesafe/config/impl/ConfigParser.class</exclude>
<!-- just add this line to remove the inner class -->
<exclude>com/typesafe/config/impl/ConfigParser$ParseContext.class</exclude>
<exclude>com/typesafe/config/impl/ConfigNodePath.class</exclude>
<exclude>com/typesafe/config/impl/PathParser.class</exclude>
<exclude>com/typesafe/config/impl/Path.class</exclude>
<exclude>com/typesafe/config/impl/SimpleConfigObject.class</exclude>
<exclude>com/typesafe/config/impl/PropertiesParser.class</exclude>
</excludes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>com.typesafe.config</pattern>
<shadedPattern>${seatunnel.shade.package}.com.typesafe.config</shadedPattern>
</relocation>
</relocations>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer" />
</transformers>
</configuration>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
when package the config-base module, it will relocate the package paths, but the |
Hi @leejoker I have checked with above solution but still the issue is there. |
Try it this way. Note that this is not a fundamental solution to the problem ,a temporary solution to the problem. Change the method: ConfigShadeUtils processConfig() Then install the 《seatunnel-core-starter》 module
|
所以这个问题最后最好的解决方法是???? |
所以,一年了还没解决? |
@leejoker Thanks!you are right! |
@athiathu try install the seatunnel to your local repository and then package the seatunnel-web. |
agree with your guess,but if i change these template , another problem occured which is caused by the template too. org.apache.seatunnel.core.starter.utils.ConfigShadeUtils.java |
Search before asking
What happened
when I click this button to start running a task in seatunnel web server
![image](https://private-user-images.githubusercontent.com/13916787/277911005-e4ca19be-8e9e-4c55-a800-7e39f64e17d5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyNTk3NjksIm5iZiI6MTcyNDI1OTQ2OSwicGF0aCI6Ii8xMzkxNjc4Ny8yNzc5MTEwMDUtZTRjYTE5YmUtOGU5ZS00YzU1LWE4MDAtN2UzOWY2NGUxN2Q1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDE2NTc0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI0OGRmOTM3MjE1ZDEwMmJlNzMzOThjY2JkMzZhY2Y1ZmU3Y2MyMzg5ZGVjZWZjZDIzNzkxZjEwZmVkMDEyYjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.xJLNwC5Aa9vmN4SPb3V1B12Fc8Zx594Ww3wYO3gx42A)
exception message burst in the log :
ERROR [qtp1175146719-7472] [GlobalExceptionHandler.logError():83] - java.util.LinkedHashMap cannot be cast to java.util.ArrayList
java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to java.util.ArrayList
at org.apache.seatunnel.core.starter.utils.ConfigShadeUtils.processConfig(ConfigShadeUtils.java:143)
at org.apache.seatunnel.core.starter.utils.ConfigShadeUtils.decryptConfig(ConfigShadeUtils.java:119)
at org.apache.seatunnel.core.starter.utils.ConfigShadeUtils.decryptConfig(ConfigShadeUtils.java:104)
at org.apache.seatunnel.core.starter.utils.ConfigBuilder.ofInner(ConfigBuilder.java:53)
at org.apache.seatunnel.core.starter.utils.ConfigBuilder.lambda$of$1(ConfigBuilder.java:67)
at java.util.Optional.orElseGet(Optional.java:267)
at org.apache.seatunnel.core.starter.utils.ConfigBuilder.of(ConfigBuilder.java:67)
at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.(MultipleTableJobConfigParser.java:127)
at org.apache.seatunnel.engine.client.job.JobExecutionEnvironment.getJobConfigParser(JobExecutionEnvironment.java:63)
at org.apache.seatunnel.engine.core.job.AbstractJobEnvironment.getLogicalDag(AbstractJobEnvironment.java:109)
at org.apache.seatunnel.engine.client.job.JobExecutionEnvironment.execute(JobExecutionEnvironment.java:73)
at org.apache.seatunnel.app.service.impl.JobExecutorServiceImpl.executeJobBySeaTunnel(JobExecutorServiceImpl.java:107)
at org.apache.seatunnel.app.service.impl.JobExecutorServiceImpl.jobExecute(JobExecutorServiceImpl.java:73)
at org.apache.seatunnel.app.controller.JobExecutorController.jobExecutor(JobExecutorController.java:55)
at sun.reflect.GeneratedMethodAccessor352.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
SeaTunnel Version
seatunnel 2.2.3
seatunnel-web 1.0.0
SeaTunnel Config
Running Command
when I click this button to start running a task in seatunnel web server
Error Exception
Zeta or Flink or Spark Version
Zeta 2.3.3
Java or Scala Version
openjdk version "1.8.0_372"
Screenshots
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: