Tag Archives: eclipse

When SSM + Maven project is running, it is prompted that org.springframework.web.servlet.dispatcherserservlet cannot be found

When SSM + Maven project is running, it is prompted that org.springframework.web.servlet.dispatcherserservlet cannot be found

When running SSM project today, an error is reported:
HTTP status 500 – error identifying servlet class org. Springframework. Web. Servlet. Dispatcherservlet
java. Lang. classnotfoundexception: org. Springframework. Web. Servlet. Dispatcherservlet

You can confirm that org. Springframework. Web. Servlet. Dispatcherservlet exists and Maven is imported normally

Problem solving method:
select item – & gt; Right click Properties – & gt; Select deployment asset – & gt; Select Add – & gt; Select Java build path entries – & gt; Next-> Select Maven dependencies – & gt; Finish-> Apply-> OK

It can solve the problem

————————————————
Link to the original text: https://blog.csdn.net/cd19930508/article/details/80256595

Eclipse gets stuck saving copy and paste

When editing long code in eclipse, eclipse often gets stuck for a long time when using Ctrl.  
the guess is that you can click and jump to the variable definition after holding down Ctrl in eclipse, so when you press Ctrl, eclipse will generate this mapping. When the file is large, this behavior will take a lot of time. You can set shortcut keys by the following methods.  

Eclipse — Windows-> Preferences-> General-> Editors-> Text Editors-> Hyperlinking:  
Remove this option: enable on demand hyperlinks style navigation  

Eclipse create servlet file error

When creating a web project in eclipse, an error is reported when creating a JSP or servlet file, as follows:

the error is: the superclass“ javax.servlet.http . httpservlet “was not found on the Java build path“ javax.servlet.http The. Httpservlet “class cannot be found in the project’s build path, that is, there is no class to send and receive requests.
If you look at the error reported by the servlet file:

is also the error caused by the lack of servlet related classes.
The specific solution is:
right click on the specific project — & gt; select Properties — & gt; select “Java build path”, and then follow the steps below:

Click next, select the server, click Finish

and then click “apply and close”.

Eclipse PyDev “interpreter does not exist in filesystem”

The reason for the problem: this kind of problem is generally should be will python.exe The file has been renamed

Solution: there are generally two ways:

1: change the file name back (basically, it won’t be changed back, because the file name is usually changed to include both python2 and python3 on the computer. In order to add environment variables and successfully run two different versions of python, the file name is usually changed)

2: modify the python path of eclipse

Modify in window – & gt; preferences – & gt; pydev – & gt; interpreters – & gt; Python interpreter

      

Use the remove button to delete the paths of the two Python versions, then click browse for Python/pypy exe, re select the path of python, and finally click apply and close

 

At this time, the project file still reports an error. At this time, select the project that reports an error, right-click and select the properties option – & gt; pydev interpreter/grammar, then switch to interpreter and select the corresponding Python Version (default)– currently:python2 Finally, click apply and close. Finally, restart eclipse

    

The solution of a Java exception has occurred. And error exception in thread when eclipse runs

This problem is caused by a Java class file compiled by a higher version of JDK trying to run on a lower version of JVM.

1. The solution is to ensure that the versions of JVM (Java command) and JDK (javac command) are consistent. If it is the Linux version, enter the Java – version and javac – version commands in the command line to see if the versions are consistent. I use 1.7.0_ 80。

 

2. The same version still can’t solve the problem. I don’t compile with javac directly from the command line, but with eclipse compiler. Because many compilers come with javac, rather than using the compiler in the operating system. If your compiler is eclipse, you need to set the JDK version in the properties of the project. The method is to right-click the project — & gt; properties — & gt; Java compiler — & gt; enable project specific settings — & gt; and set the compiler compliance level to 1.7, which is the version consistent with the JVM (the version shown by Java – version in the command line). Because of the need to be compatible with other software before, I reduced the Java version from 1.8 to 1.7, but eclipse did not move, so after opening it, I found that the default was 1.8, so I manually reduced it to 1.7, recompiled it, and finally passed!

 

To sum up, if you are compiling with a compiler, make sure that the JDK version of the compiler is consistent with the Java version of the operating system.

The screenshot is as follows:

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.

 

Eclipse Tomcat Error creating bean with name ‘sqlSessionFactory’ defined in URL…

[operation environment]

jdk1.8+eclipse+apache tomcat v7.0

 

[phenomenon]

Code running error org.apache.catelina . core.StandardContext listenerStart

Error creating bean with name ‘sqlSessionFactory’ defined in URL [file:/E:/apache-tomcat-7.0.63-windows-x64

 

Tomcat error

 

Reason: no Tomcat jar package added

Select the project, right-click, select build path — & gt; add Libraries… — & gt; select server runtime — & gt; next — & gt; select Apache Tomcat v7.0 — & gt; OK.

 

 

 

 

 

Eclipse report error Error:opening registry key ‘Software/JavaSoft/JRE’

I want to taste the latest jdk10, Since Java removed the generation of JRE directory in JDK folder when it was installed from java9, and gradle was not compatible with JDK installation mode without JRE folder, it had to switch back to java8, so after repeatedly unloading and reinstalling JDK, an error occurred when starting eclipse Error:opening registry key ‘Software/JavaSoft/JRE’

The error information is as follows:

Please click to input the picture description

Please click to input the picture description

Please click to input the picture description

Please click to input the picture description

Obviously, the system does not find the JRE, and the current java version is still not displayed in the CMD – & gt; Java – version. Of course, the environment variable Java_ Home and path are checked correctly. It is suspected that Java is not found correctly due to cache or registry_ Then, with the mentality of having a try, compare the previous environment variable name with the “Java” in the path_ The key value of “home” is replaced by the uppercase “Java”_ “Home” has been changed to lowercase “Java”_ Then CMD – & gt; Java – version can display the information of jdk8 normally, restart eclipse, perfect solution! Share here, hope to help you!

Error: could not create the Java virtual machine Error:A Fatal exception has occurred

The error report is as follows:

Prompt that the Java virtual machine could not be created successfully.

The main reason for the above error is that eclipse can’t find the JDK installed on the machine when it starts (if it doesn’t install, please go to Baidu installation tutorial to install it). At this time, we need to manually guide eclipse to load the JDK path.

Open the eclipse installation path and find the eclipse.ini File, pay attention to open the file suffix display, as shown in the following figure:

Open with Notepad + + and other text editing tools eclipse.ini File:

Add two lines of code out of the rectangular box in the file, pay attention to the path, fill in the bin directory under the JDK installation path of your own machine, save and restart eclipse. This problem can be solved.