Author Archives: Robins

[Solved] SpringBoot Error: Caused by: org.yaml.snakeyaml.error.YAMLException: java.nio.charset.Malforme

Springboot error prompt application YML error

The main error messages are as follows:

Caused by: org. yaml. snakeyaml.error.YAMLException: java.nio.charset.Malforme

Caused by: org.yaml.snakeyaml.error.YAMLException: java.nio.charset. MalformedInputException: Input length = 1

I don’t understand the meaning of the second sentence now, but because I modify the application directly The suffix of the properties file has been changed to application yml

Solution:

Create a new file: application.yml, and then copy the old content, it is done!

Ubuntu Install opencv320 Error: error: ‘CODEC_FLAG_GLOBAL_HEADER’ was not declared in this scope

Modify /opt/opencv/opencv-3.2.0/modules/videoio/src/cap_ffmpeg_impl.hpp, add the following in the header:

#define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22)
#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
#define AVFMT_RAWPICTURE 0x0020

Save and recompile.

[Solved] Could not resolve dependencies for project xxx: Could not find artifact xxx

introduction

When running a module, an error is reported if the dependency of B module cannot be found. A. B modules are all in the project.

Error message

[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------< com.totainfo.schedulingsystem:aps >------------------
[INFO] Building aps 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.totainfo.schedulingsystem.strategy:aps-strategy-schedule-wip:jar:0.0.1-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.872 s
[INFO] Finished at: 2021-12-30T20:55:47+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project aps: Could not resolve dependencies for project com.totainfo.schedulingsystem:aps:jar:0.0.1-SNAPSHOT: Could not find artifact com.totainfo.schedulingsystem.strategy:aps-strategy-schedule-wip:jar:0.0.1-SNAPSHOT -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Process finished with exit code 1

Cause analysis

I previously delegated the build of the code to Maven through setup.

So when I click Run, idea will not use the built-in build function to build, but use Maven to build.

When you click the run configuration, you will find that the behavior before startup is build .

Looking at the log, we can see that Maven will only build the current module, so the dependencies of other modules cannot be found.

Solution:

Modify the run configuration and build project before running.

Click Run. You can see from the log that Maven has built other modules. The problem has been solved.

[Solved] java.io.IOException: error constructing MAC: java.lang.SecurityException: JCE cannot authenticate the provider BC

IOException: error constructing MAC: java.lang.SecurityException: JCE cannot authenticate the provider BC this problem, Google basically modify the jdk: https://open.unionpay.com/cmweb/support/faq/mchlist?id=259 . But I changed it can not be, in the test environment found no report this error, check, the test environment with jdk1.8, my local use is 1.6, the local jdk to 1.8 will not report the error

[Solved] DCNv2 Compile Error: error: identifier “THCudaBlas_SgemmBatched” is undefined

Solution:

Reduce pytorch version to 1.7.0;

#Uninstall the original torch and torch vision first

pip uninstall torch
pip uninstall torchvision

#Install pytorh1.7

pip install torch==1.7.0+cu110 torchvision==0.8.1+cu110 -f https://download.pytorch.org/whl/torch_stable.html

Recompile.

Pytorch Install Error: OSError: [WinError 126] Could not Find the Module, Error loading “xx\lib\site-packages\torch\lib\asmjit.dl

conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch

The installation can be completed normally, but an error occurred in the import torch vision:

C:\Users\xuyic\anaconda3\envs\pytorch\lib\site-packages\torchvision\io\image.py:11: UserWarning: Failed to load image Python extension: [WinError 126] 找不到指定的模块。
  warn(f"Failed to load image Python extension: {e}")

Solution:

1. From cuda10.2 to 11.3

2. Reduce the version of torchvision, such as 1.3.0

VBox install Ubuntu 16.04 shared folder suddenly fails Error: error: unrecognized command line option ‘- fstack protector strong’

Cause investigation

#gcc -v

Found version 4.7.7

but

Installing the above enhanced software requires the gcc5.0 provided with 16.04 Version 4

Solution:

1  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 100
2  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 50
3  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 100
4  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 50
Then Re-install
#./autorun.sh
Done!

[Solved] typescript:error TS2531: Object is possibly ‘null’.

Why? Yes, the TS compiler diagnosed document at compile time Getelementbyid (‘test ‘) may be null, so a prompt is given: the object may be null. The solution is as follows:

document.getElementById('test')!.innerHTML = greeter(user);

Add one!, What does the exclamation point mean?It is actually a not null assertion operator. It does not perform runtime check and tells the compiler that it only needs to know this thing

[Solved] MySQL Workbench Connect Database Error: SSL connection error: SSL is required but the server doesn’t support it

After downloading MySQL worbench, the MySQL downloader cannot connect to the remote database, prompting errors such as SSL

Solution: do not use SSL. Enter the parameter: usessl = 0 in the others box on the advance tab page to connect.