Author Archives: Robins

[Solved] Maven Compile Error: “java.lang.OutOfMemoryError: Java heap space”

The project executes MVN clean install successfully.
an error is always reported during the debug startup in the idea,
a compilation error is reported: Maven resources production: XXX Java.nio.file.invalidpathexception:

java.lang.OutOfMemoryError: Java heap space

↓↓↓↓↓↓↓↓

After trying all kinds of methods, I still don’t know

Select build -> on the idea directory; Rebuild project (build -> rebuild project) and idea recompile the project

Perfect solution

How to Solve Docker Desktop Start Error in Win10

Error message

Docker.ApiServices.WSL2.WslKernelUpdateNotInstalledException: Throws an exception of type 'Docker.ApiServices.WSL2.WslKernelUpdateNotInstalledException'.
    At Docker.ApiServices.WSL2.WslShortLivedCommandResult.LogAndThrowIfUnexpectedExitCode(String prefix, ILogger log, Int32 expectedExitCode) location C:\workspaces\PR-16070\src\github.com\docker\pinata\win\src\Docker.ApiServices\WSL2\ WslCommand.cs: line number 140
    At Docker.Engines.WSL2.WSL2Provisioning.<DeployDistroAsync>d__17.MoveNext() location C:\workspaces\PR-16070\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\ WSL2Provisioning.cs: line number 169
--- End of stack trace in previous position where exception was thrown ---

Solution:

Method 1

Execute CMD command in administrator mode Netsh Winsock reset

Restart docker desktop to solve the problem!

Method 2

Open website https://czf-net.xyz/res/

Download WSL msi

install

Restart docker desktop to solve the problem!

Greenplum Error: query plan with multiple segworker groups is not supported

Error message:

ERROR:  query plan with multiple segworker groups is not supported
HINT:  likely caused by a function that reads or modifies data in a distributed table
CONTEXT:  PL/pgSQL function actv_comp(date,date) line 4 at RETURN QUERY

We may often encounter the need to call custom functions in query, but in Greenplum, if you have query in the function and then call the function in query, you will report it wrong.

example:

Create function

iap=# create or replace function f1() returns text as $$
declare
c1 text;
begin
execute 'select info from tt1 limit 1' into c1;
return c1;
end;
$$ language plpgsql;

Invocation in query:

iap=# select f1() from tt1;
ERROR: query plan with multiple segworker groups is not supported
HINT: likely caused by a function that reads or modifies data in a distributed table
CONTEXT: SQL statement 'select info from tt1 limit 1'
PL/pgSQL function f1() line 5 at EXECUTE statement

This is due to the MPP feature in greenplus. Only part of the data is saved in each node. GP6 starts to support replication tables, so we need to change the table into a replication table to ensure that there is a complete data in each node.

In addition, we need to modify the function to immutable type.

– modify the table distribution to replicated type

alter table tt1 set Distributed REPLICATED;

Second, modify the function to immutable type

iap=# create or replace function f1() returns text as $$
declare
c1 text;
begin
execute 'select info from tt1 limit 1' into c1;
return c1;
end;
$$ language plpgsql immutable;
CREATE FUNCTION

Call again:

iap=# select f1() from tt1 limit 1;
f1
----------------------------------
d810ed19ec188ddf3af8a14dbd341c3c
(1 row)

Summary:
, if you need to call UDF function in query, if you encounter “ERROR: query plan with multiple segworker groups is is,” then the solution is as follows:

Modify table to copy table

Modify the function to immutable type

[Solved] springboot Startup Error: Bean with name ‘xxxxService‘ has been injected into other beans

An error was reported when starting the project in the local test today:

Bean with name ‘commonService’ has been injected into other beans [] in its raw version as part of a circular reference, but has eventually been wrapped. This means that said other beans do not use the final version of the bean. This is often the result of over-eager type matching – consider using ‘getBeanNamesOfType’ with the ‘allowEagerInit’ flag turned off, for example.**

Reason for error reporting:
it depends on a loop. Now I have a method that ServiceA needs to call serviceb, so ServiceA depends on serviceb, and there is a method that calls ServiceA in serviceb, which forms a loop dependency. When spring initializes a bean, it does not know which bean to initialize first, and an error will be reported.

What is circular dependency
bean a depends on B, and bean B depends on A. in this case, circular dependency occurs
bean a → bean B → bean a
more complex indirect dependencies cause cyclic dependencies as follows
Bean A → Bean B → Bean C → Bean D → Bean E → Bean A

What are the consequences of circular dependencies
when spring is loading all beans, spring tries to create beans in the order that they can be created normally
for example, there are the following dependencies:
bean a → bean B → bean C
spring first creates bean C, then creates bean B (injects C into b), and finally creates bean a (injects B into a).

However, when there is a circular dependency, spring will not be able to decide which bean to create first. In this case, spring will generate the exception beancurrentyincreationexception.

Solution:
1. Refactor the code and decouple it
2. When injecting beans, add @lazy annotation on the two interdependent beans

How to Solve nginx Install Error in Mac

Error Messages:
==> Installing dependencies for nginx: pcre
==> Installing nginx dependency: pcre
error: could not lock config file .git/config: Permission denied
Error: Command failed with exit 255: git
Solution: sudo chown -R $(whoami):admin /usr/local/* && sudo chmod -R g+rwx /usr/local/*

Files Upload Error: err_cert_common_name_invalid [How to Solve]

Scenario:

The front end needs to upload files to the back-end interface, but an error is reported err_cert_common_name_invalid

Solution:

In fact, it is a problem of HTTPS protocol trust. You can enter the developer mode, select the wrong statement in the console, right-click to open the link in a new window, and the browser will prompt that the link is unsafe. At this time, you can continue to trust the website and open it.

Just import the file next time.

By the way, record the code of uploading files with El upload:

CSS section

            <el-upload
              class="upload-demo"
              ref="upload"
              :headers="myheader"
              :action="actionUrl"
              :on-change="handleChange"
              :on-success="handlesuccess"
              :on-remove="handleRemove"
              :on-preview="handlePreview"
              :file-list="fileList"
              :show-file-list="false"
              :auto-upload="false"
              :on-exceed="handleExceed"
              style="float: left"
              :limit="1"
              accept=".xlsx, .xls"
              name="file"
            >
              <el-input v-model="form.snapPath" style="width: 300px"></el-input>
              <template #tip>
                <div class="el-upload__tip">
                  Upload files with keyword names, support .xlsx, .xls
                </div>
              </template>
            </el-upload>

JS part:

//submit files
    submitUpload() {
      this.submitLoading = true;
      let fd = new FormData();
      fd.append("name", this.fileList[0].name);
      fd.append("file", this.fileList[0].raw);
      let url =
        "";
      axios
        .post(url, fd, {
          headers: {
            "Content-Type": "multipart/form-data",
            "TOKEN": cookies.getToken()
          }
        })
        .then(() => {
          this.submitLoading = false;
          this.$message({
            message: "Upload Successfully!",
            type: "success"
          });
          this.handleClose();
        })
        .catch(() => {
          this.submitLoading = false;
        });
    },
    handleExceed(files) {
      this.$refs.upload.clearFiles();
      this.$refs.upload.handleStart(files[0]);
    },

 

NodeJS Connect MYSQL Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

I’m mysql8 For versions above 0, start to report errors when connecting to the MySQL database in the server with nodejs

This means that the server starts up, but there is an error in the password protocol in the database. The result I found on the Internet tells me that it is mysql8.0 supports a new cryptographic protocol, but nodejs does not support it at present.

The following is my solution after avoiding the pit, which may not be applicable to everyone

1. Log in to MySQL server

Open the command line as an administrator and enter

mysql -u administrator -p

If you are prompted that MySQL is not an executable file, you can CD on the command line to the bin directory in mysql, or add Mysql to the environment variable

Note: the above root is the user name you want to modify. It may not be administrator. Mine is administrator

2. Enter the password

Then enter the password and enter mysql

3. Select database

Therefore, first we need to select the database and enter it on the command line

use mysql

Note: This is mysql, not any other name, unless you modify the name of the table in the database where the user name and password are stored, but the probability is very small, and you can’t move there.

If the wrong database is selected, the following errors will be prompted in the subsequent password blank operation

4. Leave password blank

If the original password is not blank and the password is modified directly, an error will be reported

Password blank operation, enter

update user set authentication_string='' where user='administrator';

The above administrator is still the user name you need to modify the password protocol

5. Refresh

This step is important

flush privileges;

6. Modify password and agreement

I’ve been stuck in this step for a long time

When I modify the password agreement, the error in the figure appears

After checking a lot of information, I understand

Open the database, MySQL database and user table, and you can see

The host before the user name I want to modify is’% ‘instead of’ localhost ‘, so I need to change the localhost in the command to%

alter user 'administrator'@'%' identified with mysql_native_password by '123456';

The above administrator is the user name you need to change your password, and 123456 is your password

This completes all steps

MySQL forgot password modification, etc. many online tutorials don’t seem to apply to MySQL 8 0. Write this part when you have time.

[Solved] Failed to load D:\Android SDK\android-sdk-windows\build-tools\29.0.3\lib\dx.jar

Eclipse+ADT

I encountered an error while running the code today

[2022-01-10 21:57:18 – Dex Loader] Failed to load D:\Android SDK\android-sdk-windows\build-tools\29.0.3\lib\dx. jar
[2022-01-10 21:57:18 – BrewClock] Unknown error: Unable to build: the file dx. jar was not loaded from the SDK folder!

Cause: Eclipse automatically uses the highest version of the SDK, and ADT is lower than the SDK version

Solution:

Open SDK manager.exe download the minimum version of buildtools 20 21

Open project.properties, fill in the last line with SDK.buildtools=21.0.0

21.0.0 is the version number of buildtools you downloaded

You can find it in D:\Android SDK\ Android-SDK-windows\build-tools file

Save and run again