Category Archives: How to Fix

The background object of thymeleaf is null, which solves the problem of error when the object is empty to get the property value

The sale object passed from the background is sale = null

 ${sale.warrantyPeriod}

You will be prompted that warrantyperiod cannot be found. Change it to the following:

 th:value="${sale?.warrantyPeriod}"

If the object is empty, the output is empty; if the object exists, the output property value.

SLF4J: Class path contains multiple SLF4J bindings.

The error is shown in the figure

 
The reason for this error is that there are two bridges when the log information is generated, and the conflict results in error.

The solution is as follows:

Find the structure diagram in the POM file, and press and hold the Cril key to enlarge the diagram

Find the dependency as shown in the figure below, because there are two bridge conflicts, we only need to eliminate one

As shown in the figure below, right-click the logback classic we found and left-click exclude

At this point, our modification is good. Return to our POM file and update our modification, as shown in the following figure:

At this point, we can run our project again and find that our mistakes are gone, as shown in the figure below.

Asset database transaction committed tweet appears when unity reports an error!

Why does asset database transaction committed tweet appear in unity
Assertion failed on expression: ‘m_ ErrorCode == MDB_ MAP_ RESIZED || ! HasAbortingErrors()’

Solution:
save the file, re open the unity or activate the license, you can get the solution
cause: error caused by resource loss, or license expiration.

The error of is shown in the figure

[Solved] The error message of the persistent file is not configured

09:15:56,111 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.2.Final
09:15:56,393 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
09:15:56,471 INFO [org.jboss.as] (MSC service thread 1-8) WFLYSRV0049: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) starting
09:15:58,155 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads – 1) WFLYDS0004: Found zhuyrCoreJpaRest.war in deployment directory. To trigger deployment create a file called zhuyrCoreJpaRest.war.dodeploy
09:15:58,245 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
09:15:58,270 INFO [org.xnio] (MSC service thread 1-1) XNIO version 3.4.0.Final
09:15:58,288 INFO [org.xnio.nio] (MSC service thread 1-1) XNIO NIO Implementation Version 3.4.0.Final
09:15:58,347 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool — 38) WFLYCLINF0001: Activating Infinispan subsystem.
09:15:58,373 INFO [org.jboss.as.jsf] (ServerService Thread Pool — 44) WFLYJSF0007: Activated the following JSF Implementations: [main]
09:15:58,382 INFO [org.jboss.as.naming] (ServerService Thread Pool — 46) WFLYNAM0001: Activating Naming Subsystem
09:15:58,410 WARN [org.jboss.as.txn] (ServerService Thread Pool — 54) WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique.
09:15:58,431 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0003: Undertow 1.4.0.Final starting
09:15:58,433 INFO [org.jboss.as.webservices] (ServerService Thread Pool — 56) WFLYWS0002: Activating WebServices Extension
09:15:58,441 INFO [org.jboss.as.connector] (MSC service thread 1-6) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.3.4.Final)
09:15:58,478 INFO [org.wildfly.extension.io] (ServerService Thread Pool — 37) WFLYIO001: Worker ‘default’ has auto-configured to 8 core threads with 64 task threads based on your 4 available processors
09:15:58,650 INFO [org.jboss.as.security] (ServerService Thread Pool — 53) WFLYSEC0002: Activating Security Subsystem
09:15:58,695 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool — 33) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
09:15:58,708 INFO [org.jboss.as.security] (MSC service thread 1-3) WFLYSEC0001: Current PicketBox version=4.9.6.Final
09:15:58,776 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0018: Started Driver service with driver-name = h2
09:15:58,782 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool — 33) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
09:15:58,784 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0018: Started Driver service with driver-name = mysql
09:15:58,832 INFO [org.jboss.as.naming] (MSC service thread 1-5) WFLYNAM0003: Starting Naming Service
09:15:58,833 INFO [org.jboss.as.mail.extension] (MSC service thread 1-5) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
09:15:58,898 INFO [org.jboss.remoting] (MSC service thread 1-6) JBoss Remoting version 4.0.21.Final
09:15:59,032 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool — 55) WFLYUT0014: Creating file handler for path ‘D:\work\tools\wildfly-10.1.0.FinalForTest/welcome-content’ with options [directory-listing: ‘false’, follow-symlink: ‘false’, case-sensitive: ‘true’, safe-symlink-paths: ‘[]’]
09:15:59,041 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0012: Started server default-server.
09:15:59,043 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0018: Host default-host starting
09:15:59,106 INFO [org.jboss.as.ejb3] (MSC service thread 1-5) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 16 (per class), which is derived from the number of CPUs on this host.
09:15:59,110 INFO [org.jboss.as.ejb3] (MSC service thread 1-6) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 64 (per class), which is derived from thread worker pool sizing.
09:15:59,542 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8080
09:15:59,703 WARN [org.jboss.as.domain.management.security] (MSC service thread 1-6) WFLYDM0111: Keystore D:\work\tools\wildfly-10.1.0.FinalForTest\standalone\configuration\application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost
09:15:59,718 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) WFLYDS0013: Started FileSystemDeploymentService for directory D:\work\tools\wildfly-10.1.0.FinalForTest\standalone\deployments
09:15:59,759 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0027: Starting deployment of “zhuyrCoreJpaRest.war” (runtime-name: “zhuyrCoreJpaRest.war”)
09:15:59,993 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
09:16:00,173 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-5) ISPN000128: Infinispan version: Infinispan ‘Chakra’ 8.2.4.Final
09:16:00,239 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool — 63) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
09:16:00,242 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool — 63) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
09:16:00,245 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool — 59) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
09:16:00,246 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool — 59) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
09:16:00,266 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool — 60) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
09:16:00,267 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool — 60) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
09:16:00,372 INFO [org.jboss.ws.common.management] (MSC service thread 1-6) JBWS022052: Starting JBossWS 5.1.5.Final (Apache CXF 3.1.6)
09:16:00,405 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) WFLYJCA0001: Bound data source [java:jboss/datasources/ZhuyrDS]
09:16:00,551 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
09:16:01,575 INFO [org.jboss.weld.deployer] (MSC service thread 1-6) WFLYWELD0003: Processing weld deployment zhuyrCoreJpaRest.war
09:16:01,653 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-6) HV000001: Hibernate Validator 5.2.4.Final
09:16:01,748 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-6) WFLYEJB0473: JNDI bindings for session bean named ‘StudentJpaRepo’ in deployment unit ‘deployment “zhuyrCoreJpaRest.war”‘ are as follows:

java:global/zhuyrCoreJpaRest/StudentJpaRepo!com.zhuyrCore.StudentRepo
java:app/zhuyrCoreJpaRest/StudentJpaRepo!com.zhuyrCore.StudentRepo
java:module/StudentJpaRepo!com.zhuyrCore.StudentRepo
java:global/zhuyrCoreJpaRest/StudentJpaRepo
java:app/zhuyrCoreJpaRest/StudentJpaRepo
java:module/StudentJpaRepo

09:16:01,919 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit.”zhuyrCoreJpaRest.war”.INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit.”zhuyrCoreJpaRest.war”.INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment “zhuyrCoreJpaRest.war”
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0041: Component class com.zhuyrJpa.StudentJpaRepo for component StudentJpaRepo has errors:
WFLYJPA0033: Can’t find a persistence unit named jpa-1 in deployment “zhuyrCoreJpaRest.war”
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor$1.handle(ModuleJndiBindingProcessor.java:157)
at org.jboss.as.ee.component.ClassDescriptionTraversal.run(ClassDescriptionTraversal.java:54)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.processClassConfigurations(ModuleJndiBindingProcessor.java:186)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:143)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
… 5 more

09:16:01,927 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation (“deploy”) failed – address: ([(“deployment” => “zhuyrCoreJpaRest.war”)]) – failure description: {
“WFLYCTL0080: Failed services” => {“jboss.deployment.unit.\”zhuyrCoreJpaRest.war\”.INSTALL” => “org.jboss.msc.service.StartException in service jboss.deployment.unit.\”zhuyrCoreJpaRest.war\”.INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment \”zhuyrCoreJpaRest.war\”
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0041: Component class com.zhuyrJpa.StudentJpaRepo for component StudentJpaRepo has errors:
WFLYJPA0033: Can’t find a persistence unit named jpa-1 in deployment \”zhuyrCoreJpaRest.war\””},
“WFLYCTL0412: Required services that are not installed:” => [
“jboss.deployment.unit.\”zhuyrCoreJpaRest.war\”.INSTALL”,
“jboss.deployment.unit.\”zhuyrCoreJpaRest.war\”.beanmanager”
],
“WFLYCTL0180: Services with missing/unavailable dependencies” => [
“jboss.deployment.unit.\”zhuyrCoreJpaRest.war\”.weld.weldClassIntrospector is missing [jboss.deployment.unit.\”zhuyrCoreJpaRest.war\”.beanmanager]”,
“jboss.deployment.unit.\”zhuyrCoreJpaRest.war\”.batch.environment is missing [jboss.deployment.unit.\”zhuyrCoreJpaRest.war\”.beanmanager]”
]
}
09:16:01,996 INFO [org.jboss.as.server] (ServerService Thread Pool — 34) WFLYSRV0010: Deployed “zhuyrCoreJpaRest.war” (runtime-name : “zhuyrCoreJpaRest.war”)
09:16:02,003 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0184: New missing/unsatisfied dependencies:
service jboss.deployment.unit.”zhuyrCoreJpaRest.war”.beanmanager (missing) dependents: [service jboss.deployment.unit.”zhuyrCoreJpaRest.war”.batch.environment, service jboss.deployment.unit.”zhuyrCoreJpaRest.war”.weld.weldClassIntrospector]
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit.”zhuyrCoreJpaRest.war”.INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit.”zhuyrCoreJpaRest.war”.INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment “zhuyrCoreJpaRest.war”

09:16:02,141 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
09:16:02,141 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
09:16:02,142 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started (with errors) in 6408ms – Started 368 of 616 services (3 services failed or missing dependencies, 396 services are lazy, passive or on-demand)
09:16:02,190 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0028: Stopped deployment zhuyrCoreJpaRest.war (runtime-name: zhuyrCoreJpaRest.war) in 13ms
09:16:02,254 WARN [org.jboss.as.controller] (DeploymentScanner-threads – 1) WFLYCTL0357: Notification of type deployment-undeployed is not described for the resource at the address []
09:16:02,255 INFO [org.jboss.as.server] (DeploymentScanner-threads – 1) WFLYSRV0009: Undeployed “zhuyrCoreJpaRest.war” (runtime-name: “zhuyrCoreJpaRest.war”)
09:16:02,256 INFO [org.jboss.as.controller] (DeploymentScanner-threads – 1) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit.”zhuyrCoreJpaRest.war”.INSTALL

09:16:07,066 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads – 1) WFLYDS0004: Found zhuyrCoreJpaRest.war in deployment directory. To trigger deployment create a file called zhuyrCoreJpaRest.war.dodeploy

 

Solution:

The location of the persistence.xml file may be misplaced;

It may be that the entity class <class>com.zhuyrCore.Student</class> is not added in the persistence.xml file

[Solved] org.mongodb.driver.cluster – Exception in monitor thread while connecting to server node1:27017

spring   An error was reported when the boot project started to connect mongodb.

2021-06-09 17:10:34,663 INFO  org.mongodb.driver.cluster - Exception in monitor thread while connecting to server node1:27017
com.mongodb.MongoSocketException: node1
	at com.mongodb.ServerAddress.getSocketAddresses(ServerAddress.java:211)
	at com.mongodb.internal.connection.SocketStream.initializeSocket(SocketStream.java:75)
	at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:65)
	at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:128)
	at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.UnknownHostException: node1
	at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
	at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
	at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
	at java.net.InetAddress.getAllByName0(InetAddress.java:1276)
	at java.net.InetAddress.getAllByName(InetAddress.java:1192)
	at java.net.InetAddress.getAllByName(InetAddress.java:1126)
	at com.mongodb.ServerAddress.getSocketAddresses(ServerAddress.java:203)
	... 5 common frames omitted

Because it’s a new project, Mongo library belongs to other projects. This is just a test application. So the first doubt is that the project version driver is not compatible with mongodb library. After replacing other versions of mongodb library, it is OK.

Detailed explanation

View the

<dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-mongodb</artifactId>
        <version>2.1.3.RELEASE</version>
    </dependency>

Because of spring   Mongodb driver is also the official driver of encapsulated mongodb. When you enter the spring data mongodb project, you can see that the official version of mongodb driver is 3.8.2

Then go to the official website of mongodb to see that version 3.8 supports version 4.0 database at most. I started testing with the 4.2 library (Official website https://docs.mongodb.com/drivers/java/)

So that’s it.

Golang Warning: Error string should not be capitalized or end with punctuation mark

Error string should not be capitalized or end with punctuation mark
The error string should not be capitalized or punctuated

When we use errors. New (“AAA.”) or fmt.Errorf(“Aaa.”)   When the form returns error information, the text content should not start with a capital letter or end with a punctuation mark.

Only modify according to the warning, remove the beginning of capital letter and the end of punctuation. Errors. New (“AAA”)

Httprunner v3. X generates HTML report in assure format

This document records the process and steps of the initial report generation with allure.

Install allure first, download and configure the environment
reference documents:

https://www.cnblogs.com/wsy1103/p/10530397.html

After installation, the following steps begin:

Step 1: generate report data with assure. The generated report data includes two files: one JSON file and one TXT file.

Switch to D: Python/Test & gt; The following is implemented:

hrun test_post_api.json --alluredir=report

Step 2: create the report data generated just now with assure, generate the report2 folder, – O means to specify the folder to generate the report, – C means to clean up the previous report directory before generating the report.

allure generate D:\Python\test\report -o D:\Python\test\report2 -c

Then open the assure report using the default browser to view it.

allure open D:\Python\test\report2

end. The effect of successful generation:


[frequently asked questions]

1. If the error prompt oserror: [winerror 6] handle is invalid, please refer to the document for solution:

https://ask.csdn.net/questions/3017114

Add some code to runner. Py’s test_ Start method, and import colorama, Sys at the beginning of the file

2. If the Chinese encoding in the return body fails, please refer to the document for solution:

https://blog.csdn.net/zjxht62/article/details/116305944

Add some code to the log of client. Py_ In the print method, the default ASCII encoding is used for Chinese when json.dumps is serialized. To output real Chinese, you need to specify ensure_ ascii=False


[allure grammar]

$Hrun — alluredir allure results — clean alluredir # when the use case format is py file, you can replace “Hrun” with “pytest”, which has the same effect
– alluredir: generate the original data of allure report
allure results: save location of the original data
– clean alluredir: clear the historical data of allure results

$assure generate assure results – O assure report
– O specify the folder to generate the report
– C clean up the previous report directory before generating the report

Assure open assure report: start the default browser to open the assure test report

Solve the problem of MySQL 1251 client does not support

    problem display:
    solution
    Enter MySQL from the command line
    start MySQL service: net start MySQL
    login MySQL: MySQL - U root - P password
    View user information: select host, user, plugin, authentication_ string from mysql.user;
    modify user password:

    ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
    ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
    

    Connection successful

Xftp transfer file error

Today, when doing the xftp file transfer, the following situation appeared, as shown in the figure below

Problem explanation: This is the Linux folder that needs to be uploaded has insufficient permissions, so what should we do?

 
1. The first method: select the Linux folder to upload, right-click – change permissions – check all; You can upload it again. Here is the software file, as shown in the following figure:

At that time, I couldn’t check this method. The reason I thought of was that I didn’t have permission to change the permission of this folder, so I tried to find a second method on the Internet

The second method: modify the folder permission with command: Chmod 777 software, the folder that software needs to give permission to