Tag Archives: error

[Solved] ESLint error: Newline required at end of file but not found (eol-last)

When verifying Vue projects with eslint, the following warnings were found:

error: Newline required at end of file but not found (eol-last)

The results are as follows:

I found that the online solution is to insert a blank line after the warning code. I think this is very bad.

[solution]
1. Insert a configuration file .Editorconfig , in the project_final_Newline = true is changed to false

2. Cancel the verification of the last rule in . Eslintrc. JS

recompile without warning.

[Solved] The Shell Script error: syntax error: “(” unexpected “)

Execute the shell script with the following error messages

This is related to the version of shell you actually use. It can be printed with LS - L/bin/*sh, for example:

Here, SH is redirected to dash, so if sh positionpara.Sh, dash is used. There are many ways to avoid error reporting, such as executing bash positionpara.Sh, or executing ./positionpara.Sh .

Parse error in ubantu/Linux system [How to Solve]

Parse error in ubantu/Linux system

This problem took me some time. In order to avoid forgetting to post a blog in the future

Phenomenon:

The execution code and error reporting contents are as follows:

reason:

This is because the standard supported by the Linux gcc compiler is different from the current C89 standard. This C standard requires that the declaration of variables in a block be placed in front of all non declarative statements.

We can see that on line 266, a definition statement is placed before the declaration statement, so an error is reported

Solution:

Put 266 this non declarative statement under all declarative statements
as shown in the following figure:

the compilation succeeded without error, and the problem was solved successfully

[Solved] Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path:


Warning: Unknown: Failed to write session data using user-defined save handler. (session.save_path: D:\Software\phpstudy_pro\Extensions\tmp\tmp) in Unknown on line 0

Reasons:

1. the path of session.save_path is not correct
2. session.save_path's file permissions are not correct
3. and other reasons for the error, (but mine is not the problem) this problem sent me a day of time

My mistake:

The session that occurs when using this method_set_save_handler(‘open’,‘close’,‘read’,‘write’,‘destory’,‘gc’);

reason

	1. the read callback function must return the value of the string, if not, other errors will be reported
	2. write callback function must return true, if false will return the above error
	3. write in the insert statement of the variable value must be added to the single quotes, otherwise it can not be inserted into the database
	4. all but the read callback function must return a bool value, write must return true to insert into the database, and the others I think should also return true (not tested here)

Encounter this wrong idea

1. Check the configuration file for errors first
2. then check for errors in the return value
3. then check the sql statement for errors
4. debug with echo or var_dump at each step

If you solve the big guys’ problems, please give me a favor.

[Solved] ERROR org.apache.struts2.dispatcher.Dispatcher – Dispatcher initialization failed

Problem description
the newly created eclipse project cannot run JSP

the console reports an error, as shown in the figure

ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
09:04:55.281 [localhost-startStop-1] ERROR org.apache.struts2.dispatcher.Dispatcher - Dispatcher initialization failed
com.opensymphony.xwork2.config.ConfigurationException: Unable to load configuration.
	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70) ~[xwork-core-2.3.37.jar:2.3.37]
	at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:978) ~[struts2-core-2.3.37.jar:2.3.37]
	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446) ~[struts2-core-2.3.37.jar:2.3.37]
	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490) [struts2-core-2.3.37.jar:2.3.37]
	at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74) [struts2-core-2.3.37.jar:2.3.37]
	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57) [struts2-core-2.3.37.jar:2.3.37]
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281) [catalina.jar:7.0.107]
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262) [catalina.jar:7.0.107]
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:106) [catalina.jar:7.0.107]
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4973) [catalina.jar:7.0.107]
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5672) [catalina.jar:7.0.107]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:7.0.107]
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1689) [catalina.jar:7.0.107]
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1679) [catalina.jar:7.0.107]
	at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_51]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_51]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_51]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_51]
Caused by: com.opensymphony.xwork2.config.ConfigurationException: Action class [Action.complexAction] not found
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:486) ~[xwork-core-2.3.37.jar:2.3.37]
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:429) ~[xwork-core-2.3.37.jar:2.3.37]
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:556) ~[xwork-core-2.3.37.jar:2.3.37]
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:295) ~[xwork-core-2.3.37.jar:2.3.37]
	at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112) ~[struts2-core-2.3.37.jar:2.3.37]
	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:264) ~[xwork-core-2.3.37.jar:2.3.37]
	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) ~[xwork-core-2.3.37.jar:2.3.37]
	... 17 more
十月 22, 2021 9:04:55 上午 org.apache.catalina.core.StandardContext filterStart
Severe: Start filter exception
Unable to load configuration. - action - file:/F:/JavaEE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Week7/WEB-INF/classes/struts.xml:14:64
	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:504)
	at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:106)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4973)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5672)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1689)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1679)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: Unable to load configuration. - action - file:/F:/JavaEE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Week7/WEB-INF/classes/struts.xml:14:64
	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
	at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:978)
	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446)
	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490)
	... 14 more
Caused by: Action class [Action.complexAction] not found - action - file:/F:/JavaEE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Week7/WEB-INF/classes/struts.xml:14:64
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:486)
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:429)
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:556)
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:295)
	at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112)
	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:264)
	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
	... 17 more

There are many solutions to online search, such as jar package conflict in Tomcat and reinstalling tomcat, but other projects can still run before, so there is no blind operation. Some things still need to see the essence. In fact, where the problem appears has been prompted.

Caused by: com.opensymphony.xwork2.config.ConfigurationException: Action class [Action.complexAction] not found
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:486) ~[xwork-core-2.3.37.jar:2.3.37]
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:429) ~[xwork-core-2.3.37.jar:2.3.37]
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:556) ~[xwork-core-2.3.37.jar:2.3.37]
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:295) ~[xwork-core-2.3.37.jar:2.3.37]
	at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112) ~[struts2-core-2.3.37.jar:2.3.37]
	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:264) ~[xwork-core-2.3.37.jar:2.3.37]
	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) ~[xwork-core-2.3.37.jar:2.3.37]

Yes, complexaction was not found in the action configuration
there is a problem with the action configuration in the struts.xml file. If you also encounter this problem, first see if there is a problem with the configuration file

Successfully resolved error c3861: ‘printf’: identifier not found

Problem Description:

The error is as follows: error c3861: ‘printf’: identifier not found.

resolvent

The prompt indicates that the identifier “printf” cannot be found. I guess this may be caused by the compiler’s failure to include the header file stdio. H. then I wrote a new line #include & lt; stdio.h>, After that, the program will not report an error.

Error reported when debugging Hadoop cluster under windows failed to find winutils.exe

Modify
set Java in/etc/Hadoop/Hadoop env.cmd file_ HOME=%JAVA_ Home%
is (modified to the JDK location configured by your own machine)
set Java_ HOME=C:\Program Files\Java\jdk1.8.0_ 144 check fs.default.name
check whether the attribute value of fs.default.name in/etc/Hadoop/core-site.xml is consistent with that in the server. Inconsistency needs to be changed to consistency. Configure environment variables
Hadoop_ Home and % Hadoop in path_ Home% \ bin configure local hosts
192.168.19.185 Server1
192.168.19.184 server2
192.168.19.199 server3winutils.exe and hadoop.dll in Hadoop/bin directory, hadoop.dll in C: \ window \ system32 directory, and restart the IDE. If an error is still reported, restart the computer

RuntimeError: cuda runtime error (100) : no CUDA-capable device is detected at /opt/conda/conda-bld/

problem

RuntimeError: cuda runtime error (100) : no CUDA-capable device is detected at /opt/conda/conda-bld/

solve

This problem is likely to be your CUDA number is wrong
for example, the variables you set use GPUs 2 and 3, but in fact you only have two GPUs 0 and 1, which will lead to this error.

Solution to the flash back, error report and unexpected exit of idea MAC windows

First of all, let’s talk about the reason why I have this problem
when I use idea, because I am shy in my pocket, I use improper means to crack idea indefinitely, and then because I am stupid and improper operation, idea exits unexpectedly and can’t enter the flash screen
finally, through repeated search on the Internet, the strength of nine cattle and two tigers was wasted, and finally a solution was found. I share it with you here.

The problem is that it appears in the idea. Vmoptions file. For some cracking, you need to add a path to crack the JRE package in this file. The problem appears here.

So the first solution I think of is to find this file, modify it back, or delete it directly
so I found the idea.vmoptions file in the bin directory of the idea installation directory. Then delete it, and the result still doesn’t work.

Then I tried to uninstall the software and reinstall it with another version, which still didn’t work.

This shows that the idea.vmoptions file under the installation package is not the root of the problem

Because every time we start, the file idea.vmoptions in the installation directory is not loaded
instead, the file under C: \ users \ user name \. Intellijidea2018.1 \ config \ plugins
. Mac is located in users/computer user name/library/preferences/intellijidea2019.3
if not, go to if not, go to: application support/JetBrains/intellijidea2020.1 under library /. After finding it, delete it and start the idea again.