Category Archives: Error

How to Solve Mybatis generator Execute Error

Generator version

<!-- MyBatis -->
    <dependency>
      <groupId>org.mybatis.generator</groupId>
      <artifactId>mybatis-generator-core</artifactId>
      <version>1.3.3</version>
    </dependency>

Error reporting information

Solution:

The current version of generator is due to org mybatis. The version of generator is too low and needs to be upgraded to 1.3.7

[Solved] Nginx-FastCGI-“Primary script unknown” while reading response header from upstream,

After adding fastcgi support to nginx, verify the PHP page and report an error file not found. Check the log display

FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream,

At first, I thought it was a permission problem, so I started to configure it first

location  ~ \.php$ {
          root  /data/nginx/html/php;
          default_type text/html;
          fastcgi_pass  127.0.0.1:9000;
          fastcgi_index  index.php;
          #fastcgi_param  SCRIPT_FILENAME /data/nginx/php$fastcgi_script_name;
          fastcgi_param   SCRIPT_FILENAME  $document_root$fastcgi_script_name;   //error
          fastcgi_param   SCRIPT_FILENAME  $document_root$fastcgi_script_name;
          include  fastcgi_params;
       }

It looks like the configuration is the same, in fact, there is a w problem here, I am a direct copy of win to linux,, using nginx -t file is OK, not detected at all, you can download the WinMerge file to compare the upper and lower lines, you can also cat -A detect win spaces.

Apache : Error: Apache shutdown unexpectedly [How to Solve]

Apache: error: Apache shutdown unexpectedly (share my solution here)

-Error Description:

This error is usually that port 443 or port 80 is occupied, so the service cannot be started.


-Solution (1):

1. Use the command line to view the port occupation

netstat -ano

You can view the occupied port 80 or 443 according to the local address, and then find the corresponding PID

2. Use the PID just found to find the corresponding process in the task manager

3. Just finish the process

Note: since the process of each person occupying the port is different, it may also be the process of the system. Don’t end the process blindly here. It is suggested that Baidu take a look at what this process does


-Solution (2):

1. Open xampp and click config

Select service and port settings

Then change the main port and SSL port to the port number that is not occupied

2. Modify Apache configuration file

Open httpd Conf file

Find listen 80 and replace it with the port number of the main port modified above

Find servername localhost: 80 and replace 80 with the port number of the main port modified above

Then open httpd SSL conf

Find listen 443 and replace it with the port number of the SSL port modified above

Finally, close xampp, reopen it and start it again

[Solved] Hadoop Error: ERROR: Cannot set priority of namenode process

hadoop start error:
Starting namenodes on [733ec62951d5]
733ec62951d5: ERROR: Cannot set priority of namenode process 868
Starting datanodes
localhost: ERROR: Cannot set priority of datanode process 974
2022-01-15 13:56:41,689 ERROR conf.Configuration: error parsing conf core-site.xml

It was noticed that it was caused by an error in the core-site.xml configuration file. After modification, the correct core-site.xml configuration file is as follows.

?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License. See accompanying LICENSE file.
-->

<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
        <name>fs.defaultFS</name>
        <value>hdfs://172.17.0.3:9000</value>
</property>
</configuration>

Correct HDFS site The XML configuration file is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License. See accompanying LICENSE file.
-->

<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
    <name>dfs.replication</name>
    <value>1</value>
</property>
</configuration>

Error: exec npm config get prefix ERROR: Command failed: npm config get prefix [How to Solve]

Error: exec NPM config get prefix error: command failed: NPM config get prefix — a solution to NPM error reporting

Directory error: exec NPM config get prefix error: command failed: NPM config get prefix — a solution to NPM error reporting content solution how error reporting occurs

Error content

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'process-nextick-args'
Require stack:
- C:\Users\wh2008112\AppData\Roaming\npm\node_modules\npm\node_modules\readable-stream\lib\_stream_readable.js
      ....

Solution:

Find NPM cache and NPM folder (previous version of NPM cache) in roaming folder

Roaming Directory:

C:\Users\Administrator\AppData\Roaming

Move NPM cache and NPM folder into nodejs folder

3. Check the NPM version, that is, solve the problem

npm -v

How do errors occur

In the process of NPM install failure, the NPM package was downgraded (down to 3.8, up to now the NPM version is 8.3.X). This problem occurred when upgrading again

It may be caused by the inconsistency between the old version of NPM and the new version of NPM cache directory. So that repeated redoing of nodejs can not be solved. You can only manually move the folder for operation.

How to fix VirtualBox session error: Call to NEMR0InitVMPart2 failed VERR_NEM_INIT_FAILED (VERR_NEM_VM_CREATE_FAILED)

How to fix VirtualBox session error: Call to NEMR0InitVMPart2 failed VERR_NEM_INIT_FAILED (VERR_NEM_VM_CREATE_FAILED)
Learn how to fix this error that prevents Virtual Machines from starting in VirtualBox.

After a couple of months without working with Virtual Machines, I tried to launch an old ubuntu 20.04 machine in VirtualBox to test some stuff. Curiously, I got a kernel panic error, whose “solution” ended up causing the exception that I’m going to solve in this article. I updated VirtualBox 6.1.16 to the 6.1.28 version and tried to launch the machine again but without success.
After some research and applying the solution that I’m going to show in this article, the virtual machines were able to work again as usual.
How to fix

bcdedit /set hypervisorlaunchtype off

Then run this one:

DISM /Online /Disable-Feature:Microsoft-Hyper-V

Finally, be sure to restart your computer, try launching your virtual machine once again and voila! It should work now.
Notes about this problem
Normally, this will only appear the first time that you work with VirtualBox. However, if the problem reappears a couple of months later after installing a new version of VirtualBox, you may be probably using Docker Desktop as well in your computer. Am I right?:

In case you’re not using Docker, if you decide to use it, you will enter into this error cycle whenever you want to work one day with VirtualBox and the other day with docker, as for Docker in order to properly work, HyperV, Virtual Machine Platform, Windows Subsystem for Linux and the Windows Sandbox features must be enabled in your system (check docker docs). So, if you’re done with VirtualBox for today and want to work tomorrow with Docker, be sure to enable the services again:

bcdedit /set hypervisorlaunchtype auto 

And this one:

DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V

And restart for the changes to take effect.
Happy coding ❤️!

[Solved] Error: failed to install CRD crds/crd-alertmanager.yaml: unable to recognize “”: no matches for kind “CustomResourceDefinition” in version “apiextensions.k8s.io/v1beta1”

My problem is that this error is reported when installing} Prometheus operator in k8s cluster

Cause of the problem

My cluster version is too high, version 1.22, and the name of the version after Prometheus operator has been changed. The old version is incompatible,

┌──[[email protected]]-[~/ansible/k8s-helm-create]
└─$helm  search repo prometheus-operator
NAME                            CHART VERSION   APP VERSION     DESCRIPTION
ali/prometheus-operator         8.7.0           0.35.0          Provides easy monitoring definitions for Kubern...
azure/prometheus-operator       9.3.2           0.38.1          DEPRECATED Provides easy monitoring definitions...
┌──[[email protected]]-[~/ansible/k8s-helm-create]
└─$helm install liruilong  ali/prometheus-operator
Error: failed to install CRD crds/crd-alertmanager.yaml: unable to recognize "": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
┌──[[email protected]]-[~/ansible/k8s-helm-create]

Solution:

With the new version of chart, GitHub’s address is:

https://github.com/prometheus-community/helm-charts/releases/download/kube-prometheus-stack-30.0.1/kube-prometheus-stack-30.0.1.tgz

Then, after all nodes are OK, change the SVC type and you can access it on the host

[Solved] Error type 3 Error: Activity class {com.example.xxxxxx/com.example.xxxx.MainActivity} does not exist

The following errors are reported when your software is installed on the real machine for the second time

Error type 3 Error: Activity class {com.example.xxxxxx/com.example.xxxx.MainActivity} does not exist

Solution:

1. Check whether the package in AndroidManifest.xml and the applicationId in build.grade are consistent (where most of the problems are), modify them and try again after the inconsistency
2. Try to uninstall the original software adb uninstall packagename (replace it with your own)
Sometimes even if you manually uninstall, adb uninstall will still Success, should not be successful uninstall or uninstallation problems, and use pm to see no results at all

 

Tomcat Start Error: Internal error (java.lang.IllegalStateException): Duplicate key org.jetbrains.jps.model.module.impl.JpsModuleImpl@548a102f

1. The error message is shown in the figure below:

2. Solution: find .idea in the project and delete misc.xml file.

 

PS: why generated misc.xml file:

(1) Possible causes (take me as an example): I shut down my computer when running a web project, resulting in abnormal idea editor. All Tomcat related configurations in idea are missing.

Solution: reinstall idea

Reinstall idea details: when uninstalling tips: do not delete those history records and configurations

 


I. Tomcat startup error: internal error (Java. Lang. IllegalStateException): duplicate key (internal error (Java. Lang. IllegalStateException): duplicate key):
— find the .idea delete misc.xml file


II. Tomcat related configurations in idea are missing:
reinstall idea (when uninstalling tips: do not delete those history records and configurations)

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

macbook pro m1 pro run git error:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Follow the prompts to install xcrun

Enter at the command line

xcode-select --install

Select Install. You can also directly install Xcode and then make relevant settings.