Tag Archives: ProgrammerAH

Android studio can’t start, running error: warning: crash service did not start

Android StudioAn error was reported when starting the emulator, as follows:
emulator: WARNING: Crash service did not start
RegGetValueW failed 2 The system could not find the specified file.
Failed to open /qemu.conf, err: 2
HAX is working and emulator runs in fast virt mode.
emulator: Saving state on exit with session uptime 312241 ms
ANGLE: D3D11: rx::Renderer11::generateConfigs
Cause of the problem:The cause of the problem is that I am using the Nexus 5X emulator and both images force the “Emulated Performance” to be set to “Automatic Graphics”.

Solution:

Create a new emulator, for example using “Pixel XL”。 “Emulated Performance” change to “Software graphics”。

MySQL skip grant tables add user error 1290

MySQL skip grant tables add user error 1290

     

I forgot the database password,

At this time, we just need to add the

skip-grant-tables

Then restart the service and log in to the database without us entering the password

At this time, I successfully log in to the database, but I accidentally deleted all the users and couldn’t log in. At this time, I changed the configuration file to log in. I wanted to add users to the database, but after executing the add user command, I was prompted as follows:

ERROR 1290 (HY000): The MySQL server is running with the –skip-grant-tables option so it cannot execute this statement
mysql> GRANT ALL PRIVILEGES ON *.* TO IDENTIFIED BY ‘123’ WITH GRANT OPTION;
ERROR 1290 (HY000): The MySQL server is running with the –skip-grant-tables option so it cannot execute this statement

At this time, we just need to flush privileges to add users,

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

mysql> GRANT ALL PRIVILEGES ON *.* TO IDENTIFIED BY ‘123’ WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

At this time, we have successfully completed, and then log in.

If an error is reported, the following information is given:

Error: Cannot retrieve repository metadata ( repomd.xml ) for repository: InstallMedia. Please verify its path and try again
 You could try using –skip-broken to work around the problem
 You could try running: rpm -Va –nofiles –nodigest

We just need to get to/etc/ yum.repo . s packetxxxx.repo and RedHat.repo Delete the two files and start again,

Springboot: start error reporting after introducing paging plug-in PageHelper

The main errors are as follows:

org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration': 
Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration] from ClassLoader [sun.misc.Launcher$AppClassLoader@764c12b6]

The solution is to change the version of PageHelper to 1.2.3:1

	<dependency>
           <groupId>com.github.pagehelper</groupId>
           <artifactId>pagehelper-spring-boot-starter</artifactId>
           <version>1.2.3</version>
      </dependency>

Note: the spring boot used is version 2.1.2

Springboot startup exception: error creating bean with name ‘permissioncontroller’

Springboot + springdatajpa startup exception: org.springframework.beans . factory.UnsatisfiedDependencyException : Error creating bean with name ‘permissionController’

Error reason: the interface name of springdatajpa does not match the corresponding field in the database

Modify the PID field in the database table to parent_ After the ID field, the findbytypeandpid() method name in permissiondao was forgotten to modify, resulting in Hibernate unable to automatically obtain the corresponding field in the database. Change findbytypeandpid() to findbytypeandparentid().

 

Viewing crontab log of timed tasks in Linux

In UNIX and UNIX like operating systems, the crontab command is often used to set the instructions to be executed periodically, which can also be understood as setting the timing task.

Sometimes the timing task in crontab is not executed successfully. What’s the reason?At this time, we need to go to the log to analyze it. How to view the log records of crontab?

1. linux

Look at/var/log/ cron.log This file can be viewed with tail – F/var/log/cron

2. unix

In the/var/spool/cron/tmp file, there are croutxxx001864 TMP files. You can see the tasks being executed from these files.

3. Mail task

In the/var/spool/mail/root file, there is a record of crontab execution log. Use tail – F/var/spool/mail/root to view the latest crontab execution.

A friend asked about whether the crontab of Linux has been executed or not. He has also written some shell scripts for basic backup. Combined with his own actual production environment, he briefly describes how to analyze whether the crontab is executed correctly through the cron execution log.

For example, Oracle users under the server have the following scheduled tasks

[oracle@localhost6 ~]$ crontab -l
00 1 * * 0 /home/oracle/backup/hollyipcc.sh
00 1 1 * * /home/oracle/backup/hollyreport_hollycrm.sh

The planned tasks of the system will be in/var/log first

[root@localhost ~]# cd /var/log/
[root@localhost log]# less cron
Sep 22 04:22:01 localhost crond[32556]: (root) CMD (run-parts /etc/cron.weekly)
Sep 22 04:22:01 localhost anacron[32560]: Updated timestamp for job `cron.weekly' to 2013-09-22
Sep 22 05:01:01 localhost crond[22768]: (root) CMD (run-parts /etc/cron.hourly)
Sep 22 06:01:01 localhost crond[25522]: (root) CMD (run-parts /etc/cron.hourly)
Sep 22 07:01:01 localhost crond[28255]: (root) CMD (run-parts /etc/cron.hourly)
Sep 22 08:01:01 localhost crond[30982]: (root) CMD (run-parts /etc/cron.hourly)

The above/var/log/cron will only record whether some planned scripts have been executed, but Linux will send email to the user every time to check whether the specific execution is correct and some information in the process of script execution.

As mentioned above, Linux will send an email to/var/spool/mail

[root@localhost6 log]# cd /var/spool/mail/
[root@localhost6 mail]# less oracle
Date: Sun, 25 Aug 2013 01:00:01 +0800
Message-Id: <[email protected]>
From: [email protected] (Cron Daemon)
To: [email protected]
Subject: Cron /home/oracle/backup/hollyipcc.sh
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env:
X-Cron-Env:
X-Cron-Env:
X-Cron-Env:
X-Cron-Env:

backup hollyipcc

Export: Release 10.2.0.4.0 - Production on Sunday, 25 August, 2013 1:00:02

Copyright (c) 2003, 2007, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01": system/******** dumpfile=hollyipcc_20130825.dmp logfile=hollyipcc_20130825.log directory
=back schemas=hollyipcc parfile=/home/oracle/backup/parfile.par
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 5.932 GB
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "HOLLYIPCC"."BASE_CONTACTSTATE_BAK":"P201203" 1.389 GB 15716014 rows

At this point, we can well judge whether the crontab script is executed, whether it is correct in the process of execution, and some error information. I hope this can help some friends understand the principle of crontab and diagnose the problems of crontab.

 

 

About Android studio error: (26,13) failed to resolve: com.android.support : appcompat-v7:27. + error

Error: as shown in the figure

Some methods in mianactivity will report errors:

At the beginning, I thought that the SDK was faulty, because I always thought that my SDK was not installed properly. Then I repeatedly installed Android studio. Those who included the SDK and didn’t package the SDK came several times, and I repeatedly installed the SDK (this is a sad story) Finally, with the help of Baidu boss, we can solve this problem

Solution:

1. Open build.gradle

2. Replace the release method comment with “repositories {maven {URL” https://maven.google.com “}” is as follows:

3、clean project

The solution effect is as follows:

Error creating bean with name ‘sqlsessionfactory’ defined in ServletContext resource)

Error creating bean with name ‘sqlsessionfactory’ defined in ServletContext resource)

The general error report is as follows

error creating bean with name 'aaaService'......
error creating bean with name 'aaaMapper'......
error creating bean with name 'sqlSessionFactory'defined in ServletContext resource [XXXXXXXX.AAA.class]

From the Internet search a lot of solutions, are not my type. Finally, the problem has been solved;
solution:
reconfigure maven, download the relevant jar package, and then view the project’s pom.xml Whether there are redundant or missing dependencies in. (mine is in pom.xml There is one more dependency in. After deleting, the project will start normally.)

Error loading password’s fault file (MySQL for Excel)

Recently, error loading password’s fault file is always reported when opening excel, which is puzzling. However, xlsx file can still be opened, and I didn’t care about it.

However, it is not enough to import xlsx file as data.

Then, after carefully reading the error information, we found that it was MySQL for Excel. What the hell?How did excel get into MySQL.

So find out what’s wrong with MySQL, and then go online.

Finally, I found that when MySQL was installed, there was a component named MySQL for Excel.

Since there is a problem with MySQL for Excel and it can’t be used now, it’s time to unload it.

So, open MySQL installer, check MySQL for Excel (pay attention not to check other, otherwise it’s not good to unload MySQL), and choose Remove. It’s really a good thing.

OK, open excel and never report this error again