0

I read a lot of tutorials about Hibernate, Spring and Jsf. I want to work with all of them together. I've found a lot of tutorials on the Internet about how to use them

together but most of them doesn't give you the .jar libraries needed so (i think) this is because i put incompatible versions of the framework jars. So I thought that this is the reason of my "errors".

Do you have a small example that uses Hibernate3 + Spring3 or Jsf2.0+Spring3 or Hibernate3+Jsf or all together. I know Ant and I work with Eclipse but this is not a problem, I can learn Maven or other build tools.

Thank's very much!

2 Answers 2

1

I have a similar project setup right now and I don't use Maven. I am too much of a control freak for a tool like Maven, so here is my WEB-INF/lib folder. I am using Primefaces as well but I labeled the Primefaces specific libraries for you.

antlr-2.7.6.jar

com.springsource.javax.persistence-2.0.0.jar

commons-codec-1.5.jar

commons-collections-3.1.jar

commons-fileupload-1.2.1.jar

commons-io-1.4.jar

commons-lang-2.4.jar

commons-logging-1.1.jar

commons-logging-api-1.1.jar

dom4j-1.6.1.jar

hibernate3.jar

iText-5.0.4.jar (For Primefaces)

javassist-3.9.0.GA.jar

jboss-el-2.0.0.GA.jar (Optional for running on Tomcat 6)

jsf-api.jar (Mojarra 2.0.4)

jsf-impl.jar (Mojarra 2.04

jta-1.1.jar

jtds-1.2.5.jar

log4j-1.2.15.jar

mysql-connector-java-5.1.17-bin.jar (For MySQL)

org.springframework.aop-3.1.0.CI-1162.jar

org.springframework.asm-3.1.0.CI-1162.jar

org.springframework.aspects-3.1.0.CI-1162.jar

org.springframework.beans-3.1.0.CI-1162.jar

org.springframework.context-3.1.0.CI-1162.jar

org.springframework.context.support-3.1.0.CI-1162.jar

org.springframework.core-3.1.0.CI-1162.jar

org.springframework.expression-3.1.0.CI-1162.jar

org.springframework.jdbc-3.1.0.CI-1162.jar

org.springframework.orm-3.1.0.CI-1162.jar

org.springframework.oxm-3.1.0.CI-1162.jar

org.springframework.transaction-3.1.0.CI-1162.jar

org.springframework.web-3.1.0.CI-1162.jar

org.springframework.web.portlet-3.1.0.CI-1162.jar

org.springframework.web.servlet-3.1.0.CI-1162.jar

poi-3.2-FINAL-20081019.jar (For Primefaces)

primefaces-2.2.1.jar

slf4j-api-1.5.8.jar

slf4j-jdk14-1.5.8.jar

spring-security-acl-3.1.0.RC3.jar

spring-security-config-3.1.0.RC3.jar

spring-security-core-3.1.0.RC3.jar

spring-security-crypto-3.1.0.RC3.jar

spring-security-taglibs-3.1.0.RC3.jar

spring-security-web-3.1.0.RC3.jar

sunny-1.0.1.jar (For Primefaces)

2
  • That's a lot of jars really. An alternative is to use GlassFish, Resin or TomEE. They already come bundled with JSF 2, JPA 2 (Hibernate is JPA provider) and CDI/EJB, which is comparable to Spring. Especially the last two servers are barely larger than Tomcat. This will safe you from managing so many jars and worrying about their compatibity and such.
    – Mike Braun
    Dec 31, 2011 at 15:16
  • @MikeBraun I completely agree, but if you are developing a project intended for shared hosting you often have a very limited choice of what application server will be on production. Further if you are developing an application for a client who insists on a specific outdated application server you likewise have little choice. Thanks for pointing out better alternatives though. Jan 2, 2012 at 15:19
1

if you are using myeclipse 9 then you can easily add the required jar file.

  1. right click on project
  2. move on MYECLIPSE
  3. First you can add JSF capablities which version you required JSF2.0 or JSF 1.0.
  4. Then again first step and add capablities of Spring which version you required.
  5. And Third time agian first step and add capablities for hibernate required jar file.

now the jar files automatically add you project.

I know Myeclipse is not open source but you can get trail version. After adding the jars files you copy these jar files and then in any tool like eclipse or other you can just put these jar files in you project of your required version jars files.

Not the answer you're looking for? Browse other questions tagged or ask your own question.