-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I've follow "Hibernate + Zk" article in small talk to see how to use ZK's new Hibernate features to seamlessly integrate Hibernate and ZK together. I've already load example.war and import to my project. and It can run.
but when I've try to create my own projects and try to use ZK3.5 with Hibernate 3.3.1 and use hibernate-annotations-3.4.0.GA.I'm got
java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.AnnotationConfiguration
org.zkoss.zkplus.hibernate.HibernateUtil.java5Factory(HibernateUtil.java:135)
org.zkoss.zkplus.hibernate.HibernateUtil.initSessionFactory(HibernateUtil.java:117)
org.zkoss.zkplus.hibernate.HibernateUtil.initSessionFactory(HibernateUtil.java:108)
org.zkoss.zkplus.hibernate.HibernateUtil.getSessionFactory(HibernateUtil.java:68)
org.zkoss.zkplus.hibernate.HibernateUtil.currentSession(HibernateUtil.java:75)
org.zkoss.zkplus.hibernate.OpenSessionInViewListener.init(OpenSessionInViewListener.java:54)
org.zkoss.zk.ui.util.Configuration.invokeExecutionInits(Configuration.java:798)
org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:343)
org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:296)
org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:227)
org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:167)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
Can you give me advice or hints how to solve this problem?
There is Hibernate's dependence libs not found.
In hibernate there's file readme.txt which explanation necessary libs.
hibernate-annotations.jar
hibernate-commons-annotations.jar
hibernate-core.jar
hibernate-entitymanager.jar
javassist.jar
antlr-2.7.6.jar
commons-codec-1.3.jar
commons-collections.jar
commons-logging.jar
dom4j-1.6.1.jar
slf4j-api-1.5.0.jar
slf4j-log4j12-1.5.0.jar
jta.jar
persistence.jar
I got to add these libs for hibernate
antlr-2.7.6.jar
commons-collections-3.1.jar
dom4j-1.6.1.jar
ejb3-persistence.jar
hibernate-annotations.jar
hibernate-commons-annotations.jar
hibernate-core.jar
hibernate-entitymanager.jar
hibernate3.jar
javassist-3.4.GA.jar
jta-1.1.jar
log4j.jar
slf4j-api-1.5.6.jar
slf4j-log4j12-1.5.6.jar
and the connector for my database
ex: mysql-connector-java-5.1.7-bin.jar
now its working,
Steve
Asked: 2008-09-19 09:36:24 +0800
Seen: 266 times
Last updated: Feb 13 '09