Category Archives: How to Fix

Solution of Java resources error reporting

These two items are very annoying when encountering this problem. Although they have no actual impact, programmers don’t like to see errors reported.
it’s generally good to make three changes

1. Change other versions to 3.0

<?xml version="1.0" encoding="UTF-8"?> 
<web-app version="3.0"
 xmlns="http://java.sun.com/xml/ns/javaee"  
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee  
    http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
  <display-name>Archetype Created Web Application</display-name>
</web-app>

2. Find the root directory of the project, an XML in the. Setting file, or change the version to 3.0

<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <fixed facet="wst.jsdt.web"/>
  <installed facet="jst.web" version="3.0"/>
  <installed facet="wst.jsdt.web" version="1.0"/>
  <installed facet="java" version="1.8"/>
  <installed facet="jst.jaxrs" version="2.0"/>
  <installed facet="jst.jsf" version="2.2"/>
</faceted-project>

3. Another possibility is to see the directory missing and build path, and then create a new directory

IOS app connect error store submitted for review

Recently, an error was reported when submitting the audit package: app store connect operation error.

You must be an Admin or Technical user in order to deliver content or metada.(1070)

Screenshot of error report:

 

Solution: use the transporter tool to upload, once OK. (I tried other methods in the middle, but I won’t talk about them one by one. I successfully uploaded this method, and the transporter tool can be found in the app store. Good luck to you.).

Has HTML webpack plugin been installed, or error: cannot find module ‘HTML webpack plugin’

Before, the project directory was:

it ran successfully. Later, a new build file directory was created and the webpack.config.js It is moved to the build file,

package.json Script in

"scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node ./src/koa.js",
    "build": "webpack --config ./build/webpack.config.js"
  },

After configuration, run the

$ npm run build

Results error prompt:

java.lang.Error: Unresolved compilation problems

java.lang.Error : Unresolved compilation problems

java.lang.Error : Unresolved compilation problems

Environment description solution reason

environment

jdk1.8 + springboot + maven + ItelliJ IDEA

describe

When starting a project, initialize the datasource to report an error. The specific error is to say that a POJO cannot be resolved to a type , and repeatedly check that the POJO exists and has been relied on in POM .

A few days ago, it can be started normally. Other colleagues can start normally, and the code has not been modified.

Solution

The search results are generally caused by the inconsistency between the version of JDK compiled by eclipse or idea and the version of JDK required by the project. However, the configuration of any development environment has been modified recently. After careful inspection, it is found that the java complier and Project SDK versions are the same.

There is an answer on stackoverflow that is to say MVN clean once, try it and find that it can be started successfully

reason

It may be that the previous MVN clean install did not have the correct clean , resulting in some compiled codes not being updated.

Spring Boot Thymeleaf ERROR 8592 org.thymeleaf.TemplateEngine

Spring Boot + Thymeleaf Error: ERROR 8592 org.thymeleaf.TemplateEngine
Error Message:
org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: “class path resource [templates/…….html]”)
……ERROR 8592 — [p-nio-80-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: “class path resource [templates/…….html]”)] with root cause
Problem location and solution
1、Location
Checked the return value of the Controller, path spelling, annotations and so on are not found problems
Fortunately, there is a page can be displayed normally, so the exchange comparison, found that the problem in the <!DOCTYPE> tag
2, solve

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Change to

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

or

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">

I think it’s puzzling, but because of the project problem, the front end can only use this webpage written with a lot of obsolete tags. Thymeleaf has strict requirements on the front end, and suggests that H5 standard be used in new projects.

extend

Here is a configuration method to turn off strict syntax checking for thymeleaf

1. In pom.xml Add dependency to file

<dependency>
   <groupId>net.sourceforge.nekohtml</groupId>
   <artifactId>nekohtml</artifactId>
   <version>1.9.21</version>
</dependency>

2. In application.properties Add in

spring.thymeleaf.mode=LEGACYHTML5

An error occurred when starting pyspider with Python 3.7

Keyword problem
the last sentence of the question appears
file “D: (installed/Python/lib/site packages/pyspider”\ run.py ”, line 231
async=True, get_ object=False, no_ Input = false):
syntax error: invalid syntax
the reason is: async is the keyword in Python 3.7
the solution is to replace this keyword. There are mainly two files: D: (installed) python (LIB) site packages (pyspider)\ run.py And D: installed, python, lib, site packages, pyspider, fetcher, tornado_ fetcher.py
when replacing, please note: only replace the variable or parameter name named async. Do not try to save trouble by selecting “replace all”
after saving, run “pyspider all” again
at this time, the spider only starts to “scheduler XMLRPC listening on 127.0.0.1:23333” and stops
to continue to replace python_ HOME\Lib\site-packages\pyspider\webui\ app.py Async
in
starts again
and reports an error again: valueerror: invalid configuration:
– modified option ‘domain controller’: use ‘HTTP’_ authenticator.domain_ Controller ‘instead.
solution: turn on python_ HOME\Lib\site-packages\pyspider\webui\ webdav.py File, modify line 209
to change ‘domain controller’: needauthcontroller (APP)
to:
‘http>_ Authenticator ‘: {
‘http authenticator’: needauthcontroller (APP),
},
save the file
run again and succeed

JD GUI decompiles class file and reports internal error

Today, when decompiling a class file with JD GUI 1.4.0, we don’t see the decompilation result, only see the internal error, as shown in the following figure:

Google searched for it and found that it was in its official GitHub issue( https://github.com/java-decompiler/jd-gui/issues/197 )Luyten has a better tool for decompilation( https://github.com/deathmarine/Luyten )。

After downloading and using it, you can really open the class file that failed to decompile before.

Note: the following error occurred when using ﹣ luyten-0.5.3.exe:

The reasons may be as follows: my machine uses the non installation version of JDK 8, only specifies the path of JDK in the environment variable, and there is no JDK related information in the registry.

Solution: hold down the shift key, click the right mouse button, select “open command window here”, and enter: Java – jar luyten-0.5.3.exe in the open window

You can start Luyten normally.

 

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,

Cloud init error: error: invalid scope does not have permission

Confirm that the env cloud environment parameters you have configured are correct, and report the following error after compiling. The reason is that appid needs to wait about 10 minutes for the official background to prepare for the service after opening the cloud environment for the first time, and then it can be compiled again after 10 minutes.

The solution of red X in eclipse error pages

Every time I build a maven project and turn it into a web project, there are always so many files here, and there will also be a red cross of error pages, which is very uncomfortable. Although there was no error in the project, it was always an error message for me. So I looked for a long time, and finally found the cause of the problem.

It turns out that this is a problem of eclipse itself. If you change to a web project, you will add web.xml , but the compiler will not update itself and will report this error. So you can cut it web.xml Save all the information in Ctrl + s, then the compiler will refresh, and then you are putting the clipped content back web.xml Finally, the problem is solved.