0

ZK + Hibernate Tools + Hibernate

asked 2010-05-17 06:16:51 +0800

mguilherme gravatar image mguilherme
132 3

Hello,
I'm new to ZK and Hibernate tools.
I've built some zk interfaces with success, but now I'm trying to use ZK with Hibernate and Hibernate tools with no success at all.
I've searched on the internet but the information is really bad and not recent, can some of you tell me the right direction?
I need to start a new project, but I really need to integrate zk with a good ORM, hibernate, jpa or ibatis.
Thanks

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2010-09-06 05:05:43 +0800

yaryan997 gravatar image yaryan997
210 2

Hello,
I'm new to ZK and Hibernate tools.

I had started to build application using ZKOSS as my front end and Hibernate ORM as backend tool.

But when I deploy my project I got these types of errorr..

Don't know why this is Happening ...

Plz.... Help me to get out of this problem

javax.servlet.ServletException: Servlet execution threw an exception

java.lang.ExceptionInInitializerError
org.zkoss.zkplus.hibernate.HibernateUtil.initSessionFactory(HibernateUtil.java:125)
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:812)
org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:346)
org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:299)
org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:229)
org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:165)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

java.lang.NoClassDefFoundError: 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:812)
org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:346)
org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:299)
org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:229)
org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:165)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


Thanks in advance.

link publish delete flag offensive edit

answered 2010-05-19 10:17:17 +0800

mguilherme gravatar image mguilherme
132 3

hi,
thanks for the answers, I'm now running ZK + hibernate (with annotations) without spring. My next step is to integrate the project in JBoss Hibernate tools.
If anyone could accomplish this, please let me know.

link publish delete flag offensive edit

answered 2010-05-17 20:09:02 +0800

SimonPai gravatar image SimonPai
1696 1

Hi mguilherme,

Can your hibernate part work alone?
I'd suggest you try to build a minimal, experimental project with hibernate first, and then move to integrating hibernate with ZK later.
Here is an example on hibernate that gave me some good experience.

Regards,
Simon

link publish delete flag offensive edit

answered 2010-05-17 14:38:51 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2010-05-17 14:39:57 +0800

you can study and debug the whole code of this sample application.

best
Stephan

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-05-17 06:16:51 +0800

Seen: 875 times

Last updated: Sep 06 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More