It may be because the version is too high. Modify the dependent version related to spingmvc in the POM file to less than 5.3.0. I use 5.2.9 RELEASE
Tag Archives: web
Jenkins auto deploy web project daily use error 1
The company’s project is automatically deployed with Jenkins + Maven + Tomcat. If it is used more times, an error message will be reported after the build is successful:
java.nio.file.FileSystemException: /var/lib/jenkins/workspace/gydl_sc/target/gydl.war -> /var/lib/jenkins/jobs/gydl_sc/modules/com.thinkgem.jeesite$gydl/builds/26/archive/com.thinkgem.jeesite/gydl/1.2.7/gydl-1.2.7.war: No space on the device In this case, the server directory /var/lib/jenkins/jobs/gydl_sc/modules/com.thinkgem.jesite$gydl/builds/ is not enough space, just delete the files stored during previous deployments
Error in importing web project from eclipse
It mainly uses SVN checkout to a web project, and then imports it into eclipse to run. Normally, there should be no problem, but sometimes there are problems. After reading other people’s blogs and really solving the problem, just record it. Because there are many pits, if you want to fall and get up again, you will have an inexplicable emotion
1、 Items have red exclamation marks
If you import the project into eclipse, the project will have a red exclamation point, and there is no error in the code content. Everyone who came out of Baidu online said that either the JDK version was wrong or there was a problem with the jar package
Right click the project and select “build path —— > Configure “Build path”, and then you can see the error item prompted under the libraries column
My fault is that there is a jar package missing. There is a red cross in front of the jar package and parentheses behind it. Remove the jar package and proceed to the next step
2、 Error when starting Tomcat
When the project is started, Tomcat starts to report errors
1、The required Server component failed to start so Tomcat is unable to start.
This error can be double clicked server Check the box beginning with publish in an options in the overview
2. Org.apache.catalina.lifecycleexception: failed to start component exception
This is mainly caused by the problem of jar package. There are two methods to solve it
( 1) You can download the missing jar package and add it
My fault is that I deleted the jar package that reported the error and did not import it
( 2) This is found on Baidu. It can also solve my current situation. I don’t know the specific principle
In the Tomcat configuration file/conf/catalina.properties (about 122 lines)
org.apache.catalina.startup.ContextConfig.jarsToSkip=
After adding *. Jar
Change to:
org.apache.catalina.startup.ContextConfig.jarsToSkip=*.jar
Of course, the above decision is based on the blog of many unknown friends on Baidu after their own pit. It’s not an absolute solution. After falling into the pit, look at the solutions of many friends to make yourself less flustered. Thank you for sharing
405 error reporting in Web Development
405 errors may occur in the following situations in web development
1. The request mode at the front end does not match that at the background:
For example, if you use post in the background and get in the front end, a 405 error will appear. So just let them
If you keep consistent, you won’t report an error
2. The request parameters submitted at the front end are inconsistent with those at the back end:
In many cases, we will splice several parameters behind the request path. Once the spliced parameters are consistent with the parameters to be accepted in the front-end controller
Inconsistent parameters (inconsistent names or inconsistent numbers) will also report an error of 405
3. The request path is not written correctly, and sometimes 405 errors may occur
Web Project Error: javax.servlet.ServletException: Circular view path [registerForm]
Error:
Console output:
Mar 21, 2019 10:12:32 AM org.springframework.web.servlet.PageNotFound noHandlerFound
Warning: No mapping found for HTTP request with URI [/FormTest/] in DispatcherServlet with name 'springmvc'
Mar 21, 2019 10:13:44 AM org.apache.catalina.core.StandardWrapperValve invoke
Warning: Servlet.service() for servlet [springmvc] in context with path [/FormTest] threw exception [Circular view path [registerForm]: would dispatch back to the current handler URL [/FormTest/registerForm] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)] with root cause
javax.servlet.ServletException: Circular view path [registerForm]: would dispatch back to the current handler URL [/FormTest/registerForm] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
at org.springframework.web.servlet.view.InternalResourceView.prepareForRendering(InternalResourceView.java:205)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:145)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1244)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1027)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:971)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1137)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Solution: the spring MVC access path has the same name as the page, modify the view or path name
Web service, download the file linked with HTTPS, and prompt javax.net.ssl.sslkeyexception: RSA premaster secret error
Open source software supply chain lighting plan, waiting for you>>>
Question:
On the server, download the link file of HTTPS and report javax.net.ssl.sslkeyexception: RSA premaster secret error
When running locally, no error is reported, but the error is reported on the server
Solution:
Set lib/ext/sunjce in the JRE directory_ The provider.jar is loaded in
JRE Directory: $Java_ HOME/jre
Load sunjce_ Two methods of provider.jar:
1. Will sunjce_ Copy the provider.jar to the web project directory
2. Modify the startup script and load the JRE directory into classpath
vi catalina.sh
Modify elif [“$1” = “start”]; Then, add – DJava. Ext. dirs to specify the directory to load additional jars, and separate multiple directories with
eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVV
A_OPTS $CATALINA_OPTS \
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Djava.security.manager \
-Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.ext.dirs="/opt/web/customscript/customlib:$JAVA_HOME/jre/lib/ext" \
About eclipse new web project, prompt: “the superclass” javax. Servlet. Http. Httpservlet “was not found on the Java” solution
New jsp page always prompts.
Multiple annotations found at this line:
– The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
Solution steps.
1. Right click on the project-build path
2. Select configure build path…
3. Select java build path
4. Add Library –> server Runtime -> Click Next
5. Select Server runtime (My Version is Tomcat 7.0) –>Done
How does IntelliJ idea use Maven Tomcat plug to run web projects
First, run – > Edit configurations, as shown in the figure below:
Then click the plus sign in the upper left corner to add a new configuration, as shown in the following figure:
Select maven, as shown below:
Fill in your configuration information below and click apply, as shown in the following figure:
You can see that the information you just configured will appear in the toolbar. You can run the web project by directly clicking run or debug
Question:
No plugin found for prefix ‘tomcat7’ in the current project and in the plugin groups
Change the way to add Maven’s configuration file in pom.xml
<build>
<plugins>
<!-- java Compiling plug-ins -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<!-- Specify the port -->
<port>9101</port>
<!-- Request Path -->
<path>/</path>
</configuration>
</plugin>
</plugins>
</build>