Tag Archives: DebugAH

Error in modifying data element data type [How to Solve]

Previously, when others created the amount field, the built-in type of the field was char type, while the normal amount type should be curr type with 2 decimal places. Refer to wert11 field.

When changing the data element type of the field, an error is reported. The error message is:

The reason is that the table with this field has data, which leads to the problem of changing the table field type

Solution: tcode se14

Select save data, click activate and adjust database to activate the table. After the table is activated, the related structures and data elements can be activated normally.

[Solved] Interpreter error /com.fasterxml.jackson.databind.JavaType

In the process of rabbitmq docking, after importing the jar package, errors such as mismatch of jar package version and lack of method are reported during compilation;

Processing method: import the missing jar package

<dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-annotations</artifactId>
  <version>2.9.7</version>
</dependency>
<dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-databind</artifactId>
  <version>2.9.8</version>
</dependency>
<dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-core</artifactId>
  <version>2.9.8</version>
</dependency>

Uniapp IOS uses new date() to report an error

  IOS reports an error using new date()

When developing the app today, I found that the same ‘new date()’ code is OK on Android and will report an error on IOS. Found a plan and recorded it

let stringTime = ‘2021-7-5 17:48:20’
let time1 = new Date().getTime(); // Current timestamp
let time2 = Date.parse(new Date(stringTime)); // Timestamp of the specified time
let time = time1 – time2;
Console.log (time)// Nan

eliminated the problem of time2, but why is there no problem on Android phones. Originally, ‘2021-7-5 17:48:20’ was used on IOS, including ` – ‘, but only the format of ` /’ can be recognized in IOS. Use ‘stringtime. Replace (/ -/g, “/)’ to replace it with ` ‘2021/7/5 17:48:20’, which is no problem

let stringTime = ‘2021-7-5 17:48:20’
let time1 = new Date().getTime(); // Current timestamp
Stringtime = stringtime. Replace (/ -/g, “/”)// this is the IOS pit. Use this to convert it
let time2 = Date.parse(new Date(stringTime)); // Timestamp of the specified time
let time = time1 – time2;
Console.log (time)// 1352063

however, Android has no problem using `/` this. Android doesn’t have to adapt anymore. Just use it directly

Serial port debugging assistant open error [How to Solve]

Problem: the serial port debugging assistant sscom33 opens the error message, and the error message is shown in the figure below

Solution:

1. Connect the serial device to the computer

1) If it is a desktop computer, connect the computer and serial port equipment directly with serial port cable

2) If it is a notebook computer, connect the serial port device with a USB to serial port cable, and then install the USB to serial port driver

2. Confirm that there is a serial port device in the device manager. The viewing method is shown in the figure below

3. Reopen the serial port debugging assistant

 

Program error: the table or view does not exist [Solved]

When encountering this error, we mainly consider two aspects: one is the user’s permission, and the other is whether the table in the program corresponds to the table in the database, especially whether the table name is written correctly

I use the Oracle database connected by hibernate framework in the persistence layer

I asked the DBA to confirm that my current user does have read-write permission, especially for the table I reported an error; It shows that for other tables, there is no problem with insert, except for pri_ids_The mapping table is a dead or alive insert

The reason was later found:

@Entity
@Table(name = "Pri_Ids_mapping")
public class Pri_Ids_mapping {
    @Id
    @Column(name = "mapId", nullable = false)
    @SequenceGenerator(name = "seq_mapId", sequenceName = "SEQ_mapId",allocationSize= 1)
    @GeneratedValue(generator = "seq_mapId", strategy = GenerationType.SEQUENCE)
    private Long mapId;

}

 

There was a problem during the generation of the primary key of this table. Because the name of my sequence is not associated with the table name, it is particularly easy to be replaced by the sequence of other tables

In fact, there is a table sequence and seq in another library_Duplicate mapid name. Allow my users to use synonyms of this sequence when creating tables; In addition, when creating a sequence, users of the library in which it is located are allowed to use this synonym. In this way, later sequences will overwrite the original ones; Now I want to generate ID with sequence, which involves cross database, so there is a problem of insufficient access rights

Solution:

@Entity
@Table(name = "Pri_Ids_mapping")
public class Pri_Ids_mapping {
    @Id
    @Column(name = "mapId", nullable = false)
    @SequenceGenerator(name = "seq_mapId", sequenceName = "fhl_pms.SEQ_mapId",allocationSize= 1)
    @GeneratedValue(generator = "seq_mapId", strategy = GenerationType.SEQUENCE)
    private Long mapId;

}

 

When using sequences, just add the library name in front of them

How to Solve SSM Error: Request processing failed; nested exceptionis java.lang.NullPointerExceptio

Recently, in Android studio, an app operated by the front desk of a food and beverage management system server, using SSM framework as the server, reported an error as shown in the following figure when the app called the server:

To be exact, one of the most important mistakes is: request processing failed; nested exception

Is java.lang.nullpointerexceptio, which means that the request processing fails, and the nested exception is java.lang.nullpointerexceptio null pointer exception

After some breakpoint troubleshooting, I found that the problem appeared in the implementation interface of service. When the service called the Dao layer, it reported an error. If I think about it in detail, it might be that there was a problem when referring to the Dao layer. Then I went to check the code of the Dao layer and found the problem, It’s obvious from the picture that I omitted the annotation @ Autowired when referring to the Dao layer. Later, I added the annotation and then operated. The problem was solved

terms of settlement:

This time there will be such a problem is completely caused by their own carelessness and carelessness, so we must be careful when writing code, we must be careful to find problems

Finally, let’s popularize the function of @ Autowired

Autowired is the core annotation of spring. It can annotate class member variables, methods and constructors, so that spring can complete the automatic assembly of beans@ Autowired matches beans by class by default, and assembles beans by name according to @ qualifier specification. It is also the automatic assembly of IOC

Driver failed programming external connectivity on endpoint query_allen

docker port mapping or error when starting container  Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen:
[root@localhost ~]# docker run -d -p 9000:80 centos:httpd /bin/sh -c /usr/local/bin/start.sh
d5b2bd5a7bc4895a973fe61efd051847047d26385f65c278aaa09e4fa31c4d76
docker: Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen (6bda693d1143657e46bee0300276aa05820da2b21a3d89441e820d1a274c48b6): (iptables failed: iptables –wait -t nat -A DOCKER -p tcp -d 0/0 –dport 9000 -j DNAT –to-destination 172.17.0.2:80 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1)).
[root@localhost ~]# docker start d5b2bd5a7bc4
Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen (4127da7466709fd45695a1fbe98e13c2ac30c2a554e18fb902ef5a03ba308438): (iptables failed: iptables –wait -t nat -A DOCKER -p tcp -d 0/0 –dport 9000 -j DNAT –to-destination 172.17.0.2:80 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1))
Error: failed to start containers: d5b2bd5a7bc4Reason:
The custom chain DOCKER defined at docker service startup was cleared due to centos7 firewall
The underlying firewall is using iptables for data filtering, built on top of iptables, which may conflict with Docker.
When firewalld starts or restarts, it will remove the DOCKER rules from iptables, which affects Docker’s ability to work properly.
When you are using Systemd, firewalld will start before Docker, but if you start or restart firewalld after Docker starts, you will need to restart the Docker process.
Restarting the docker service and regenerating the custom chain DOCKER

Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination        
DOCKER     all  --  0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type LOCAL

Chain INPUT (policy ACCEPT)
target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination        
DOCKER     all  --  0.0.0.0/0           !127.0.0.0/8          ADDRTYPE match dst-type LOCAL

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination        
MASQUERADE  all  --  172.17.0.0/16        0.0.0.0/0          
MASQUERADE  tcp  --  172.17.0.2           172.17.0.2           tcp dpt:8080

Chain DOCKER (2 references)
target     prot opt source               destination        
RETURN     all  --  0.0.0.0/0            0.0.0.0/0          
DNAT       tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8888 to:172.17.0.2:8080
root@router:playbook#iptables -t nat -nL
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination        
DOCKER     all  --  0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type LOCAL

Chain INPUT (policy ACCEPT)
target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination        
DOCKER     all  --  0.0.0.0/0           !127.0.0.0/8          ADDRTYPE match dst-type LOCAL

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination        
MASQUERADE  all  --  172.17.0.0/16        0.0.0.0/0          
MASQUERADE  tcp  --  172.17.0.2           172.17.0.2           tcp dpt:8080

Chain DOCKER (2 references)
target     prot opt source               destination        
RETURN     all  --  0.0.0.0/0            0.0.0.0/0          
DNAT       tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8888 to:172.17.0.2:8080

Solution:
restart the docker service and then start the container
systemctl restart docker
docker start foo

Conda Install Error: Solving environment: failed with initial frozen solve.

I’ve stepped on a lot of holes and checked a lot on the Internet. Kuaitemo is autistic. I can’t solve it even if I’m confused. I’ve been working hard all afternoon and finally solved it. The solution is as follows:

Well… I forgot to cut the wrong picture at that time…… First of all, unload and reload the anaconda you installed, which is what I did anyway, obsessive-compulsive disorder patients, so clean
. Then, check your current version of CONDA, whether you check it or not, anyway, you have to update it. I like to check: conda-v here is the moment to witness the miracle:


Update CONDA to the latest version: CONDA update – N base CONDA check CONDA version again: CONDA – V is not the latest version CONDA 4.7.11 second update CONDA to the latest version: CONDA update – N base CONDA second time is very important!!! What’s more, when it reads the environment this time, the thief is slow. I thought my computer was stuck for half a year, just wait for it. After the update, check the CONDA version: CONDA – V, and find that it is the latest version, CONDA 4.7.11, and then execute: CONDA update — all. Then, what’s good to install, what’s good to fix, what’s good to use, everything’s good to use, and it’s over!!!!!!