Category Archives: Error

[Solved] IDEA use SVN Error: Cannot load supported formats: Cannot run program “svn”: CreateProcess error=2

Problem Description:

After IntelliJ idea is installed, the following errors will occur when submitting or updating and checking out code using SVN:

Cannot load supported formats: Cannot run program “svn”: CreateProcess error=2

The reason is that SVN uses the command-line tool. If there is no SVN command-line tool locally, an error will occur.

Solution:

1. Reinstall the SVN client

When installing the TortoiseSVN client, the command line client tools option must be selected. So Xiaobian quietly unloaded and then reinstalled. As shown in the figure:

When installing the TortoiseSVN client, the command line client tools option must be selected. So Xiaobian quietly unloaded and then reinstalled.

As shown in the figure:

Then select the first item will be installed on local hard drive

2. Configure SVN in idea

Remove the check mark from both check boxes.

Idea, which had been used for some time before, was deeply attracted by its cool black background, but it was never opened after going back. In fact, there are many basic functions that are not used well, which leads to digging such a big hole for yourself now. Since the pit fell in, you must fill it out, or you will fall in again.

[Solved] Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.

After adding swagger to the project, the following error occurred when running the program:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-11-21 14:20:40.012 ERROR 2968 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181) ~[spring-context-5.3.13.jar:5.3.13]
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) ~[spring-context-5.3.13.jar:5.3.13]
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) ~[spring-context-5.3.13.jar:5.3.13]
at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_212]
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155) ~[spring-context-5.3.13.jar:5.3.13]
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123) ~[spring-context-5.3.13.jar:5.3.13]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:935) ~[spring-context-5.3.13.jar:5.3.13]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) ~[spring-context-5.3.13.jar:5.3.13]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.0.jar:2.6.0]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) [spring-boot-2.6.0.jar:2.6.0]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:412) [spring-boot-2.6.0.jar:2.6.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) [spring-boot-2.6.0.jar:2.6.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) [spring-boot-2.6.0.jar:2.6.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1290) [spring-boot-2.6.0.jar:2.6.0]
at com.example1.demo1.Demo1Application.main(Demo1Application.java:10) [classes/:na]
Caused by: java.lang.NullPointerException: null
at springfox.documentation.spi.service.contexts.Orderings$8.compare(Orderings.java:112) ~[springfox-spi-2.9.2.jar:null]
at springfox.documentation.spi.service.contexts.Orderings$8.compare(Orderings.java:109) ~[springfox-spi-2.9.2.jar:null]
at com.google.common.collect.ComparatorOrdering.compare(ComparatorOrdering.java:37) ~[guava-20.0.jar:na]
at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355) ~[na:1.8.0_212]
at java.util.TimSort.sort(TimSort.java:220) ~[na:1.8.0_212]
at java.util.Arrays.sort(Arrays.java:1438) ~[na:1.8.0_212]
at com.google.common.collect.Ordering.sortedCopy(Ordering.java:855) ~[guava-20.0.jar:na]
at springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider.requestHandlers(WebMvcRequestHandlerProvider.java:57) ~[springfox-spring-web-2.9.2.jar:null]
at springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper$2.apply(DocumentationPluginsBootstrapper.java:138) ~[springfox-spring-web-2.9.2.jar:null]
at springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper$2.apply(DocumentationPluginsBootstrapper.java:135) ~[springfox-spring-web-2.9.2.jar:null]
at com.google.common.collect.Iterators$7.transform(Iterators.java:750) ~[guava-20.0.jar:na]
at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:47) ~[guava-20.0.jar:na]
at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:47) ~[guava-20.0.jar:na]
at com.google.common.collect.MultitransformedIterator.hasNext(MultitransformedIterator.java:52) ~[guava-20.0.jar:na]
at com.google.common.collect.MultitransformedIterator.hasNext(MultitransformedIterator.java:50) ~[guava-20.0.jar:na]
at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:249) ~[guava-20.0.jar:na]
at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:209) ~[guava-20.0.jar:na]
at com.google.common.collect.FluentIterable.toList(FluentIterable.java:614) ~[guava-20.0.jar:na]
at springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper.defaultContextBuilder(DocumentationPluginsBootstrapper.java:111) ~[springfox-spring-web-2.9.2.jar:null]
at springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper.buildContext(DocumentationPluginsBootstrapper.java:96) ~[springfox-spring-web-2.9.2.jar:null]
at springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper.start(DocumentationPluginsBootstrapper.java:167) ~[springfox-spring-web-2.9.2.jar:null]
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) ~[spring-context-5.3.13.jar:5.3.13]
... 14 common frames omitted
Disconnected from the target VM, address: '127.0.0.1:0', transport: 'socket'
Process finished with exit code 1

Solution:

Spring boot uses 2.6, swagger uses 2.9.2. Because the two versions are not compatible, this error is caused, so you can reduce spring boot to 2.5.6.

DevC++ Error: [Error] Id returned 1 exit status [How to Solve]

DEVC + + reports an error [error] ID returned 1 exit status

cause

The computer in the school computer room always compiles twice and always reports errors

Error reporting prompt

[Error] Id returned 1 exit status

Solution

premise

First check whether the console window of your program is closed, and then recompile if there is an error.

The following scheme is for the case where an error is still reported after closing the window

operation

Right click dev C + + icon –> Properties –> Compatibility –> Tick “run this program as administrator”“

Open dev C + + –> tools –> compilation options –> code generation/Optimization –> connector –> and set link objective C program to yes

Switch the compiler in the upper right corner of the dev C + + main page to debug mode (for example, tdm-gcc 4.9.2 64 bit debug)

If your computer has a restore card, please place the project and its files on an unprotected disk

[Solved] Java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

1. Error code

org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'entityManagerFactory' defined in class path resource 
[org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: 
Invocation of init method failed;
nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

2. Cause resolution

JAXB API is considered as Java EE API, so it is no longer included in the default classpath of Java se 9. In Java, 11 they are completely removed from the JDK.

<!--maven import-->
<dependency>
  <groupId>javax.xml.bind</groupId>
  <artifactId>jaxb-api</artifactId>
  <version>2.3.0</version>
</dependency>

[Solved] Execute the redis command redis-trib.rb to view the cluster information error: cannot load such file — redis (LoadError)

Problem Description:

When you execute the redis-trib.rb command to view the cluster status, an error is reported:

[aiprd@hadoop1 ~]$ redis-trib.rb check 192.168.30.10:7000
Traceback (most recent call last):
    2: from /home/aiprd/softwares/redis-3.2.5/src/redis-trib.rb:25:in `<main>'
    1: from /home/aiprd/app/ruby-2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/aiprd/app/ruby-2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- redis (LoadError)

Solution:

1. Judging from the error, the redis component is missing

2. Download redis component

Download address: https://rubygems.org/downloads/redis-4.1.2.gem

3. Upload to the server and install [offline installation of gem components]

[aiprd@hadoop1 softwares]$ gem install -l redis-4.1.2.gem 
Successfully installed redis-4.1.2
Parsing documentation for redis-4.1.2
Installing ri documentation for redis-4.1.2
Done installing documentation for redis after 0 seconds
1 gem installed

Because the redis I installed is version 3, the redis component downloaded should also be version 3

Download at: http://rubygems.org/downloads/redis-3.3.5.gem

4. Execute the command to view cluster information again

[aiprd@hadoop1 softwares]$ redis-trib.rb check 192.168.30.10:7000
[ERR] Sorry, can't connect to node 192.168.30.10:7000

An error is reported and the cluster node cannot be connected. Since the redis cluster has enabled authentication, the authentication password of the redis cluster needs to be configured in the client program of the redis component

5. Enter the ruby installation path and find the redis client.rb file

[aiprd@hadoop1 ~]$ cd /home/aiprd/app/ruby/lib/ruby/gems/2.6.0/gems/redis-4.1.2/lib/redis  #/home/aiprd/app/ruby是ruby的安装路径,即--prefix指定的路径
[aiprd@hadoop1 redis]$ ls -l client.rb
-rw-r--r-- 1 aiprd aiprd 16407 Aug  2 11:06 client.rb

6. Modify the file and add the password as follows:

:password => "3GESWjNba9@pMDG",

7. Execute the command to view cluster status information again

[aiprd@hadoop1 ~]$ redis-trib.rb check 192.168.30.10:7000
>>> Performing Cluster Check (using node 192.168.30.10:7000)
M: 2c8bb60808a0b2bcb155eb45759b8c989cb409f3 192.168.30.10:7000
   slots:0-5460 (5461 slots) master
   1 additional replica(s)
M: 4161a6852df45ee50a065e5e275a24cb1b77f1c1 192.168.30.10:7001
   slots:5461-10922 (5462 slots) master
   1 additional replica(s)
M: b7fdb4a783aa829818eb804c0cc04161ece5e845 192.168.30.10:7002
   slots:10923-16383 (5461 slots) master
   1 additional replica(s)
S: e6b0a64e05e5f3e8dc4b369967090f78fe3c87dc 192.168.30.11:7005
   slots: (0 slots) slave
   replicates b7fdb4a783aa829818eb804c0cc04161ece5e845
S: 37168bd4232c2d1f1f9a22bd88f221e4f15bf4d9 192.168.30.11:7003
   slots: (0 slots) slave
   replicates 4161a6852df45ee50a065e5e275a24cb1b77f1c1
S: cab31dd3554524187ffb4a2758af91f72c8238ac 192.168.30.11:7004
   slots: (0 slots) slave
   replicates 2c8bb60808a0b2bcb155eb45759b8c989cb409f3
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.

The command is executed successfully, and the problem is solved.

[Solved] Mariadb Start Error: Could not increase number of max_open_files to more than 1024 (request: 5035)

Fault screenshot

Solution:

vim /usr/lib/systemd/system/mariadb.service
#Addn below the [service]

[Service]
LimitNOFILE=infinity

verification

systemctl daemon-reload
systemctl   restart  mariadb
systemctl   status   mariadb

expand
MySQL reported an error “Could not increase number of max_open_files to more than 1024”
Modify kernel parameters

 vim /etc/security/limits.conf

*               soft    nofile          8192
*               hard    nofile          8192

Restart the system or temporarily modify kernel parameters

 # ulimit -n 8192
 systemctl   restart  mysqld

[Solved] oracle Install Error: Checking monitor: must be configured to display at least 256 colors

Solution:

Method 1:
Run the following command to install vnc
yum install tigervnc tigervnc-serverv
Method 2:
If you execute ./runInstaller, it still reports an error as

Could not execute auto check for display colors using command /usr/bin/xdpyinfo <<failed

Install xdpyinfo

yum install xdpyinfo

[Solved] RuntimeError: one_hot is only applicable to index tensor

# First look at the size of the incoming tensor, the incoming tensor's dimension is not enough, then you need to add dimensionality
# Here the size of the labels is tensor([n]), pass in the need to add dimensionality
# If the above problem occurs, just add to.(torch.int64) at the end to solve it
# n is the kind to be divided
labels = torch.nn.functional.one_hot(labels.unsqueeze(0).to(torch.int64), n)

Pro test valid!!!