, Dom4j.jar is a Java XML API, similar to Jdom, used to read and write XML files. Hibernate uses it to read and write configuration files. NecessaryThe above is Hibernate's core jar package, is necessary to configure the SSH architecture, the following are optional.=========================================================Versioncheck.jar version Check OptionalSwarmcache.jar OptionalJboss-cache.jar Treecache
is a Java XML API, similar to Jdom, used to read and write XML files. Hibernate uses it to read and write configuration files. NecessaryThe above is Hibernate's core jar package, is necessary to configure the SSH architecture, the following are optional.=========================================================Versioncheck.jar version Check OptionalSwarmcache.jar OptionalJboss-cache.jar Treecache OptionalJg
Error Case:When the framework jar package version used by the project is inconsistent, various errors may be reported, such as:Spring-core uses 4.2.4-release version, while Hibernate-core may report when using 5.2.11.Final, transaction turn-On Error, Org.hibernate.Session.getFlushMode () Lorg/hibernate/flushmode and other errors!Analysis Reason:Because the spring version is less than Hibernate, the transaction that caused spring management does not wo
collection classes developed by Apache, which are more powerful than Java. util. Required
Dom4j is a Java xml api, similar to JDOM, used to read and write XML files. Hibernate uses it to read and write configuration files. Required
The above is the core jar package of hibernate, which is required to configure the SSH architecture. The following are optional.
Versioncheck.
isjava.lang.NoSuchMethodError:org.objectweb.asm.ClassVisitor.visit (iiljava/lang/string; ljava/lang/string; [Ljava/lang/string; ljava/lang/string;) VInvocation of Init method failed; Nested exception isjava.lang.NoSuchMethodError:org.objectweb.asm.ClassVisitor.visit (iiljava/lang/string; ljava/lang/string; [Ljava/lang/string; ljava/lang/string;) VCause:When programming with spring AOP, you need to use Asm*.jar, and hibernate also needs to use ASM-rel
copy a *.hbm.xml file under Hibernate-distribution-3.6.0.final, put it under the domain package, and edit it later./**-------------------------Complete hibernate! -------------------------------*/(4) Spring
Add a Jar Package
Configuration file Applicationcontext.xml
/**-------------------------Add Spring-------------------------------*/1. Add Jar:Copy the core jar package, Spring.jar unde
Struts2 + Hibernate + Spring (SSH) three major frameworks integrate jar packages, struts2ssh
Struts2 + Spring3 + Hibernate3 framework integration
1. Use of each framework (build a Development Environment)* Presentation layer framework struts21) jar package import: apps/struts2_balank.war contains the most basic jar pac
no less.about Configuration
Registration information in Structs.xml:
The correct wording:
Summary:
The lead jar package must be quoted. The implementation of the custom interceptor is not difficult to understand, we first wrote a Privilegeinterceptor class, and then because the SSH framework is used here, class creation is first given to spring management, So you can't register directly in Structs.x
Document directory
Exception: Error creating bean with name 'sessionfactory 'defined in servletcontext resource [/WEB-INF/classes/applicationcontext. ">
Well, at, there is a problem with SSH integration, that is, when using myeclipse to import packages, it is not clear which functional modules have which packages,
Then, the first version of the dormitory appears.
Exception: Error creating bean with name 'sessionfactory 'defined in servletcontext
Commons-logging-1.0.4.jar
You do not need to import Struts2 after it is added.
Log4j-1.2.15.jar
Hibernate does not need to be imported after it is added.
Jar file: The red is the correct jar package.
Operate the database jar
Mysql-connector-java-5.0.8-bin.jar
Struts2
The
error message:Com.jcraft.jsch.JSchException:Algorithm Negotiation FailProblem Analysis:The sshd configuration does not open an algorithm that supports Jsch jar requirements, the default open algorithm can be seen in the man sshd_config, it is possible that the advanced version of sshd turns off some of the algorithms by default (version 7.5 has this problem).Hash algorithm view: Ssh-q macKEX algorithm view:
as Velocity, Freemarker, JasperReports integrated classes, and related classes for verifying validation.3. Spring-core-3.2.0.release.jarSpring's basic core tools class4. Spring-expression-3.2.0.release.jar5. Com.springsource.org.apache.commons.logging-1.1.1.jarLog packet, STRUTS2, Spring, hibernate use this jar package to support logging on log4j and JDK 1.4+6. Com.springsource.org.apache.log4j-1.2.15.jarPackage required for Operation log7. AOP Devel
When the jar pack is put more, it exception what unable to load .... I haven't been able to solve the internet search for half a day.The jar packages described below are placed in Web-inf/lib and Tomcat/libThrough my one to add to the Tomcat/lib, until the start of the server is no longer reported classnotfoundexception or classdefnotfoundexception so far, the real TM is not easy AHCommons-fileupload-1.3.1.
"struts related jar"Commons-fileupload-1.2.2.jarCommons-io-2.0.1.jarCommons-lang3-3.1.jarFreemarker-2.3.19.jarJavassist-3.11.0.ga.jarOgnl-3.0.5.jarStruts2-core-2.3.4.1.jarXwork-core-2.3.4.1.jar"hibernate related jar"Antlr-2.7.6.jarCommons-collections-3.1.jarDom4j-1.6.1.jarHibernate3.jarHibernate-jpa-2.0-api-1.0.0.final.jarJavassist-3.12.0.ga.jarJta-1.1.jarSlf4j-
A typical event was encountered in the recent project when Rhel's SELinux was set to disableUsing Java's Jsch library to invoke the SSH command will randomly return an empty string, the version I used is 0.1.49, and the latest version 0.1.51 is not tested.About jsch:http://www.jcraft.com/jsch/To this end, I specifically wrote a program test:Package Com.ibm.leo;import Com.ibm.gts.cms.common.guestssh.api.guestsshservicefactory;import Com.ibm.gts.cms.com
Java.lang.noclassdeffounderror:org/apache/commons/logging/logfactorycaused by:java.lang.ClassNotFoundException:org.apache.commons.logging.LogFactoryThis issue is caused by a lack of commons-logging.jar (the appropriate jar package can be found in spring)——————————————————————————————————————————————————————————————————————————Java.lang.noclassdeffounderror:edu/emory/mathcs/backport/java/util/concurrent/blockingqueuecaused By:java.lang.ClassNotFoundExc
Struts2 + Spring3 + Hibernate3 Framework Integration1. Use of each frame (development environment construction)* Presentation Layer Frame STRUTS21) Jar Package import: Apps/struts2_blank.war contains struts2 to develop the most basic jar packageStruts2-convention-plugin-2.3.7.jar for struts using annotations (if not developed with annotations, no import required)
1. Add struts capabilities for the project
A) Right-click the project and choose build path> Add extendal archives.
, Select the following jar package under the Lib folder in the struts2 installation package (the version can be different
You can fix the same content. The figure is 2.1, and the actual project is 2.2)
B) Click Finish. The added project has an additional web. xml file with the core filter added.
.
Xmlns = "http://java.sun.com/xml/ns/ja
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.