Tag Archives: abnormal

[Solved] Swagger Error: Whitelabel Error Page status=405

The swagger link is accessed with the following error

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Thu Mar 17 20:14:30 CST 2022
There was an unexpected error (type=Method Not Allowed, status=405).
Request method ‘GET’ not supported

The reason is that @PostMapping does not have a configured path

   @PostMapping
    public UserInfoResponse queryUserNameById(@RequestBody UserInfoRequest request){
        log.info("Query user name request parameters",request);
        UserInfoResponse response = userService.selectUserNameById(request);
        log.info("Query user name return parameters",request);
        return response;
    }

[Solved] mmdetection benchmark.py Error: RuntimeError: Distributed package doesn‘t have NCCL built in

Cause:
use mmdetection’s tools/benchmark An error occurs when py calculates FPS
the error contents are as follows:

Traceback (most recent call last):
  File "tools/analysis_tools/benchmark.py", line 191, in <module>
    main()
  File "tools/analysis_tools/benchmark.py", line 183, in main
    init_dist(args.launcher, **cfg.dist_params)
  File "D:\Anaconda\envs\eagermot\lib\site-packages\mmcv\runner\dist_utils.py", line 18, in init_dist
    _init_dist_pytorch(backend, **kwargs)
  File "D:\Anaconda\envs\eagermot\lib\site-packages\mmcv\runner\dist_utils.py", line 32, in _init_dist_pytorch
    dist.init_process_group(backend=backend, **kwargs)
  File "D:\Anaconda\envs\eagermot\lib\site-packages\torch\distributed\distributed_c10d.py", line 510, in init_process_group
    timeout=timeout))
  File "D:\Anaconda\envs\eagermot\lib\site-packages\torch\distributed\distributed_c10d.py", line 597, in _new_process_group_helper
    raise RuntimeError("Distributed package doesn't have NCCL "
RuntimeError: Distributed package doesn't have NCCL built in

Cause analysis:
Windows does not support nccl backend

Solution:
1. Locate the following code location

File "D:\Anaconda\envs\eagermot\lib\site-packages\mmcv\runner\dist_utils.py", line 32, in _init_dist_pytorch

2. Add code before 1 (line 32)

backend='gloo'

[Solved] Swagger request error: error:getaddrinfo ENOTFOUND

Swagger request error: error: getaddrinfo enotfound

This is the problem I encountered. Maybe everyone encountered it in different ways. I just said the problems I encountered and my solutions
my problem is that when I create a new data table and put it in the test environment, the data table does not move to the test environment, so this error is reported:
solution: import the newly created data table in the test environment (formal environment), and the interface access is normal.

[Solved] A needed class was not found. This could be due to an error in your runpath. Missing class: scala/co

A needed class was not found. This could be due to an error in your runpath. Missing class: scala/collection/GenTraversableOnce$class
java.lang.NoClassDefFoundError: scala/collection/GenTraversableOnce$class
	at com.twitter.util.JMapWrapper.<init>(LruMap.scala:33)
	at com.twitter.util.LruMap.<init>(LruMap.scala:41)
	at com.twitter.util.LruMap.<init>(LruMap.scala:44)
	at

pay attention to your POM file, confirm the version and some third-party dependent versions. Please use the newer version. Delete Idea, there may be some caches,

Domain error in object XXX “other” domain “other” rejected values and atm913

Question

When using the SSM framework for a project, the field error in object ‘xxx’ on field ‘xxx’: rejected value [[], [], []…] problem occurs.

resolvent

when the value passed from the front end is null, the value cannot be converted to the corresponding type, which will lead to loading

c

o

n

t

r

o

l

l

e

r

controller

The controller code reported an error before
for example:

u

r

l

:

url :

URL: ${pagecontext. Request. Contextpath}/book/toupdatepage/ ${book. Getbookid()}
if the red part is null, the field error in object ‘xxx’ on field ‘xxx’: rejected value [[], [], []…] problem will appear.

Therefore, to solve this problem, first check whether the value of the passed parameter is null, and then check whether the parameter type of the passed parameter is correct.

Docker starts MySQL container and reports an error driver failed programming external connectivity on endpoint mysq

Look at the error first:

The mistake is like the above. At first, I thought my command was wrong or something else, but later I found it was not

But it’s still troubleshooting one by one.
first, the command to create a MySQL container:
docker create – P 3306:3306 — name of the container – e mysql_ ROOT_ Password = database password MySQL version:

After creation, enter the command: docker PS – a
to view all containers

Then you can see the MySQL you just named

Start command:
docker start container ID

Then an error will be reported. If an error is reported, please see the following:

Problem solving:

The first is to restart the docker. It is useless for me to restart anyway. The restart command:
systemctl restart docker
it is also possible that you will be OK after restarting

The second is to view all containers through the docker PS – a command. If you have created MySQL before, when you create a MySQL container again, you need to change an external port, not 3306. Ensure that the port and name are different from the MySQL container created before

You can also use the previous MySQL container and start it directly through the docker start container ID

Failed to convert value of type ‘java.lang.String‘ to required type ‘java.util.Date‘;

Report 400: data type mismatch:

    The type of time passed in the path URL is string

    You can add this annotation in the controller layer to convert string to java.util.date

    @DateTimeFormat(pattern = "yyyy-MM-dd") Date begin
    
       @GetMapping
          public List<Demand> listAll(@RequestParam("begin") @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam("end") @DateTimeFormat(pattern = "yyyy-MM-dd")Date endTime){
              System.out.println("beginTime"+beginTime);
              System.out.println("endTime:"+endTime);
              return demandClient.queryAllDemands(beginTime, endTime);
          }
      

      date begintime in the figure; If the front-end parameter is not begintime but begin, it needs to be defined as begin. in @ requestparam

      [Solved] ibatis.builder.BuilderException: Error parsing Mapper XML: Could not resolve type alias ‘XXX‘

      Error: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. : Could not resolve type alias ‘XXX’.

      Error Message:
      org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is ‘com/huangmy3/community/dao/DiscussPostDao.xml’. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias ‘DiscussPost’. Cause: java.lang.ClassNotFoundException: Cannot find class: DiscussPost

      Error reported means.
      Binding exception, the type (DiscussPostMap entity class) could not be found
      The reason is: The return type of the entity class should be resultMap

      修改后:

      Org.springframework.beans.factory.xml.xmlbeandefinitionstoreexception: the wildcard matching is comprehensive, but the declaration of element XX: XX XX cannot be found

      When configuring spring’s XML file, you want to start component scanning. As a result, the following error occurred during the operation:

      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:context="http://www.springframework.org/schema/context"
             xsi:schemaLocation="http://www.springframework.org/schema/beans
                                 http://www.springframework.org/schema/beans/spring-beans.xsd">
          <context:component-scan base-package="com.zxb"></context:component-scan>
      </beans>
      

      org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 10 in XML document from class path resource [bean2.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 52; CVC complex type. 2.4. C: wildcard matching is comprehensive, but the element cannot be found‘ context:component-scan ’A statement from the government.

      After searching for a long time, it turned out that in the XML file, you need to specify the specific location of the schema file to be followed through the schemalocation . I forgot to configure it, just add it.

      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:context="http://www.springframework.org/schema/context" 
             xsi:schemaLocation="http://www.springframework.org/schema/beans
                                 http://www.springframework.org/schema/beans/spring-beans.xsd
                                 http://www.springframework.org/schema/context
                                 http://www.springframework.org/schema/context/spring-context.xsd">
          <context:component-scan base-package="com.zxb"></context:component-scan>
      </beans>
      

      It’s not detailed enough~