Author Archives: Robins

[Solved] Oracle :value too large for column “SCHEMA”.”TABLE”.”COLUMN” (actual: 519, maximum: 500)

Reason: I use create table XXX as subquery to create a data table, which is mainly used to aggregate the relevant data, and then export it as an SQL script file to import it into the new library, resulting in inconsistent field types and lengths of some insert into statements due to inconsistent database character sets, This will fail to insert value too large for column “schema” “TABLE”. “COLUMN” (actual: 519, maximum: 500) ; Because the length is incompatible

The solution is to use convert to convert the character set or cast to increase the length of the type on the error field of the corresponding select, and then create table will be the type of table structure according to the field type you set; However, after using convert to convert the character set, the query will result in ora-29275: partial multibyte character error.

So my solution here is to use cast conversion type

CREATE TABLE XXX AS

SELECT CAST(col AS VARCHAR(1000)),… FROM xxx;

Cast function document: https://docs.oracle.com/database/121/SQLRF/functions024.htm#SQLRF00613

Example of using the convert function:

CREATE TABLE XXX AS

SELECT CONVERT(col,’AL32UTF8′),… FROM xxx;

Convert function document: https://docs.oracle.com/database/121/SQLRF/functions041.htm#SQLRF00620

If only the CONVERT SELECT clause is executed, an error will occur ORA-29275: partial multibyte character, but CREATE TABLE XXX AS SELECT will be executed together without error, but the table generated by the query will also report an error ORA-29275.

[Solved] MYSQL Error: SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase, Hana]

1. When calling an interface, an interface reports an error

o.s.b.f.xml. XmlBeanDefinitionReader: Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]

o.s.jdbc. support. SQLErrorCodesFactory : SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase, Hana]

Screenshot information:

2. Solution ideas

(1) Look at the problem description, it is a database problem.

(2) Check the interface log, through the log, you can initially locate the problem in the “==> Preparing: REPLACE into” sql statement, while the log returned the sql statement’s input “==> Parameters”

(3) According to the parameters, the sql statement was executed in Navicat, and the result came out because of the problem of foreign keys in the database.

3.Summary

The problem how to solve is not the focus, the focus is to encounter such problems, first check the logs, locate where the problem, and then targeted to solve.

There are several common problems in the degree, such as field naming errors, type mismatch, data problems.

At the end of the day, according to the logs, execute the problem statement in the visual sql execution tool. The problem can be solved.

[Solved] Prometheus Time Error: Warning! Detected 60.44 seconds time difference between your browser and the server. Prometheus relies on accurate time and time drift might cause unexpected query results.

Error message

Warning!  Detected 60.44 seconds time difference between your browser and the server. Prometheus relies on accurate time and time drift might cause unexpected query results.

There is a time difference between the browser and the server. Prometheus relies on accurate time. The time difference will lead to inaccurate data queried.

Solution:

yum install -y ntp

ntpdate -u time1.aliyun.com

Chrome66 Auto Play Error: Uncaught (in promise) DOMException: play() failed because the user didn’t interact with the document first

After version 66, users are prohibited from entering the page to automatically trigger audio or video playback

The user must manually click play to play, so there is an error message like this

Two Methods:

  1. Guide the user to click to turn on the sound.
  2. Mute by default after entering the page.

By default, enter the page mute and add muted to the audio

Add a watch

watch: {
    isOpenMusic: {
      handler(val) {
        if (val) {
           this .$refs.audio.muted = "" ;
          console.log( "There is sound" );
        } else {
           this .$refs.audio.muted = "muted" ;
          console.log( "Mute" );
        }
      },
    },
  },

Give a button to switch dynamically

< i class ="iconfont" style ="font-size: 1.2rem; cursor: pointer; color: #ffffff" :class ="[isOpenMusic?'icon-shengyin':'icon- shengyinguanbi ']" @click ="isOpenMusic = !isOpenMusic" >

methods

audioPlay() {
      setTimeout(() => {
         this .$refs.audio.play();
      }, 10 );
},

sockets hook

socket:{
 // listening user list 
    updateUserList(data) {
       this .loginUserList = data;
       if ( this .isOpenMusic) {
         this .audioSrc = require("../assets/上线.wav" );
         this .audioPlay();
      }
    },
}

In this way, the default sound of the user coming in the page is off, and you need to manually click to open the sound to hear the update of the chat room user list

[Solved] Git Error: failed: authentication failed for ‘http: XXXX.git / ”

When you enter the user name and password incorrectly in the clone on git, the window for entering the user name and password will no longer pop up automatically. The errors are as follows:

fatal: Authentication failed for 'http:xxxx.git/''

After some Baidu found a solution, just input

git config --system --unset credential. helper

Then press enter, enter the URL of GIT clone copy, and then press enter

At this time, the command line will appear asking for the user name, then enter your git user name and press enter

Next, a small window will pop up, prompting you to enter your password, enter your git password, and click OK

[Solved] Handler dispatch failed; nested exception is java.lang.AbstractMethodError: com.shiku.im.dao.impl.FriendsDaoImpl.queryFriendsByName(ILjava/lang/String;)Ljava/util/List

Interface error:

Handler dispatch failed; nested exception is java.lang.AbstractMethodError:
com.shiku.im.dao.impl.FriendsDaoImpl.queryFriendsByName(ILjava/lang/String;)Ljava/util/List

Local debugging is good. An error will be reported when it is released to the test environment!

The final reason is the problem of distributed project compilation. The interface of module A is implemented in module B, and B is not compiled before compiling A.

Could not open lock file/var/lib/dpkg/lock [How to Solve]

Today, when installing redis in Ubuntu, the following error occurred when executing the apt get - y install redis server command:

E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

Possible causes:

The apt get command was used to install a resource before, but terminal was closed before the installation was completed. When it was opened again, another process was occupying the apt get install process. Because the system lock during software source update will be occupied during operation, an error will be reported.

Solution, run the following four commands in sequence:

sudo rm -rf /var/lib/dpkg/lock
sudo rm -rf /var/cache/apt/archives/lock
sudo apt-get update
sudo dpkg --configure -a

How to Solve Error: buuctf re [MRCTF2020]Xor

Direct IDA without shell

Errors found

The main function cannot F5, so just enter the error reporting line, F5, and then exit

int __cdecl main(int argc, const char **argv, const char **envp)
{
  unsigned int i; // eax

  sub_401020((int)"Give Me Your Flag String:\n");
  sub_401050("%s", byte_4212C0);
  if ( strlen(byte_4212C0) != 27 )
  {
LABEL_6:
    sub_401020((int)"Wrong!\n");
    sub_404B7E("pause");
    _loaddll(0);
    __debugbreak();
  }
  for ( i = 0; i < 0x1B; ++i )
  {
    if ( ((unsigned __int8)i ^ (unsigned __int8)byte_4212C0[i]) != byte_41EA08[i] )
      goto LABEL_6;
  }
  sub_401020((int)"Right!\n");
  sub_404B7E("pause");
  return 0;
}

View byte_41ea08 content

.rdata:0041EA08 byte_41EA08     db 4Dh                  ; DATA XREF: _main+48↑r
.rdata:0041EA09 aSawbFxzJTqjNBp db 'SAWB~FXZ:J:`tQJ"N@ bpdd}8g',0

Isochronize byte_41EA08 by bit back

a = "MSAWB~FXZ:J:`tQJ\"N@ bpdd}8g"
flag = ''
for i in range(len(a)):
    flag += chr(i ^ord(a[i]))
print(flag)