Author Archives: Robins

[JVM] stack overflow error stackoverflowerror [How to Solve]

Stackoverflowerror is an error, not an exception.

Method is placed in the stack space. By default, it is only 512k-1024k. By making recursive calls, you can fill up the stack space.

public class StackOverFlowErrorDemo {
    public static void main(String[] args) {
        // Exception in thread "main" java.lang.StackOverflowError
        stackOverflowError();
    }

    private static void stackOverflowError() {
        stackOverflowError();
    }
}

Errorjava.lang.NullPointerException(no error message)

Solve the error: error: java.lang.nullpointerexception (no error message)

1、 Analyze the cause

Android studio often has dependencies or configuring related errors, which are generally caused by the conflict between Android gradle plugin version and gradle version and project files.

2、 Solution

Change the appropriate Android gradle plugin version and gradle Version (which version is appropriate may need to be tried)

3、 Specific operation

1. Through file – & gt; Project structure… Enter the project structure interface

2. In the project structure interface, select project, click the lower triangle, and select the program version to be installed

Then click OK, and Android studio will automatically make version changes to Android gradle plugin version and gradle version

Note that : Android gradle plugin version matches gradle version. Refer to the link: https://developer.android.com/studio/releases/gradle-plugin?hl=zh -cn

3. Recompile the program and solve the error

Resolve zuul the HTTP status 500 – internal server error error error displayed after startup

Problem Description:

When I use spring cloud to integrate zuul, the project can run, but when I access through the route, I will be prompted with HTTP status 500 – internal server error error

Causes:

The springboot version is inconsistent with the spring cloud starter Netflix zuul version
before modification, my configuration is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.5.4</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.cloud</groupId>
    <artifactId>api-gateway-dynamic-route</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>api-gateway-dynamic-route</name>
    <description>api-gateway-dynamic-route</description>
    <properties>
        <java.version>11</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-netflix-eureka-client -->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-netflix-zuul -->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
            <version>2.2.9.RELEASE</version>
        </dependency>
    </dependencies>

</project>

Solution

Change the version of springboot to 2.4.8

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.4.8</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.cloud</groupId>
    <artifactId>api-gateway-dynamic-route</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>api-gateway-dynamic-route</name>
    <description>api-gateway-dynamic-route</description>
    <properties>
        <java.version>11</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-netflix-eureka-client -->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-netflix-zuul -->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
            <version>2.2.9.RELEASE</version>
        </dependency>
    </dependencies>
</project>

So far, the problem caused by the version has been solved

Java.lang.stackoverflowerror error [How to Solve]

I just started learning Java. If something is wrong, please show mercy
when practicing Maven’s integrated SSM framework, a java.lang.stackoverflowerror error occurs when performing multi condition query. Generally, this error is due to the problem of dead loop or recursion, but I do not use loop and recursion. The error is shown in the figure, It calls a method of servie to find all the data in a table from mapper

examination was found to be a very low-level mistake. I injected it wrong, injected myself into the service, and then invoked my own method, resulting in an overflow error. 
after injecting mapper, it runs successfully

Error reporting: error building sqlsession

Error details:

Error building SqlSession.

The error may exist in com/lengzher/Dao/UserMapper.xml

Cause: org.apache.ibatis.builder.builderexception: error parsing SQL mapper configuration. Cause: org.apache.ibatis.builder.builderexception: error creating document instance. Cause: com.sun.org.apache.xerces.internal.impl.io.malformedbytesequenceexception: byte 1 of UTF-8 sequence of 1 byte is invalid.

Problem solving:

The error may exist in COM/lengzhe/Dao/usermapper.xml indicates that the problem may be wrong in usermapper.xml, such as wrong path, more spaces, etc. But our mistakes are more than that; The following error log writes: byte 1 of 1-byte UTF-8 sequence is invalid. The description is that Chinese appears in usermapper.xml!!! Note: do not appear Chinese in usermapper.xml, even comments!!! Delete the Chinese in usermapper.xml. The problem is solved

phpstudy Error while setting value ‘STRICT_TRANS_TABLES, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION

Today, I came to phpstudy. I found that MySQL could not be opened and reported this error. After a round of search, I solved the problem
Modify mysql.ini

sql_ mode =‘STRICT_ TRANS_ TABLES,NO_ ZERO_ IN_ DATE,NO_ ZERO_ DATE,ERROR_ F
OR_ DIVISION_ BY_ ZERO,NO_ AUTO_ CREATE_ USER,NO_ ENGINE_ ‘
I solved it like this. It depends on whether you can do it or not

Others have provided the following solutions
1. Phpstudy upgrade, SQL_ Mode is followed by more spaces. Just delete the spaces

2、 Directly annotate SQL_ Mode line content( After I do this, MySQL starts and then stops, and goes back and forth ε=( ´ ο`*))) Alas)

3、 Remove SQL_ No in mode_ AUTO_ CREATE_ USER

4、 SQL_ mode = NO_ AUTO_ CREATE_ USER,NO_ ENGING_ SUBSTITUTION

All the above are modified in mysql.ini

The requested URL returned error: 403 [How to Solve]

Administrator@ecs -9970 MINGW64 /c/harmonyohos/exoplayer
$ git clone https://gitee.com/xxxxx/xxxxx.git
Cloning into ‘exo-player_ ohos’…
remote: Access denied
fatal: unable to access ‘ https://gitee.com/xxxxx/xxxxx.git/ ‘: The requested URL returned error: 403

First, through Git   Config — global — list check whether the current git global information is the logged in gitee account. If the information is incorrect, reset it

git config –global user.name “xxxxx”

git config –global user.email “xxxxx”

git config –global user.password “xxxxx”

Then check whether the windows credential information is consistent with the logged in gitee account information

Control panel\all control panel items\credential manager\windows credentials, modify account

Module not found:Error:Can’t resolve ‘rc-animate/lib/CSSMotionList’ in ‘……’

explain

After the react project is compiled, sometimes the following error will be reported if you enter cnpm start

Add the following code to the package.json file to specify the version

"resolutions": {
  "css-animation": "1.5.0",
  "rc-animate": "2.8.2"
},

 

Add the following configuration in dependencies

"css-animation": "1.5.0",
"rc-animate": "2.8.2",

make[1]: *** [objs/Makefile:445: objs/src/core/ngx_murmurhash.o] Error

An error is reported after making

make[1]: *** [objs/Makefile:445: objs/src/core/ngx_murmurhash.o] Error 1
make[1]: Leaving directory '/app/nginx-1.9.9'
make: *** [Makefile:8: build] Error 2

Solution
find the corresponding maakefile file (mine is in/nginx/objs/makefile), remove the - error in the GCC parameter, and then make again

error reason
after checking the meaning of – werrori, it turns out that it requires GCC to treat all warnings as errors, and all resulting errors cannot be output to the next step

Related exception: Ubuntu 18.04 compiles nginx and reports an error objs/makefile: 440: recipe for target ‘objs/SRC/core/NGX_ murmurhash.o’ failed