Category Archives: Error

Redis Error: HandleServiceCommands: system error caught. error code=1056, message = StartService failed:

An error occurred when starting redis: # handleservicecommands: system error thought. Error code = 1056, message = startservice failed: unknown error
in fact, the current redis server has been started, and then an error is reported when you start it again. Just turn off and restart.

redis-server --service-stop

redis-server --service-start

redis-cli.exe -h 127.0.0.1 -p 6379

Error generic_INTERNAL_Error (65536) processing [How to Solve]

Presto queries the data of Apache druid and inserts it into kudu. Occasionally, an error is reported: generic_INTERNAL_Error (65536)
java.lang.illegalargumentexception: unknown field druid.druid. Data source name. Field name: varchar
com.google.common.base.preconditions.checkargument (preconditions. Java: 216)

Check the Druid log and find the corresponding error:
unknown exception (org. Apache. Cite. Tools. Validationexception): org. Apache. Cite. Runtime. Calculecontextexception: from line 2, column 8 to line 2, column 12: column ‘field name’ not found in any table
in addition, errors are occasionally reported when using superset to obtain the data preview of the corresponding Druid data source

Problem analysis:
1. First, judge that it should be a druid problem. The same operation only occasionally reports an error. It is suspected that it is a druid broker problem
2. It is found that the results of querying the number of columns of the same data source through different brokers are inconsistent (SQL: select count (*) columncount from information_schema. Columns where table_neme = ‘data source name’). This may be because historical has not provided services to all segments when the broker is restarted by rolling (after restarting historical, the segment load is not completed, and the segment is still being loaded gradually), resulting in different schema information such as dimension indicators obtained through the segment at different times.

Solution: restart the broker after historically loading segments to ensure that the dimension indicators and other schema information obtained by the broker through segments are consistent. Subsequent restart of the broker should ensure that all segments in the cluster provide services normally.

Summary: the reason for error reporting is that the schema information obtained twice is inconsistent. The inconsistency may be caused by adding or deleting columns, or modifying column names and column data types. To solve the problem of inconsistent schema information, you can solve the current error reporting.

Monkey error: error: A RuntimeException occurred [How to Solve]

When running monkey with Xiaomi mobile phone, the following error occurs just after startup:

** Error: A RuntimeException occurred:
java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission
	at android.os.Parcel.createException(Parcel.java:2074)
	at android.os.Parcel.readException(Parcel.java:2042)
	at android.os.Parcel.readException(Parcel.java:1990)
	at android.hardware.input.IInputManager$Stub$Proxy.injectInputEvent(IInputManager.java:925)
	at android.hardware.input.InputManager.injectInputEvent(InputManager.java:886)
	at com.android.commands.monkey.MonkeyKeyEvent.injectEvent(MonkeyKeyEvent.java:133)
	at com.android.commands.monkey.Monkey.runMonkeyCycles(Monkey.java:1324)
	at com.android.commands.monkey.Monkey.run(Monkey.java:815)
	at com.android.commands.monkey.Monkey.main(Monkey.java:675)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:380)
Caused by: android.os.RemoteException: Remote stack trace:
	at com.android.server.input.InputManagerService.injectInputEventInternal(InputManagerService.java:740)
	at com.android.server.input.InputManagerService.injectInputEvent(InputManagerService.java:714)
	at android.hardware.input.IInputManager$Stub.onTransact(IInputManager.java:422)
	at android.os.Binder.execTransactInternal(Binder.java:1021)
	at android.os.Binder.execTransact(Binder.java:994)


** System appears to have crashed at event 1 of 1000000 using seed 200

**Solution**

Turn on USB debugging (security setting) and check the setting ☑️ “It is allowed to modify permissions or simulate clicking through USB debugging”, and it is OK to take off again.

[Solved] The Shell Script error: syntax error: “(” unexpected “)

Execute the shell script with the following error messages

This is related to the version of shell you actually use. It can be printed with LS - L/bin/*sh, for example:

Here, SH is redirected to dash, so if sh positionpara.Sh, dash is used. There are many ways to avoid error reporting, such as executing bash positionpara.Sh, or executing ./positionpara.Sh .

[Solved] SpringBoot Project Start Error: No bean named ‘org.springframework.context.xxxxx.importRegistry‘ available

(1) Problem description

In springboot project, when adding validator dependency for parameter verification, dependency is introduced, and an error is reported when starting the project. The error information is as follows:

"C:\Program Files\Java\jdk1.8.0_211\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:11637,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -javaagent:C:\Users\zhuyb\AppData\Local\JetBrains\IntelliJIdea2021.2\captureAgent\debugger-agent.jar -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_211\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\rt.jar;G:\zhuyoubin_gitee_space\example-project\signle-web-project\zblog-single\zblog-single-web\target\classes;E:\softwares\MavenRepository\org\springframework\boot\spring-boot-starter-web\2.3.0.RELEASE\spring-boot-starter-web-2.3.0.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\boot\spring-boot-starter\2.3.0.RELEASE\spring-boot-starter-2.3.0.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\boot\spring-boot\2.3.0.RELEASE\spring-boot-2.3.0.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\boot\spring-boot-autoconfigure\2.3.0.RELEASE\spring-boot-autoconfigure-2.3.0.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\boot\spring-boot-starter-logging\2.3.0.RELEASE\spring-boot-starter-logging-2.3.0.RELEASE.jar;E:\softwares\MavenRepository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\softwares\MavenRepository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\softwares\MavenRepository\org\apache\logging\log4j\log4j-to-slf4j\2.13.2\log4j-to-slf4j-2.13.2.jar;E:\softwares\MavenRepository\org\apache\logging\log4j\log4j-api\2.13.2\log4j-api-2.13.2.jar;E:\softwares\MavenRepository\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;E:\softwares\MavenRepository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;E:\softwares\MavenRepository\org\springframework\spring-core\5.2.6.RELEASE\spring-core-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\spring-jcl\5.2.6.RELEASE\spring-jcl-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\yaml\snakeyaml\1.26\snakeyaml-1.26.jar;E:\softwares\MavenRepository\org\springframework\boot\spring-boot-starter-json\2.3.0.RELEASE\spring-boot-starter-json-2.3.0.RELEASE.jar;E:\softwares\MavenRepository\com\fasterxml\jackson\core\jackson-databind\2.11.0\jackson-databind-2.11.0.jar;E:\softwares\MavenRepository\com\fasterxml\jackson\core\jackson-annotations\2.11.0\jackson-annotations-2.11.0.jar;E:\softwares\MavenRepository\com\fasterxml\jackson\core\jackson-core\2.11.0\jackson-core-2.11.0.jar;E:\softwares\MavenRepository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.11.0\jackson-datatype-jdk8-2.11.0.jar;E:\softwares\MavenRepository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.11.0\jackson-datatype-jsr310-2.11.0.jar;E:\softwares\MavenRepository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.11.0\jackson-module-parameter-names-2.11.0.jar;E:\softwares\MavenRepository\org\springframework\boot\spring-boot-starter-tomcat\2.3.0.RELEASE\spring-boot-starter-tomcat-2.3.0.RELEASE.jar;E:\softwares\MavenRepository\org\apache\tomcat\embed\tomcat-embed-core\9.0.35\tomcat-embed-core-9.0.35.jar;E:\softwares\MavenRepository\org\glassfish\jakarta.el\3.0.3\jakarta.el-3.0.3.jar;E:\softwares\MavenRepository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.35\tomcat-embed-websocket-9.0.35.jar;E:\softwares\MavenRepository\org\springframework\spring-web\5.2.6.RELEASE\spring-web-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\spring-beans\5.2.6.RELEASE\spring-beans-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\spring-webmvc\5.2.6.RELEASE\spring-webmvc-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\spring-aop\5.2.6.RELEASE\spring-aop-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\spring-context\5.2.6.RELEASE\spring-context-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\spring-expression\5.2.6.RELEASE\spring-expression-5.2.6.RELEASE.jar;G:\zhuyoubin_gitee_space\example-project\signle-web-project\zblog-single\zblog-single-service\target\classes;G:\zhuyoubin_gitee_space\example-project\signle-web-project\zblog-single\zblog-single-mapper\target\classes;E:\softwares\MavenRepository\mysql\mysql-connector-java\8.0.20\mysql-connector-java-8.0.20.jar;E:\softwares\MavenRepository\com\google\protobuf\protobuf-java\3.6.1\protobuf-java-3.6.1.jar;E:\softwares\MavenRepository\com\alibaba\druid-spring-boot-starter\1.1.10\druid-spring-boot-starter-1.1.10.jar;E:\softwares\MavenRepository\com\alibaba\druid\1.1.10\druid-1.1.10.jar;E:\softwares\MavenRepository\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;G:\zhuyoubin_gitee_space\example-project\signle-web-project\zblog-single\zblog-single-pojo\target\classes;E:\softwares\MavenRepository\com\baomidou\mybatis-plus-boot-starter\3.4.2\mybatis-plus-boot-starter-3.4.2.jar;E:\softwares\MavenRepository\com\baomidou\mybatis-plus\3.4.2\mybatis-plus-3.4.2.jar;E:\softwares\MavenRepository\com\baomidou\mybatis-plus-extension\3.4.2\mybatis-plus-extension-3.4.2.jar;E:\softwares\MavenRepository\com\baomidou\mybatis-plus-core\3.4.2\mybatis-plus-core-3.4.2.jar;E:\softwares\MavenRepository\com\baomidou\mybatis-plus-annotation\3.4.2\mybatis-plus-annotation-3.4.2.jar;E:\softwares\MavenRepository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;E:\softwares\MavenRepository\org\hibernate\validator\hibernate-validator\6.2.0.Final\hibernate-validator-6.2.0.Final.jar;E:\softwares\MavenRepository\jakarta\validation\jakarta.validation-api\2.0.2\jakarta.validation-api-2.0.2.jar;E:\softwares\MavenRepository\org\jboss\logging\jboss-logging\3.4.1.Final\jboss-logging-3.4.1.Final.jar;E:\softwares\MavenRepository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;E:\softwares\MavenRepository\com\github\pagehelper\pagehelper-spring-boot-starter\1.4.0\pagehelper-spring-boot-starter-1.4.0.jar;E:\softwares\MavenRepository\org\mybatis\spring\boot\mybatis-spring-boot-starter\2.2.0\mybatis-spring-boot-starter-2.2.0.jar;E:\softwares\MavenRepository\org\springframework\boot\spring-boot-starter-jdbc\2.3.0.RELEASE\spring-boot-starter-jdbc-2.3.0.RELEASE.jar;E:\softwares\MavenRepository\com\zaxxer\HikariCP\3.4.5\HikariCP-3.4.5.jar;E:\softwares\MavenRepository\org\springframework\spring-jdbc\5.2.6.RELEASE\spring-jdbc-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\springframework\spring-tx\5.2.6.RELEASE\spring-tx-5.2.6.RELEASE.jar;E:\softwares\MavenRepository\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\2.2.0\mybatis-spring-boot-autoconfigure-2.2.0.jar;E:\softwares\MavenRepository\org\mybatis\mybatis\3.5.7\mybatis-3.5.7.jar;E:\softwares\MavenRepository\org\mybatis\mybatis-spring\2.0.6\mybatis-spring-2.0.6.jar;E:\softwares\MavenRepository\com\github\pagehelper\pagehelper-spring-boot-autoconfigure\1.4.0\pagehelper-spring-boot-autoconfigure-1.4.0.jar;E:\softwares\MavenRepository\com\github\pagehelper\pagehelper\5.3.0\pagehelper-5.3.0.jar;E:\softwares\MavenRepository\com\github\jsqlparser\jsqlparser\4.2\jsqlparser-4.2.jar;G:\zhuyoubin_gitee_space\example-project\signle-web-project\zblog-single\zblog-single-common\target\classes;E:\softwares\MavenRepository\org\apache\commons\commons-lang3\3.4\commons-lang3-3.4.jar;E:\softwares\MavenRepository\io\jsonwebtoken\jjwt\0.9.1\jjwt-0.9.1.jar;E:\softwares\MavenRepository\com\alibaba\fastjson\1.2.75\fastjson-1.2.75.jar;E:\softwares\ides\IntelliJ IDEA 2021.2.1\lib\idea_rt.jar" com.gitee.zblog.Application
Connected to the target VM, address: '127.0.0.1:11637', transport: 'socket'

  .   ____          _            __ _ _
 /\\/___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, |////
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.3.0.RELEASE)

2021-11-13 18:53:30.446  INFO 11376 --- [           main] com.gitee.zblog.Application              : Starting Application on zhuyb with PID 11376 (G:\zhuyoubin_gitee_space\example-project\signle-web-project\zblog-single\zblog-single-web\target\classes started by zhuyb in G:\zhuyoubin_gitee_space\example-project\signle-web-project\zblog-single)
2021-11-13 18:53:30.449  INFO 11376 --- [           main] com.gitee.zblog.Application              : No active profile set, falling back to default profiles: default
2021-11-13 18:53:31.577  INFO 11376 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 6250 (http)
2021-11-13 18:53:31.586  INFO 11376 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2021-11-13 18:53:31.586  INFO 11376 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.35]
2021-11-13 18:53:31.693  INFO 11376 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-11-13 18:53:31.694  INFO 11376 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1191 ms
2021-11-13 18:53:31.791  INFO 11376 --- [           main] c.a.d.s.b.a.DruidDataSourceAutoConfigure : Init DruidDataSource
2021-11-13 18:53:31.901  INFO 11376 --- [           main] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} inited
 _ _   |_  _ _|_. ___ _ |    _ 
| | |\/|_)(_| | |_\  |_)||_|_\ 
    /              |         
                        3.4.2 
2021-11-13 18:53:32.800  WARN 11376 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultValidator' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.validation.BootstrapConfiguration.getClockProviderClassName()Ljava/lang/String;
2021-11-13 18:53:32.801  INFO 11376 --- [           main] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} closed
2021-11-13 18:53:32.803  INFO 11376 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2021-11-13 18:53:32.812  INFO 11376 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-11-13 18:53:32.817 ERROR 11376 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.hibernate.validator.internal.xml.config.ValidationBootstrapParameters.<init>(ValidationBootstrapParameters.java:65)

The following method did not exist:

    javax.validation.BootstrapConfiguration.getClockProviderClassName()Ljava/lang/String;

The method's class, javax.validation.BootstrapConfiguration, is available from the following locations:

    jar:file:/E:/softwares/MavenRepository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar!/javax/validation/BootstrapConfiguration.class
    jar:file:/E:/softwares/MavenRepository/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.jar!/javax/validation/BootstrapConfiguration.class

It was loaded from the following location:

    file:/E:/softwares/MavenRepository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of javax.validation.BootstrapConfiguration

2021-11-13 18:53:32.824  WARN 11376 --- [           main] o.s.boot.SpringApplication               : Unable to close ApplicationContext

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:603) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:409) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.context.event.AbstractApplicationEventMulticaster.retrieveApplicationListeners(AbstractApplicationEventMulticaster.java:245) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:197) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:134) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.boot.availability.AvailabilityChangeEvent.publish(AvailabilityChangeEvent.java:81) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.boot.availability.AvailabilityChangeEvent.publish(AvailabilityChangeEvent.java:67) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.doClose(ServletWebServerApplicationContext.java:167) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:978) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:814) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:325) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
	at com.gitee.zblog.Application.main(Application.java:18) [classes/:na]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:603) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:409) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:91) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:109) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:94) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:76) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:347) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:299) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:431) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	... 28 common frames omitted
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:814) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1282) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor.postProcessBeforeInitialization(ConfigurationClassPostProcessor.java:456) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:416) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1788) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	... 51 common frames omitted

Disconnected from the target VM, address: '127.0.0.1:11637', transport: 'socket'

Process finished with exit code 1

(2) Solution

Error reason: the springboot dependency and validator dependency versions do not match.

In my project, springboot relies on version 2.3.0, while javax validation and Hibernate validator rely on versions 1.1.0.final and 5.4.0 final, respectively.

Solution:

Replace the versions of javax validation and Hibernate validator. In springboot 2.3.0, javax validation 2.0.1.final and Hibernate validator 6.1.5.final are used.

[Solved] iperf Analyze Error: unable to create a new stream: Invalid argument

The root cause of the error reported in the title is that the iperf command code customized by the company is relatively old, so the open source code still needs to be updated in time!

Device: Android p

Problem: when the iperf server is opened on the PC and the iperf client is opened on the Android device, the throughput cannot be tested normally, as shown in the following figure:

The Android device reports an error “unable to create a new stream: invalid argument”. The PC can see that there is a connection at the beginning, and then the connection is closed due to the client.

Solution:

First look at the error report, “Unable to create a new stream” corresponds to “case IECREATESTREAM”. It can be determined that this error occurs in a function of iperf_api, and it is found in the iperf_new_stream() function. It is simple here. Exclude the first few A malloc, the first function mkstemp(), this function is interesting, the actual problem is also here, first introduce this function.

The mkstep function creates a file with a unique file name in the system and opens it. Only the current user can access the temporary file and perform read and write operations. The mkstamp function has only one parameter template, which is a non empty string ending in “XXXXXX”. The mkstemp function will replace “XXXXXX” with a randomly generated string to ensure the uniqueness of the file name.

You can see the common error codes eexist and einval through the man Manual:

1>   EEXIST:   Unable to create a unique temporary file, the content of parameter template is undefined;

2>   Einval: for mkstamp(), the last six characters of template are not XXXXXX;

It is worth mentioning that in glibc 2.0.6 and earlier glibc libraries, the access permission of this file is 0666, that is, all users in UNIX system can access it, which will have a big problem. Therefore, the access permission of this file in glibc libraries after glibc 2.0.7 is adjusted to 0600.

The temporary file created by the mkstemp function cannot be deleted automatically, so after executing the mkstemp function, you need to call the unlink function. The unlink function deletes the directory entry of the file, but the temporary file can also be accessed through the file descriptor until the last open process closes the file, or the temporary file is automatically and completely deleted after the program exits.

The original code snippet of the error is as follows

struct iperf_stream *iperf_new_stream(struct iperf_test *test, int s)
{
    int i;
    struct iperf_stream *sp;
    //The problem is here, the template parameter format is incorrect
    char template[] = "/data/data/iperf3.0.11";
    ......
    /* Create and randomize the buffer */
    sp->buffer_fd = mkstemp(template);
    if (sp->buffer_fd == -1) {
        i_errno = IECREATESTREAM;
        free(sp->result);
        free(sp);
        return NULL;
    }
    if (unlink(template) < 0) {
        i_errno = IECREATESTREAM;
        free(sp->result);
        free(sp);
        return NULL;
    }
    if (ftruncate(sp->buffer_fd, test->settings->blksize) < 0) {
        i_errno = IECREATESTREAM;
        free(sp->result);
        free(sp);
        return NULL;
    }
    ......

It’s clear from here that the problem with the template parameter causes an error in mkstamp() and returns einval. The corresponding Android device executes the iperf command and reports an error of ‘invalid argument’. I was going to make a simple change. After thinking about iperf, everyone is using it. There should be no big problem. I went to GitHub community and found that predecessors have paved the way. I changed it with reference to the submission in the community.

diff --git a/system/core/swiperf/iperf.h b/system/core/swiperf/iperf.h
index f4d394b..2bc0b73 100644
--- a/system/core/swiperf/iperf.h
+++ b/system/core/swiperf/iperf.h
@@ -178,6 +178,7 @@ struct iperf_test
     struct protocol *protocol;
     signed char state;
     char     *server_hostname;                  /* -c option */
     //The latest open source code iperf_test structure itself has tmp_template
+    char     *tmp_template;
     char     *bind_address;                     /* -B option */
     int       server_port;
     int       omit;                             /* duration of omit period (-O flag) */
@@ -252,6 +253,9 @@ struct iperf_test
     char *server_output_text;
     cJSON *json_server_output;

+    /* Store User Defined Path and use it for creating temporary streams */
+    char *user_stream_path;
+
     /* Server output (use on server side only) */
     TAILQ_HEAD(iperf_textlisthead, iperf_textline) server_output_list;

diff --git a/system/core/swiperf/iperf_api.c b/system/core/swiperf/iperf_api.c
index 13269d5..27a92ac 100644
--- a/system/core/swiperf/iperf_api.c
+++ b/system/core/swiperf/iperf_api.c
@@ -27,6 +27,9 @@
 #define _GNU_SOURCE
 #define __USE_GNU

+/* Suppress Warning generated by GCC __attribute__ for write */
+#pragma GCC diagnostic ignored "-Wunused-result"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -235,8 +238,21 @@ iperf_get_test_one_off(struct iperf_test *ipt)
     return ipt->one_off;
 }

-/************** Setter routines for some fields inside iperf_test *************/
+/* Getter routine for user-defined stream-path */
+char *
+iperf_get_stream_path(struct iperf_test *ipt)
+{
+    return ipt->user_stream_path;
+}

+/* Setter routine for user-defined stream-path */
+void
+iperf_set_stream_path(struct iperf_test *ipt, char *_stram_path)
+{
+    ipt->user_stream_path = strdup(_stram_path);
+}
+
+/************** Setter routines for some fields inside iperf_test *************/
 void
 iperf_set_verbose(struct iperf_test *ipt, int verbose)
 {
@@ -596,6 +612,7 @@ iperf_parse_arguments(struct iperf_test *test, int argc, char **argv)
        {"get-server-output", no_argument, NULL, OPT_GET_SERVER_OUTPUT},
         {"debug", no_argument, NULL, 'd'},
         {"help", no_argument, NULL, 'h'},
         //Add the analysis of the corresponding parameters
+        {"stream-path", required_argument, NULL, OPT_STREAM_PATH},
         {NULL, 0, NULL, 0}
     };
     int flag;
@@ -608,6 +625,15 @@ iperf_parse_arguments(struct iperf_test *test, int argc, char **argv)
     server_flag = client_flag = rate_flag = duration_flag = 0;
     while ((flag = getopt_long(argc, argv, "p:f:i:D1VJvsc:ub:t:n:k:l:P:Rw:B:M:N46S:L:ZO:F:A:T:C:dh", longopts, NULL)) != -1) {
         switch (flag) {
+            /*
+             * Set Stream Path to user-defined path
+             * Reason: To work on Android as /tmp is not available on Android
+             * also access to a static /data/local/tmp/ is also restricted for Applications
+             * Only native application path is accessable with complete permissions
+             */
+            case OPT_STREAM_PATH:
+                iperf_set_stream_path(test, optarg);
+                break;
             case 'p':
                 test->server_port = atoi(optarg);
                 break;
@@ -2367,7 +2393,27 @@ iperf_new_stream(struct iperf_test *test, int s)
 {
     int i;
     struct iperf_stream *sp;
-    char template[] = "/data/data/iperf3.0.11";
+    char template[1024];
+    if (test->tmp_template) {
+        snprintf(template, sizeof(template)/sizeof(char), "%s", test->tmp_template);
+    } else {
+        //find the system temporary dir *unix, windows, cygwin support
+        char* tempdir = getenv("TMPDIR");
+        if (tempdir == 0) {
+            tempdir = getenv("TEMP");
+        }
+        if (tempdir == 0) {
+            tempdir = getenv("TMP");
+        }
+        /* Use User Specific Path if available */
+        if (test->user_stream_path != NULL) { //There is a pass to go here
+            tempdir = iperf_get_stream_path(test);
+        }
+        if (tempdir == 0) { // Android devices without parameters, create temporary files under /tmp by default
+            tempdir = "/tmp";
+        }
+        snprintf(template, sizeof(template)/sizeof(char), "%s/iperf3.XXXXXX", tempdir);
+    }

     h_errno = 0;

diff --git a/system/core/swiperf/iperf_api.h b/system/core/swiperf/iperf_api.h
index c019a31..e19492b 100644
--- a/system/core/swiperf/iperf_api.h
+++ b/system/core/swiperf/iperf_api.h
@@ -44,6 +44,8 @@ struct iperf_stream;
 #define OPT_SCTP 1
 #define OPT_LOGFILE 2
 #define OPT_GET_SERVER_OUTPUT 3
+/* Stream Path Edit for Android Compatibility */
+#define OPT_STREAM_PATH 4

 /* states */
 #define TEST_START 1
@@ -87,6 +89,10 @@ int  iperf_get_test_zerocopy( struct iperf_test* ipt );
 int    iperf_get_test_get_server_output( struct iperf_test* ipt );
 char*  iperf_get_test_bind_address ( struct iperf_test* ipt );
 int    iperf_get_test_one_off( struct iperf_test* ipt );
+/* Getter routine for user-defined stream-path */
+char* iperf_get_stream_path( struct iperf_test *ipt );
+/* Setter routine for user-defined stream-path */
+void iperf_set_stream_path( struct iperf_test *ipt, char *_stram_path );

 /* Setter routines for some fields inside iperf_test. */
 void   iperf_set_verbose( struct iperf_test* ipt, int verbose );
diff --git a/system/core/swiperf/iperf_locale.c b/system/core/swiperf/iperf_locale.c
index 30e6290..9fe7ba6 100644
--- a/system/core/swiperf/iperf_locale.c
+++ b/system/core/swiperf/iperf_locale.c
@@ -141,6 +141,7 @@ const char usage_longstr[] = "Usage: iperf [-s|-c host] [options]\n"
                            "  -O, --omit N              omit the first n seconds\n"
                            "  -T, --title str           prefix every output line with this string\n"
                            "  --get-server-output       get results from server\n"
                            //New --stream-path passing parameter, support custom write path
+                           "  --stream-path             use user-defied path to create temporary stream\n"

 #ifdef NOT_YET_SUPPORTED /* still working on these */
 #endif

[Solved] Mybatis Error: Establishing SSL connection without server‘s identity verification is not recommended.

Mybatis Error: Establishing SSL connection without server‘s identity verification is not recommended.

 

Solution:

(1) You need to explicitly disable SSL by setting usessl = false, or set usessl = true and provide a truststore for server certificate validation
(2) at this time, we only need to set usessl = false on the URL connecting to the database.

[Solved] @webservice Error: org.apache.cxf.common.i18n.UncheckedException: No operation was found with

1. Phenomenon

Integrating the web service of Spring + CXF, the WSDL is successfully published, but an error is reported when calling
org.apache.cxf.common.i18n.uncheckedexception: no operation was found with

2. Solution 1

: add targetNamespace in the service interface

package com.gblfy.service;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

@WebService(targetNamespace = "http://impl.service.gblfy.com/")
public interface IUserService {

    @WebMethod
    public String getCxf(@WebParam(name = "reqXml") String reqXml);
}

Implementation class

package com.gblfy.service.impl;

import com.gblfy.service.IUserService;

import javax.jws.WebService;

@WebService
public class UserServiceImpl implements IUserService {

    @Override
    public String getCxf(String reqXml) {

        System.out.println("Message received:" + reqXml);
        return "OK";
    }
}

client

/**
     * Single/multi-parameter calling tool class (Object type)
     *
     * @param cxfUrl url address
     * @param method call method name
     * @param reqXml send message body
     * @return res return result
     * @throws Exception If there is an exception, output the exception on the console and throw the exception
     */
    public static String cxfClientParam(String cxfUrl, String method, Object... reqXml) throws Exception {
        String res = null;
        // Create a dynamic client
        JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
        Client client = dcf.createClient(cxfUrl);

        // If you need a password, you need to add a user name and password
        // client.getOutInterceptors().add(new ClientLoginInterceptor(USER_NAME, PASS_WORD));
        Object[] objects = new Object[0];
        try {
            // Basic format: invoke("method name", parameter 1, parameter 2, parameter 3....);
            objects = client.invoke(method, reqXml);
            res = objects[0].toString();
            System.out.println("Return data:" + res);
        } catch (java.lang.Exception e) {
            e.printStackTrace();
            throw e;
        }
        return res;
    }
3. Solution 2

Use QName and add the address of the service interface

package com.gblfy.service.client;

import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.springframework.stereotype.Component;

import javax.xml.namespace.QName;

/**
 * cxf client call (packaged inside the enterprise)
  *
  * @author gblfy
  * @date 2021-09-17
  */
@Component
public class CxfClient {
     public static void main(String[] args) throws Exception {
         String cxfUrl = "http://127.0.0.1:8080/spring_cxf_war/webservice/userWS?wsdl";
         String method = "getCxf";
         String reqXml = "cxf request message";

         //Call the service
         CxfClient.cxfClientParam(cxfUrl, method, reqXml);
     }

     /**
      * Single/multi-parameter calling tool class (Object type)
      *
      * @param cxfUrl url address
      * @param method call method name
      * @param reqXml send message body
      * @return res return result
      * @throws Exception If there is an exception, output the exception on the console and throw the exception
     */
    public static String cxfClientParam(String cxfUrl, String method, String reqXml) throws Exception {
        String res = null;
        // Create a dynamic client
         JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
         Client client = dcf.createClient(cxfUrl);

         // If you need a password, you need to add a user name and password
         // client.getOutInterceptors().add(new ClientLoginInterceptor(USER_NAME, PASS_WORD));
         Object[] objects = new Object[0];
         try {
             // Basic format: invoke("method name", parameter 1, parameter 2, parameter 3....);
             QName qName = new QName("http://impl.service.gblfy.com/",method);
             objects = client.invoke(qName, reqXml);
             res = objects[0].toString();
             System.out.println("Return data:" + res);
        } catch (Exception e) {
            e.printStackTrace();
            throw e;
        }
        return res;
    }
}

[Solved] Electron Error: ReferenceError: require is not defined

Error reported by electron: referenceerror: require is not defined

This error is suddenly reported. Many people on the Internet say that nodeintegration: true should be set, but it doesn’t work.
until I see a comment on stackoverflow:
all you need to do is add contextisolation: false after nodeintegration: true in the webpreferences object,
try it and it’s OK, This means adding contextisolation: false after nodeintegration: true

[Solved] Unity Import Xcode Project Error: iOS framework addition failed due to a CocoaPods installation failure.

iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project.

When unity exports the Xcode project, it relies on the third-party cocoapods library. The error is as follows.

Solution:

Although the warning is written in the error, the warning problem is solved and the error is no longer reported.

cd ~
vim .profile  # If not, execute the following command, if yes, fill in export LANG=en_US.UTF-8
touch .profile # New .profile
source .profile # Let it take effect

The specific error reports are as follows (part):

iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project.

After the failure, "pod repo update" was executed and succeeded. "pod install" was then attempted again, and still failed. This may be due to a broken CocoaPods installation. See: https://guides.cocoapods.org/using/troubleshooting.html for potential solutions.

pod install output:



    [33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
    Consider adding the following to ~/.profile:

    export LANG=en_US.UTF-8
    [0m
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `unicode_normalize'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `installation_root'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:226:in `podfile_path'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:105:in `markdown_podfile'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:30:in `report'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:66:in `report_error'
	from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
	from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
	from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
	from /usr/local/bin/pod:25:in `load'
	from /usr/local/bin/pod:25:in `<main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `unicode_normalize'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `installation_root'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:226:in `podfile_path'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:205:in `podfile'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:160:in `verify_podfile_exists!'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:46:in `run'
	from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
	from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
	from /usr/local/bin/pod:25:in `load'
	from /usr/local/bin/pod:25:in `<main>'



pod repo update output:

Updating spec repo `cocoapods`
  $ /usr/local/bin/git -C /Users/liuyongjie/.cocoapods/repos/cocoapods fetch origin --progress
  $ /usr/local/bin/git -C /Users/liuyongjie/.cocoapods/repos/cocoapods rev-parse --abbrev-ref HEAD
  master
  $ /usr/local/bin/git -C /Users/liuyongjie/.cocoapods/repos/cocoapods reset --hard origin/master
  HEAD 现在位于 9734315382c8 [Add] HBS-UI 1.1.0
Updating spec repo `ftsview-the-fotoable-cocoapods-specs`
  $ /usr/local/bin/git -C /Users/liuyongjie/.cocoapods/repos/ftsview-the-fotoable-cocoapods-specs fetch origin --progress
  $ /usr/local/bin/git -C /Users/liuyongjie/.cocoapods/repos/ftsview-the-fotoable-cocoapods-specs rev-parse --abbrev-ref HEAD
  master
  $ /usr/local/bin/git -C /Users/liuyongjie/.cocoapods/repos/ftsview-the-fotoable-cocoapods-specs reset --hard origin/master
  HEAD 现在位于 8984dba [Update] FtAdsPlatform (4.4.8.4)


    [33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
    Consider adding the following to ~/.profile:

    export LANG=en_US.UTF-8

[Solved] XML file configuration database connection information logical symbol error

Reason: illegal escape characters. XML characters must be replaced with corresponding entities.

- &lt;    <(Less than)
-&gt; > (greater than)
-&amp; & (and)
-&apos; '(single quote)
-&quot; "(double quotation mark)

Solution:

Follow the shortcut keys prompted by idea to replace

        <property name="DriverClass">com.mysql.cj.jdbc.Driver</property>
        <property name="JdbcUrl">jdbc:mysql://localhost:3306/test?characterEncoding=utf8&amp;ampuseSSL=false&amp;serverTimezone=UTC&amp;rewriteBatchedStatements=true</property>
        <property name="User">root</property>
        <property name="Password">789756long</property>