Author Archives: Robins

[Solved] Spring Boot Startup Error: DataSourceProperties$DataSourceBeanCreationException

Error message:

Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver

Reason of error :

The @Configuration annotation injects a dataSource bean into spring. Because there is no configuration information related to dataSource in the project, when spring creates a dataSource bean, an error will be reported due to lack of relevant information.

 

Solution :

Add a condition @SpringBootApplication(exclude = {DataSourceAutoConfiguration. class}) to the annotation on the startup boot class of Spring boot to prevent Spring boot from automatically injecting dataSource

[Solved] VSCode Click to Start Debug Error: “The Language Support for Java server crashed”

Because vscode is often in the unused state, there are some problems when starting. The following errors will be prompted

The Language Support for Java server crashed 5 times in the last 3 minutes. The server will not be restarted

The java.jdt.ls.vmargs field in the previous setting.json is filled in casually. An error message will appear during runtime. Click on it to check the log, and you can see that the error statement is in the line where you just filled it out, because The path cannot be found and the server crashes.

Solution: Re-assign the “java.jdt.ls.vmargs” field to: “-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication”. Then reopen vscode or reload window in Ctrl+Alt+P.

SpringMVC Error: Cannot resolve org.springframework:spring-webmvc:5.2.9.RELEASE

Maven import dependency problem

Question:

When adding spring webmvc dependencies, Maven reports an error, while other spring dependencies can be imported.

Cannot resolve org.springframework:spring-webmvc:5.2.9.RELEASE

Debug:

Query the local Maven warehouse: C:\users\sang\M2\repository, find the package that failed to import, and find that it has been imported.

It is speculated that Maven took a wind when importing dependencies. Delete the folder corresponding to the incorrectly imported dependencies, that is, delete the spring webmvc folder and reload all Maven project in the project

At this point, all dependencies are loaded successfully. However, Maven relies on a library with red wavy lines. Just restart idea.

[Solved] Origin parameter: http://localhost:8081/actuator/hystrix.stream is not in the allowed list of proxy

Use the hystrix dashboard to monitor errors

Error 1

Origin parameter: http://localhost:8081/actuator/hystrix.stream is not in the allowed list of proxy host names.
If it should be allowed add it to hystrix.dashboard.proxyStreamAllowList.

Because the proxy address is not configured.

Solution: add the following configuration in the application

hystrix:
  dashboard:
    proxy-stream-allow-list: "localhost"

Error report 2

Solution: Expose hystrix Stream endpoint

management:
  endpoints:
    web:
      exposure:
        include: hystrix.stream

[Solved] Ubantu CONDA Error: from CONDA cli import main ModuleNotFoundError: No module named ‘conda’

Recently, when I ran an experiment on the server in the laboratory, I needed to install another tensorboardx library. Due to my improper operation, I did CONDA install tensorboardx without switching to my own environment. As a result, when I found out later, something had been updated, and CONDA’s system crashed.

Later, I found many tutorials on the Internet. One of them found similar problems in the stack overflow community. He only needs to update the existing CONDA environment with the original Anaconda installation package.

bash Anaconda3-5.3.1-Linux-x86_64.sh -u

Remember that you must install Anaconda’s installation package. If it’s other installation packages, you can’t.

For example, I can’t use the package from windows.

How to Solve webdriver-manager Error

#When using webdriver manager to run crawlers frequently, the following errors are often reported

HTTPSConnectionPool(host=’chromedriver.storage.googleapis.com’, port=443): Max retries exceeded with url: /LATEST_ RELEASE_ 96.0.4664 (caused by newconnectionerror (‘& lt; urlib3. Connection. Httpsconnection object at 0x051bd478 & gt;: failed to establish a new connection: [winerror 10060] the connection attempt failed because the connector did not reply correctly after a period of time or the connected host did not respond.))

#Solution

Enter chrome.py

Then enter manager.py

Enter the above method and add the following two lines to get_latest_release_version()

react Cannot find file: ‘index.js’ does not match the corresponding name on disk:

1. Error information

./src/components/Header/index.jsx 2.42 KiB [built] [code generated]

ERROR in ./src/components/Header/index.jsx 5:0-35
Module not found: Error: Cannot find file: 'index.js' does not match the corresponding name on disk: '.\node_modules\prop-Types\prop-types'.
 @ ./src/App.js 5:0-41 104:40-46
 @ ./src/index.js 6:0-24 8:38-41

webpack 5.65.0 compiled with 1 error in 193 ms

2. Problem

Error introducing proptypes

import PropTypes from 'prop-Types' =>>>>>>> import PropTypes from 'prop-types'