Category Archives: Error

[Solved] log4j:WARN No appenders could be found for logger

Run the program and report the following warnings:

log4j:WARN No appenders could be found for logger (..).
log4j:WARN Please initialize the log4j system properly.

*Where “..” is the name of a package, such as org.apache.flume.api.abstractrpcclient

Solution:

Add the log4j.properties file in the Src/main/Java/resources directory and add the following:

log4j.rootLogger=debug, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

The whole program exits when [QT] qmessagebox is closed

Recently, I wrote a background program. The main window has been hidden and qmessagebox will pop up under specific circumstances. If you click the OK button in the pop-up window at this time, the whole program will exit.

The final solution: add a sentence to the main function   QApplication::setQuitOnLastWindowClosed(false);

[Solved] asp.net core Microsoft.Hosting.Lifetime[0] Application is shutting down…

During debugging of asp.net core program or after running dotnet command in production environment, an error is reported: Microsoft. Hosting. Lifetime [0] application is shutting down

My reason is that several big brothers wrote several background tasks and inherited the backgroundservice. The code used in the executeasync method is executed synchronously.

In other words, the program must wait for all customized backgroundservices to be executed.

Now that the reason is found, wrap all the code in task.Run() in the executeasync method body.

Bash: sudo: command not found when sudo is used in the docker container

terms of settlement:

Check the Linux system version first:

cat /proc/version

1. RedHat mainly includes RedHat, Fedora, CentOS, etc;

The package management tool of RedHat series is Yum and up2date

yum install sudo -y

 

2. Debian system mainly includes Debian, Ubuntu, mint and their derivatives;

The package management tool of Debian series is apt get, which executes

apt-get update

apt-get install sudo

 

Error in idea project startup: lambda expression is not supported in Java: – source 1.5

Error: lambda expressions are not supported in Java: – source 1.5

Reason: the JDK version used in this project is less than 1.8

The error information is as follows:

  The solution is as follows:

First, judge whether it is a POM problem: it will automatically change to 1.5 after modifying the environment

Solution: https://www.cnblogs.com/shining-feifan/p/15587151.html

Step 1: click “project structure” in the menu bar in the upper right corner

  Step 2: on the “project structure” page, select “SDKs”, select jdk8, and do not click the “+” button to add.

  Step 3: on the project structure page, select a module and modify the sources configuration

   Step 4: on the project structure page, select a module and modify the dependencies configuration

 

[Solved] Unity2020 error: GUIText has been removed. Use UI.Text instead

1. Problems

The errors reported by unity2020 during play scene are as follows:

Assets\Standard Assets\Utility\SimpleActivatorMenu.cs(11,16): error CS0619: ‘GUIText’ is obsolete: ‘GUIText has been removed. Use UI.Text instead.’

2. Solutions

Double click the red box in the figure above, unity will automatically jump to visual studio and modify the following two positions,

Amend as follows:

Then save.

[Solved] ERROR 001272: Analyzer errors were encountered (codes =7)

When publishing services to ArcGIS Server using ArcMap, you may report an error, error 001272, especially the MXD generated by different versions of ArcMap

When another version of ArcMap is published, a small version is also considered a version.

It may also be related to the definition query in the layer. When searching on the Internet, most of them say that connecting to the spatial database does not support definition query.

But it’s not necessarily. Just use the current ArcMap to save an MXD and open a new MXD for publishing.

That’s how my problem was solved.

https://www.reddit.com/r/gis/comments/i065sx/error_001272_analyzer_errors_were_encountered/

[Solved] Rsync Error: gid 4294967295 (-1) is impossible to set on…

error

$ ./release.sh
sending incremental file list
gid 4294967295 (-1) is impossible to set on "/data/www/qa/."
gid 4294967295 (-1) is impossible to set on "/data/www/qa/README.MD"
./
index.html
gid 4294967295 (-1) is impossible to set on "/data/www/qa/css"
gid 4294967295 (-1) is impossible to set on "/data/www/qa/css/index.css"
gid 4294967295 (-1) is impossible to set on "/data/www/qa/css/index.less"
gid 4294967295 (-1) is impossible to set on "/data/www/qa/img"
gid 4294967295 (-1) is impossible to set on "/data/www/qa/img/api.webp"
gid 4294967295 (-1) is impossible to set on "/data/www/qa/img/aws.ico"
gid 4294967295 (-1) is impossible to set on "/data/www/qa/img/jenkins.ico"
gid 4294967295 (-1) is impossible to set on "/data/www/qa/img/lanhu.ico"
gid 4294967295 (-1) is impossible to set on "/data/www/qa/img/rap2.png"
gid 4294967295 (-1) is impossible to set on "/data/www/qa/img/sign.png"
gid 4294967295 (-1) is impossible to set on "/data/www/qa/img/tapd.ico"
gid 4294967295 (-1) is impossible to set on "/data/www/qa/img/tool.jpg"
gid 4294967295 (-1) is impossible to set on "/data/www/qa/js"
css/
img/
js/

sent 1,191 bytes  received 1,260 bytes  4,902.00 bytes/sec
total size is 66,847  speedup is 27.27
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1330) [sender=3.2.4dev]

reason

The local file permissions are disordered, and some permission attributes cannot be synchronized after synchronization

Solution:

Local file RE modification permission

 rsync --exclude=".git" -avz ./ ../qq
 cd ../qq
 find -type d | xargs chmod.exe 755
 find -type f | xargs chmod 644

[Solved] Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the correspond server addresses

Problem Description:

An error is reported when using MapReduce to implement data De duplication

Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the correspond server addresses

In addition, there are: Java.Lang.NoClassDefFoundError; java.io.IOException: Cannot initialize Cluster.

Problem-solving:

These problems are due to the incomplete import of MapReduce and Hadoop dependencies:

<dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
      <version>3.2.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-hdfs</artifactId>
      <version>3.2.0</version>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client</artifactId>
      <version>3.2.0</version>
    </dependency>

    <!--mapreduce-->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-mapreduce-client-core</artifactId>
      <version>3.2.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-mapreduce-client-common</artifactId>
      <version>3.2.0</version>
    </dependency>

So far, the problem has been solved

[Solved] PMML namespace URI httpwww.dmg.orgPMML-4_4 is not supported

When the machine learning model is deployed across platforms using PMML, the error occurs when the model is loaded in Java

Reason: the jar package version of Java does not match the PMML file version. The jar package version is too low to parse the PMML file. If you upgrade the jar package, the current syntax of the loading model is not available; Therefore, it is safe and reliable to reduce the version number of PMML files.

Solution: change xmlns = “…/pmml-4_4” in PMML file to xmlns = “…/pmml-4_3”

Run again, successful.