You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/03/24 01:51:43 UTC
[GitHub] [shardingsphere-elasticjob-ui] BertOnline opened a new issue #112: [Bug] shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1 bug
BertOnline opened a new issue #112:
URL: https://github.com/apache/shardingsphere-elasticjob-ui/issues/112
## Bug Report
### Which version of ElasticJob did you use?
3.0.0-RC1
### Which project did you use? ElasticJob-Lite or ElasticJob-Cloud?
elasticjob-lite
### Expected behavior
![image](https://user-images.githubusercontent.com/17882970/112114614-39ebca80-8bf3-11eb-86de-d6b9172e2187.png)
### Actual behavior
When I click the update button, I get an exception
```text
Failed to specialize base type org.apache.shardingsphere.elasticjob.infra.yaml.config.YamlConfiguration<org.apache.shardingsphere.elasticjob.api.JobExtraConfiguration> as org.apache.shardingsphere.elasticjob.tracing.yaml.YamlTracingConfiguration, problem: Type parameter #1/1 differs; can not specialize org.apache.shardingsphere.elasticjob.api.JobExtraConfiguration with org.apache.shardingsphere.elasticjob.tracing.api.TracingConfiguration<$1> (through reference chain: org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult["model"]->org.apache.shardingsphere.elasticjob.infra.pojo.JobConfigurationPOJO["jobExtraConfigurations"]->java.util.ArrayList[0])
```
### Reason analyze (If you can)
Error reason: Job configuration serialization exception, Jackson serialization failed
Error location: JobConfigController- > get api/jobs/config/ {jobname}. After reading the configuration from ZK, use YamlEngine.unmarshal And then get JobConfigurationPOJO, The generic type of jobExtraConfigurations attribute in POJO is interface Collection<YamlConfiguration<JobExtraConfiguration>>, while the generic class after unmarshal is Collection<YamlTracingConfiguration<YamlDataSourceConfiguration>>, However, YamlDataSourceConfiguration is not a subclass of JobExtraConfiguration, which leads to serialization exception. It is found that jobExtraConfigurations is not used in job configuration through debugging at the front and rear ends. Therefore, the property is temporarily removed when returning, and then the property value before updating is reset.
### Example codes for reproduce this issue (such as a github link).
```java
// JobConfigController
/**
* Get job configuration.
*
* @param jobName job name
* @return job configuration
*/
@GetMapping(value = "/{jobName:.+}")
public ResponseResult<JobConfigurationPOJO> getJobConfig(@PathVariable("jobName") final String jobName) {
JobConfigurationPOJO data = jobAPIService.getJobConfigurationAPI().getJobConfiguration(jobName);
// fix serialize exception
data.getJobExtraConfigurations().clear();
//
return ResponseResultUtil.build(data);
}
/**
* Update job configuration.
*
* @param jobConfiguration job configuration
*/
@PutMapping
public ResponseResult<Boolean> updateJobConfig(@RequestBody final JobConfigurationPOJO jobConfiguration) {
// for missing jobExtraConfiguration
JobConfigurationPOJO old = jobAPIService.getJobConfigurationAPI().getJobConfiguration(jobConfiguration.getJobName());
jobConfiguration.setJobExtraConfigurations(old.getJobExtraConfigurations());
//
jobAPIService.getJobConfigurationAPI().updateJobConfiguration(jobConfiguration);
return ResponseResultUtil.build(Boolean.TRUE);
}
// JobConfigurationPOJO
private Collection<YamlConfiguration<JobExtraConfiguration>> jobExtraConfigurations = new LinkedList<>();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob-ui] BertOnline commented on issue #112: [Bug] shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1 Job configuration serialization exception
Posted by GitBox <gi...@apache.org>.
BertOnline commented on issue #112:
URL: https://github.com/apache/shardingsphere-elasticjob-ui/issues/112#issuecomment-806498848
You can download and replace the jar that has been repaired and recompiled. Put shardingsphere-elastic job-lite-ui-backend-3.0.0-rc1.jar in the lib directory.
Download address:
```shell
curl -0 https://raw.githubusercontent.com/BertOnline/shardingsphere-elasticjob-ui/master/shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1.jar --output shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1.jar
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob-ui] purgeyao commented on issue #112: [Bug] shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1 Job configuration serialization exception
Posted by GitBox <gi...@apache.org>.
purgeyao commented on issue #112:
URL: https://github.com/apache/shardingsphere-elasticjob-ui/issues/112#issuecomment-806307530
解决了么
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob-ui] BertOnline commented on issue #112: [Bug] shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1 Job configuration serialization exception
Posted by GitBox <gi...@apache.org>.
BertOnline commented on issue #112:
URL: https://github.com/apache/shardingsphere-elasticjob-ui/issues/112#issuecomment-806504833
Someone has already given feedback
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob-ui] purgeyao commented on issue #112: [Bug] shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1 Job configuration serialization exception
Posted by GitBox <gi...@apache.org>.
purgeyao commented on issue #112:
URL: https://github.com/apache/shardingsphere-elasticjob-ui/issues/112#issuecomment-806507911
```
curl -0 https://raw.githubusercontent.com/BertOnline/shardingsphere-elasticjob-ui/master/shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1.jar --output shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1.jar
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
```
@BertOnline
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob-ui] purgeyao commented on issue #112: [Bug] shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1 Job configuration serialization exception
Posted by GitBox <gi...@apache.org>.
purgeyao commented on issue #112:
URL: https://github.com/apache/shardingsphere-elasticjob-ui/issues/112#issuecomment-806309041
```
Failed to specialize base type org.apache.shardingsphere.elasticjob.infra.yaml.config.YamlConfiguration<org.apache.shardingsphere.elasticjob.api.JobExtraConfiguration> as org.apache.shardingsphere.elasticjob.tracing.yaml.YamlTracingConfiguration, problem: Type parameter #1/1 differs; can not specialize org.apache.shardingsphere.elasticjob.api.JobExtraConfiguration with org.apache.shardingsphere.elasticjob.tracing.api.TracingConfiguration<$1> (through reference chain: org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult["model"]->org.apache.shardingsphere.elasticjob.infra.pojo.JobConfigurationPOJO["jobExtraConfigurations"]->java.util.ArrayList[0])
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob-ui] BertOnline edited a comment on issue #112: [Bug] shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1 Job configuration serialization exception
Posted by GitBox <gi...@apache.org>.
BertOnline edited a comment on issue #112:
URL: https://github.com/apache/shardingsphere-elasticjob-ui/issues/112#issuecomment-806498848
@https://github.com/purgeyao You can download and replace the jar that has been repaired and recompiled. Put shardingsphere-elastic job-lite-ui-backend-3.0.0-rc1.jar in the lib directory.
Download address:
```shell
curl -0 https://raw.githubusercontent.com/BertOnline/shardingsphere-elasticjob-ui/master/shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1.jar --output shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1.jar
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob-ui] BertOnline edited a comment on issue #112: [Bug] shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1 Job configuration serialization exception
Posted by GitBox <gi...@apache.org>.
BertOnline edited a comment on issue #112:
URL: https://github.com/apache/shardingsphere-elasticjob-ui/issues/112#issuecomment-806516649
Please use proxy client download to penetrate GFW.
```shell
curl -0 https://raw.githubusercontent.com/BertOnline/shardingsphere-elasticjob-ui/master/shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1.jar --output shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1.jar
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2145k 100 2145k 0 0 358k 0 0:00:05 0:00:05 --:--:-- 508k
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob-ui] BertOnline edited a comment on issue #112: [Bug] shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1 Job configuration serialization exception
Posted by GitBox <gi...@apache.org>.
BertOnline edited a comment on issue #112:
URL: https://github.com/apache/shardingsphere-elasticjob-ui/issues/112#issuecomment-806498848
@purgeyao You can download and replace the jar that has been repaired and recompiled. Put shardingsphere-elastic job-lite-ui-backend-3.0.0-rc1.jar in the lib directory.
Download address:
```shell
curl -0 https://raw.githubusercontent.com/BertOnline/shardingsphere-elasticjob-ui/master/shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1.jar --output shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1.jar
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob-ui] BertOnline commented on issue #112: [Bug] shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1 Job configuration serialization exception
Posted by GitBox <gi...@apache.org>.
BertOnline commented on issue #112:
URL: https://github.com/apache/shardingsphere-elasticjob-ui/issues/112#issuecomment-806516649
@purgeyao Please use proxy client download to penetrate GW.
```shell
root@DESKTOP-5QVAI0O:/opt# curl -0 https://raw.githubusercontent.com/BertOnline/shardingsphere-elasticjob-ui/master/shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1.jar --output shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1.jar
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2145k 100 2145k 0 0 358k 0 0:00:05 0:00:05 --:--:-- 508k
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob-ui] BertOnline closed issue #112: [Bug] shardingsphere-elasticjob-lite-ui-backend-3.0.0-RC1 Job configuration serialization exception
Posted by GitBox <gi...@apache.org>.
BertOnline closed issue #112:
URL: https://github.com/apache/shardingsphere-elasticjob-ui/issues/112
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org