Author Archives: Robins

[Solved] pycharm Connect mysql Error: You must configure either the server or JDBC driver (via the ‘serverTimezone’ configuration property) to use a more specifc time zone value if you want to utilize time zone support.

1. Modify my INI.file

Mothod:

[mysqld] add

default-time-zone=’+8:00′
set global time_ zone=’+8:00’

#serverTimezone=Asia/Shanghai
#set global time_zone=Asia/Shanghai

Mothod 2: command configuration

2. URL setting of pycharm JDBC: mysql://localhost:3306/mysql?serverTimezone=Asia/Shanghai

3. Connection succeeded

4. Data query succeeded

[Solved] Encryption and decryption error: java.lang.SecurityException: JCE cannot authenticate the provider BC

1: In the path
jdk\jre\lib\security in the java.security file to add configuration (11 serial number to see the previous configuration serial number in the file, add 1 to the base)
security.provider.11=org.bouncycastle.jce.provider.BouncyCastleProvider
2:Add the bcprov-jdk15on-1.66.jar package to jdk\jre\lib\ext

[Solved] Runtime JAR file has version 1.4 which is older than required for API version 1.5

Today, I packed a project and suddenly reported an error, which made people unable to touch the problem. This project is developed in Java.

/Users/xxx/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.4.20/9be77b243a362b745e365f286627b8724337009c
/kotlin-stdlib-1.4.20.jar: Runtime JAR file has version 1.4 which is older than required for API version 1.5

w: Runtime JAR files in the classpath have the version 1.4, which is older than the API version 1.5. 
Consider using the runtime of version 1.5, or pass '-api-version 1.4' explicitly to restrict 
the available APIs to the runtime of version 1.4. You can also pass '-language-version 1.4' instead, 
which will restrict not only the APIs to the specified version, but also the language features

After reading the prompt, it should be the jar package version.

But the problem must be:

kotlin-stdlib

How should I solve it?

It should be inadvertently used the package written by kotlin, so the package will use this dependency when compiling, but it is not specified, so I can only use the one that comes with the system, but kotlin has been upgraded to the latest version.

1. Add Classpath: build.Gradle (Project: XXXX)

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"

2.Add dependencies: build.gradle(project:xxxx.app)

implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.6.10'

Where: XXXX your project name.

The above two steps basically solve the above error reporting. If there are still errors, take a look at the prompt and solve it.

Here, an attribute in the layout is missing, and files of different devices are generated by default.

If you can’t use other V24 and land, you can delete them.

[Solved] SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘vod_content’.

ALTER TABLE `mac_vod` CHANGE `vod_content` `vod_content` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL;

The above line of code solves the error when collecting Apple cms v10 custom interface. The reason is that the vod_content of the database is wrong, you can try;

The following is the error content:

1 SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘vod_content’ ……

ALTER TABLE `mac_vod` CHANGE `vod_content` `vod_content` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL;

[Solved] Multiple Contexts have a path of ”/xxx”

Resolve multiple contexts have a path of ”/xxx ” error

Scenario description

There was originally a dynamic web project project in Eclipse: myjspproject. There is no managed Tomcat. Later, modify the code of tomcat, delete the server folder in eclipse, redeploy the server, and then deploy it to Tomcat. At this time, Tomcat reports an error: multiple contexts have a path of “/ spring mvc001”, as shown below:

Error reason

Myjspproject already exists in Tomcat; However, the path value of the context of the regenerated project myjspproject is still myjspproject, resulting in a conflict.

Solution:

Please follow the steps below to modify.

Change the path to/myjspproject2 and save the configuration.

[Solved] springboot thymeleaf property is empty error: el1007e

1.Error Messages:
org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field ‘id’ cannot be found on null

2. Html Page

<input type="hidden" name="id" th:value="${sysDict.id}">

When the sysdict object is null, ${sysdict.ID} is a null pointer exception, so an error is reported.

3. Solution

Add a null judgment: ${sysdict?.ID}

<input type="hidden" name="id" th:value="${sysDict?.id}">

4. Details of error reporting

 
org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'id' cannot be found on null
    at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:213)
    at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:104)
    at org.springframework.expression.spel.ast.PropertyOrFieldReference.access$000(PropertyOrFieldReference.java:51)
    at org.springframework.expression.spel.ast.PropertyOrFieldReference$AccessorLValue.getValue(PropertyOrFieldReference.java:406)
    at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:92)
    at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:112)
    at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:337)
    at org.thymeleaf.spring5.expression.SPELVariableExpressionEvaluator.evaluate(SPELVariableExpressionEvaluator.java:265)
    at org.thymeleaf.standard.expression.VariableExpression.executeVariableExpression(VariableExpression.java:166)
    at org.thymeleaf.standard.expression.SimpleExpression.executeSimple(SimpleExpression.java:66)
    at org.thymeleaf.standard.expression.Expression.execute(Expression.java:109)
    at org.thymeleaf.standard.expression.Expression.execute(Expression.java:138)
    at org.thymeleaf.standard.processor.AbstractStandardExpressionAttributeTagProcessor.doProcess(AbstractStandardExpressionAttributeTagProcessor.java:144)
    at org.thymeleaf.processor.element.AbstractAttributeTagProcessor.doProcess(AbstractAttributeTagProcessor.java:74)
    at org.thymeleaf.processor.element.AbstractElementTagProcessor.process(AbstractElementTagProcessor.java:95)
    at org.thymeleaf.util.ProcessorConfigurationUtils$ElementTagProcessorWrapper.process(ProcessorConfigurationUtils.java:633)
    at org.thymeleaf.engine.ProcessorTemplateHandler.handleStandaloneElement(ProcessorTemplateHandler.java:918)
    at org.thymeleaf.engine.TemplateHandlerAdapterMarkupHandler.handleStandaloneElementEnd(TemplateHandlerAdapterMarkupHandler.java:260)
    at org.thymeleaf.templateparser.markup.InlinedOutputExpressionMarkupHandler$InlineMarkupAdapterPreProcessorHandler.handleStandaloneElementEnd(InlinedOutputExpressionMarkupHandler.java:256)
    at org.thymeleaf.standard.inline.OutputExpressionInlinePreProcessorHandler.handleStandaloneElementEnd(OutputExpressionInlinePreProcessorHandler.java:169)
    at org.thymeleaf.templateparser.markup.InlinedOutputExpressionMarkupHandler.handleStandaloneElementEnd(InlinedOutputExpressionMarkupHandler.java:104)
    at org.attoparser.HtmlVoidElement.handleOpenElementEnd(HtmlVoidElement.java:92)
    at org.attoparser.HtmlMarkupHandler.handleOpenElementEnd(HtmlMarkupHandler.java:297)
    at org.attoparser.MarkupEventProcessorHandler.handleOpenElementEnd(MarkupEventProcessorHandler.java:402)
    at org.attoparser.ParsingElementMarkupUtil.parseOpenElement(ParsingElementMarkupUtil.java:159)
    at org.attoparser.MarkupParser.parseBuffer(MarkupParser.java:710)
    at org.attoparser.MarkupParser.parseDocument(MarkupParser.java:301)
    at org.attoparser.MarkupParser.parse(MarkupParser.java:257)
    at org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parse(AbstractMarkupTemplateParser.java:230)
    at org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parseStandalone(AbstractMarkupTemplateParser.java:100)
    at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:666)
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098)
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072)
    at org.thymeleaf.spring5.view.ThymeleafView.renderFragment(ThymeleafView.java:366)
    at org.thymeleaf.spring5.view.ThymeleafView.render(ThymeleafView.java:190)
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1400)
    at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1145)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1084)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at com.zj31mep.security.XssFilter.doFilter(XssFilter.java:25)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at com.zj31mep.security.CsrfFilter.doFilter(CsrfFilter.java:86)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1722)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
    at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

[Solved] gradle sync Error: “PKIX path building failed” and “unable to find valid certification path to requested target”

I encountered this problem when I was in gradle sync, which led to the failure of sync, so I couldn’t update the online Maven package, resulting in the red of idea

Gradle sync reports the following error

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Relevant discussions can be found on the Internet at:
...

I encountered this problem because Charles opened the MacOS proxy, which led to the failure of certificate verification. Just turn off Charles’s MacOS proxy (windows should also turn off the computer proxy)