FAQ Summary java.lang.LinkageError:loader Constraint Violation:when Resolving interface method exception

Source: Internet
Author: User
Tags sessions
1.linkage Error

Java.lang.LinkageError:loader constraint Violation:when Resolving interface method exception

javax.servlet.ServletException:java.lang.LinkageError:loader constraint Violation:when Resolving interface Method "Javax.servlet.jsp

Serious: Servlet.service () for Servlet JSP threw exception

Solution:

Is that you can't include the server class in the project's Lib directory for jars such as Jsp-api.jar, El-api.jar, Servlet-api.jar, etc.


JBPM4 SSH2 this error under TOMCAT6.

The reason is that there are three jar packages (Juel.jar, Juel-engine.jar, Juel-impl.jar) in the Web-inf\lib in the project and a Jar pack (TOMCAT6) conflict in El-api.jar lower Lib

Workaround:

Method One: Replace tomcat5.5 a little problem also not

Method Two: Copy Juel.jar, Juel-engine.jar, Juel-impl.jar these three packages to tomcat6 down Lib, and delete the original El-api.jar 2,exception in thread "main" The solution to the Java.lang.LinkageError error is as follows: First output the directory of the compatibility package in the main function:
System.out.println (System.getproperty ("Java.endorsed.dirs"));
My path is: C:\Program files\java\jdk1.6.0\jre\lib\endorsed
Then to the upper level of this directory (here for the Lib directory) to establish endorsed folder, copy files Jaxb-api.jar to endorsed folder, OK fix

3.java.io.eofexception Solution

Serious: IOException while loading persisted sessions:java.io.EOFException

Serious: Exception loading sessions from persistent storage

Analysis: Eofexception represents a signal that unexpectedly arrives at the end of a file or stream at the end of the input process, resulting in a failure to fetch data from the session. The exception is the problem with Tomcat itself, because some of the active sessions were persisted (represented as temporary files) when Tomcat was last abnormally shut down, and during the reboot, Tomcat tried to recover the persisted data of the session but failed to read the result. This exception does not affect the use of the system.
Deletes the tomcat6/work/catalina/localhost/yourprojectname/sessions.ser. If the server is shut down properly, the file is automatically deleted.

Note: Yourprojectname is the name of the Web project you are currently working on.

Considering that everyone's Tomat working directory is different, it is recommended to find your Sessions.ser file in the "search" feature and just delete it. /yourprojectname/under the Sessions.ser can be. the problem of 4.sessions.ser

(1) tomcat/work/catalina/localhost/project name/sessions.ser

Session does not time out the case when the server is shut down when the large is serialized into the project name/sessions.ser started loading, loading the error, the file deleted, restart

Add: Sometimes not necessarily is sessions.ser, my that below has a more tldcache.ser, anyway will inside with. Ser the end of the delete is the

(2) The Problem of Tomcat startup (org.apache.catalina.session.StandardManager.doLoad:IOException

While loading persisted sessions)
5.spring Error

Java.lang.classNotFound Org.springframework.web.servlet.dispatcherServlet

Javax.servlet.serveltException wrapper can not found Org.springframework.web.servlet.dispatcherServlet

Solution:

Due to lack of Spring-webmvc.jar package

6. ERROR lazyinitialize:63 Exception Initializing Proxy

Session session = Session.opensession ();

tx = Session.begintransaction ();

Customer cust = (customer) session.get (Customer.class,new Long (1));

Tx.commit ();

Session.close ();

Throws an exception, no set of initialized free states, deferred loading (database shutdown)

Iterator order = customer.getorders (); iterator ();

7.java.lang.classnotfoundexception:org.apache.struts2.dispatcher.filterdisp

This is usually due to the struts package

Struts-spring-plugn.jar

8.

Org.springframework.dao.InvalidDataAccessResourceUsageException:Could not execute JDBC batch update; Nested exception is org.hibernate.exception.SQLGrammarException:Could not execute JDBC batch update
	Org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException ( sessionfactoryutils.java:630)
	Org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException (Hibernateaccessor.java : 412)
1. The field is a string (VARCHAR2) type with no single quotes
2. The database does not exist in the relevant table or column, the landlord multiple inspection inspection
9. Struts-json-plugn.jar and struts-core-2.2.3 incompatibility issues when AAH consolidates JSON
ava.lang.ClassNotFoundException:com.opensymphony.xwork2.util.TextUtilsJava Code java.lang.ClassNotFoundException:com.opensymphony.xwork2.util.TextUtils:
This is a version of struts error because there is no textutils class in the Xwork2.1.6-core.jar, where Xwork2.1.2-core.jar is added to Classpath, Xwork2.1.2-core.jar contains This thing, we use is xwork2.1.6 jar, when to use Textutils, go to Xwork2.1.2-core.jar to find.

Found that this does not seem to be ah ...

It's settled, OK!!!!
Reason: Jsonplugin-0.34.jar with Struts2-core-2.1.8.1.jar use of the case reported the exception, but the previous project in Jsonplugin-0.34.jar with Struts2-core-2.1.6.jar Use the exception that does not appear

Solution: Remove Jsonplugin-0.34.jar, use Struts2-json-plugin-2.1.8.1.jar and Json-lib-2.1.jar,struts2-junit-plugin-2.1.8.jar three packets 9.antlr-2.7.6.jar missing performance:
and will report noclassdeffounderror:antlr/antlrexception errors.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.