Category Archives: How to Fix

Idea startup error: Port occupied/address already exists

Error message:

org.apache.catalina.LifecycleException: Failed to start component

resolvent:

Open the CMD command window and enter the netstat – ano command to view all ports and PIDs (the number in the last column).

Find the occupied port at the local address and write down the PID value.

Enter the instruction tasklist | findstr “PID value” to find the corresponding process.

Kill the process and restart.   Example: taskkill/F/T/im java.exe & lt– Java.exe is the process found in the previous step — & gt;

Open the Cocos creator editor and report an error property UUID of null

I found that many developers have encountered this problem recently. I’ll share it. I check this error.

As shown in Figure

I can’t seem to see where UUID is wrong!!!

Solution:

Let’s open cocos creator from the command line and choose to open your project. At this time, the command line will report an error message. When you see the error message, it indicates that there is an error in a meta file. You can directly look at the meta file and solve it easily.

Object of type timestamp is not JSON serializable

First of all, the reason for the error is the datetime type field when exporting JSON.

Added in the code:
class dateencoder (JSON. Jsoneencoder):
Default (self, obj):
if isinstance (obj, datetime. Datetime):
return obj.strftime (“% Y -% m -% DT% H:% m:% s”)
else:
return json.jsoneencoder.default (self, obj)

Then add a CLS = dateencoder
in json.dump to solve the problem

As shown in the figure:


no error will be reported

Error pathvariable annotation was empty on param 0 when migrating idea to eclipse

Recently, a project was developed with idea + maven, and it has been running without problem. Because idea takes up too much memory, I want to debug a problem on eclipse. I found the following errors when I start Eclipse:

Caused by: java.lang.IllegalStateException: PathVariable annotation was empty on param 0.
	at feign.Util.checkState(Util.java:129)
	at org.springframework.cloud.openfeign.annotation.PathVariableParameterProcessor.processArgument(PathVariableParameterProcessor.java:51)
	at org.springframework.cloud.openfeign.support.SpringMvcContract.processAnnotationsOnParameter(SpringMvcContract.java:299)
	at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:111)
	at org.springframework.cloud.openfeign.support.SpringMvcContract.parseAndValidateMetadata(SpringMvcContract.java:194)
	at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:62)

Obviously, it is because the feignclient Parameter annotation does not display the specified value. The source code is as follows:

    @GetMapping("projects/{projectId}/models")
    Result<RSCPage<Model>> list(@PathVariable String projectId, @RequestParam Integer current,
                                @RequestParam Integer pageSize, @RequestParam(required = false) String name,
                                @RequestParam(required = false) Integer relationship, @RequestParam(required = false) String sorter);

There are similar hosts in spring MVC, but no errors are reported.

Generally, it is customary not to specify value when writing spring MVC parameter annotations, such as requestparam/pathvariable. Since the project has been running for some time, code level problems can be eliminated.

According to the spring naming mechanism, if the specified value is not displayed,   Both spring MVC and spring faign use the same parameternamediscoverer   Defaultparameternamediscoverer   To find the parameter name. It attempts to find the parameter name using the following steps:

First, it uses the standardreflectionparameternamediscovery to try to find the variable name with reflection. This is only possible when compiling classes with – parameters. Second, if it fails, use localvariabletableparameternamediscovery. It tries to find the variable name from the debugging information in the ASM library class file. However, the javac compiler ignores the debugging information of parameter names in the java interface class file. The difference between spring MVC and faign appears here. Feign is the annotation added on the interface, while spiring MVC is the annotation added on the implementation class. This is why feign cannot find the parameter name without – parameter.

Solution: open the eclipse configuration window window & gt; Preference, expand Java & gt; Compiler, check the option in the red box below and recompile

  If you compile manually, you can add the javac parameter – G – parameter parameter
idea and Maven take these parameters by default, so you don’t need to configure them manually

When the MAC M1 uiautomatorviewer is opened, it displays blank or reports an error

As shown in the following figure: uiautomatorviewer displays blank

Cause: the problem of java version is too new

➜  sdk  ls /Library/Java/JavaVirtualMachines/
jdk1.8.0_161.jdk zulu-17.jdk

Solution: downgrade

The Java version can be downgraded to before 201 or before 51. (the blogger’s 161 failed, which may also be the reason for the M1 chip)
uiautomatorviewer is actually a Java startup script. For example, you can use this command on the Mac to see the real startup command.

bash -x /Users/zhoujing/Library/Android/sdk/tools/bin/uiautomatorviewer

In order to ensure that the uiautomatorviewer can run correctly locally, several jdks can be standby

Link to download old java version: SDK

References:
1. Error reporting after uiautomatorviewer is opened under MAC
2. Learning experience of MAC Android automatic test

Error no module named ‘in newly installed Python_ sqlite3‘

Tencent cloud server Ubuntu 20 already has Python 3.8. Download the installation package from Huawei cloud. After installing Python 3.9, an error is reported

solve:

Copy the dependent files from the existing 3.8 to 3.9, and then rename them. The command is as follows

ubuntu@esoaru-net ~/github/aiopathlib
☺  python3.8 -c 'import _sqlite3;print(_sqlite3.__file__)'                                                                                                          master ✗
/usr/lib/python3.8/lib-dynload/_sqlite3.cpython-38-x86_64-linux-gnu.so
ubuntu@esoaru-net ~/github/aiopathlib
☺  which python3.9                                                                                                                                                  master ✗
/usr/local/bin/python3.9
ubuntu@esoaru-net ~/github/aiopathlib
☺  cp /usr/lib/python3.8/lib-dynload/_sqlite3.cpython-38-x86_64-linux-gnu.so /usr/lib/python3.9/lib-dynload/                                                        master ✗
cp: cannot create regular file '/usr/lib/python3.9/lib-dynload/_sqlite3.cpython-38-x86_64-linux-gnu.so': Permission denied
ubuntu@esoaru-net ~/github/aiopathlib
☹  sudo cp /usr/lib/python3.8/lib-dynload/_sqlite3.cpython-38-x86_64-linux-gnu.so /usr/lib/python3.9/lib-dynload/                                                   master ✗
ubuntu@esoaru-net ~/github/aiopathlib
☺  python3.9 -c 'import _sqlite3;print(_sqlite3.__file__)'                                                                                                          master ✗
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named '_sqlite3'
ubuntu@esoaru-net ~/github/aiopathlib
☹  cd /usr/lib/python3.9/lib-dynload                                                                                                                                master ✗
ubuntu@esoaru-net /usr/lib/python3.9/lib-dynload
☺  sudo mv _sqlite3.cpython-38-x86_64-linux-gnu.so _sqlite3.cpython-39-x86_64-linux-gnu.so
ubuntu@esoaru-net /usr/lib/python3.9/lib-dynload
☺  python3.9 -c 'import _sqlite3;print(_sqlite3.__file__)'
/usr/lib/python3.9/lib-dynload/_sqlite3.cpython-39-x86_64-linux-gnu.so
☹  sudo cp /usr/lib/python3.9/lib-dynload/* /usr/local/lib/python3.9/lib-dynload/  

Summary:

It’s actually a line of command

sudo cp /usr/lib/python3.8/lib-dynload/_sqlite3.cpython-38-x86_64-linux-gnu.so /usr/lib/python3.9/lib-dynload/_sqlite3.cpython-39-x86_64-linux-gnu.so

SAP Migo 101 receives the work order and reports an error – check table tfbefu_ CR entry 10 does not exist – Countermeasures

SAP Migo 101 receives the work order and reports an error – check table tfbefu_ CR entry 10 does not exist – Countermeasures

Execute transaction code Migo, move type 101, perform receipt posting for a work order, and the system reports an error: check table tfbefu_ Cr: entry 10 does not exist

F1help documentation:

Check table TFBEFU_ CR: entry 10 does not exist

Message no. M7001

Diagnosis

In table TFBEFU_ CR the entry 10 is missing.

Procedure

Make sure your entries are correct.

If table has not been maintained correctly, please inform your systems administrator.

This error report is the first time I have encountered it, so I am very curious and hope to find out the reason. It is found that the background configuration of a co module is missing, and the transaction code is opk9. The configuration path is as follows:

You need to add an entry to this configuration for the factory code corresponding to the work order. After configuration, you can post the work order receipt normally.

-Finish-

Written on October 12, 2021

Exception record. When eclipse starts, an error is reported when workspace is opened

When eclipse starts, an error occurs when you open workspace

Problem Description:

Jump out: Eclipse an error has occurred. See the log file

resolvent

Check the log file and find the following error message:
! Message frameworkevent error
solution: CMD command and CD command jump to the eclipse.exe file. After running the command eclipse.exe - clean , the software will be opened automatically. Select workspace again to start normally

The SuperMap webgl browser reported an error. The unzip.wasm file 404

The browser reports an error unzip.wasm file 404, which is a decompressed file for two reasons: 1. The file is lost during packaging and needs to be replaced again; 2. The gateway filters out files with the suffix of. Wasm format. You need to add this type to mime, fill in. * in the column of file extension, and in the following MIME type application/octet stream, (most of the problems belong to the latter)

Error reporting: java.lang.nullpointerexception solution

The null pointer exception problem is mostly an error in integer automatic unpacking

Error code:

	 Integer a=null;
 	 if(a==1||a==null){    
        System.out.println("111");
     }

error reporting: java.lang.nullpointerexception

Error reporting reason:

Integer object is null. In the process of automatic unpacking, obj.xxxvalue will throw NullPointerException

Problem solving:

If you want to continue the multi conditional judgment, you should put the judgment empty in the first place

Modification code:

	 Integer a=null;
 	 if(a==null||a==1){    
        System.out.println("111");
     }

To avoid another null pointer like exception error, you need to master the knowledge of null in Java. You can refer to another article     What you should know about null in Java