LinkageError: loader constraint violation: when resolving method




Asked on September 08, 2014
Hello All,

I have started to work on Spring 4 and Tomcat 8. I am running my Spring MVC Application on Tomcat and got below error. App was running successfully on tomcat 7.

java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(Ljavax/servlet/ServletConfig;)Lorg/apache/tomcat/InstanceManager;" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/jsp/start_jsp, and the class loader (instance of java/net/URLClassLoader) for resolved class, org/apache/jasper/runtime/InstanceManagerFactory, have different Class objects for the type .getInstanceManager(Ljavax/servlet/ServletConfig;)Lorg/apache/tomcat/InstanceManager; used in the signature
	org.apache.jsp.jsp.start_jsp._jspInit(start_jsp.java:32)
	org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:49)
	org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:180)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:335)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:209)
	org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:267)
	org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1221)
	org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1005)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:952)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)





Replied on September 20, 2014
Check using gradle.
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")




Write Answer











©2024 concretepage.com | Privacy Policy | Contact Us