Category Archives: How to Fix

About starting the service, you always get stuck in com. Alibaba. Druid. Pool. Druiddatasource | {datasource-1} initiated

Today, when debugging the program, it was good. Later, when restarting the service, it was stuck behind the log of com.alibaba.druid.pool.druiddatasource | {datasource-1} initiated, as shown in the figure

After a variety of debugging, restart or card here

Finally, I found that I made a breakpoint in a method of mapper interface, which is a real fucker

After canceling the breakpoint, it starts successfully  

PHP try will also throw an exception if it is executed successfully

PHP try will also throw an exception if it is executed successfully

try{
    Do something.
    Db::commit();
    return "success":
}cathe(\Exception $exception){
    Db::rollback();
    return "error":
}

Many of the returned results you get directly here, no matter whether your operation is successful or not, are returned as exceptions and go into error
Print exception error:

var_dump($e->getMessage());

The result is

"" 

There is no information
at this time, it should be noted that the return in the exception try will be thrown as an exception. There are two solutions.

First:
will

catch (\Exception $exception)

Change to (eg: use tp6, please rewrite the specific path within the framework)

catch (\think\Exception\DbException $exception)

Second:
save the information that needs to return in the variable, and finally output:

$_retData = [];
try{
    Do something.
    Db::commit();
    $_retData['data'] = [];
    $_retData['messages'] = "success";
}cathe(\Exception $exception){
    Db::rollback();
    return "error":
}
return $_retData;

RabbitMQ Error: {:plugins_not_found:[xxxx]}

Enter the instruction rabbitmq plugins enable rabbitmq management

appear   RabbitMQ Error: {:plugins_ not_ Found, [: rabbitmq management]} error prompt

It’s because the instruction is misspelled. It’s correct as follows:

rabbitmq-plugins enable rabbitmq_ Management (“-” changed to “)

You can also view the help through the rabbitmq plugins list command

Does the version of idea2020.1 import mybayis jar package or report an error? Error: (4,28) Java: package org.apache.ibatis.io does not exist

The other solution is to replace the local warehouse with the Maven warehouse of idea

But I don’t want to change it. I’m afraid there will be any trouble in the future. So I see another solution: using MVN idea:idea Command

In fact, this method can solve the problem that the same kind of package cannot be imported

The solution is as follows:

1. I use terminal of idea directly. Of course, I can also use CMD, but I have to go to the location of the project (directory with POM file) first,

2. Use MVN idea:idea Command:

 
  Finally, build success.

Then there is no error in guiding the package.

Cannot checkout from svn:E155004:Run ‘svn cleanup‘ to remove locks(type ‘svn help cleanup ‘ for deta

Cannot checkout from svn:E155004:Run ‘svn cleanup’ to remove locks(type ‘svn help cleanup ’ for details)

Error report when pulling items on SVN

Error report chart:

terms of settlement:

Open terminal and switch to the file location where the error is reported. For example, my file is D:: ideaprojects. Run the command SVN cleanup and pull the project again

java.lang.reflect.InvocationTargetException

java.lang.reflect.InvocationTargetException

Bad writing

The cause of the bug:
in the service layer, the value passed in by the public list findbyproperty (string propertyname, object value) {} method service of Dao layer is a value of string type, so an error is reported;

Modification:
rewrite the object type of Dao layer to string type to fix the bug.

After modifying the Tomcat configuration file in development, the modified configuration file will be automatically restored after ecplise starts Tomcat

The causes of the problem are as follows:


The reason is that when Tomcat is added in eclipse, eclipse will automatically store the Tomcat configuration file. When the Tomcat server starts in eclipse, it will replace the original Tomcat configuration file with its stored Tomcat configuration file.


resolvent:


1. Set ecplise to cancel the automatic publishing function

    in ecplise, select window preferences server launching to cancel automatically publishing Wen starting servers and click OK to finish operation

    2. In ecplise project, there is a server project, a Tomcat VX. X server at localhost config, in which there are configuration files to modify the files directly. When Tomcat is republished, it will use the configuration files here to cover the files in conf under Tomcat

Error in publishing project with Maven in idea. Git directory is not found! Please specify a valid

1、 Problem description

1. After using idea development tool and git to download the project, the folder was deleted because of GIT, resulting in problems in Maven packaging
picture display

2、 Solutions

1. Download the GIT project again
2. Retrieve the deleted git folder, which can be