0

Hibernate help

asked 2010-03-16 06:26:01 +0800

yuanbohan gravatar image yuanbohan
258 2 7

I want to integrate hibernate 3.2 to ZK, but when I import necessary jars to the WEB-INF/lib directory, I find that there are commons-collections.jar and commons-logging.jar existed in that directory. The versions I import are commons-collections-2.1.1.jar and commons-logging-1.0.4.jar. I want to know which one I should keep in the directory? The purpose is to integrate Hibernate3.2 successfully.
Thanks a lot for help. ^_^

delete flag offensive retag edit

10 Replies

Sort by ยป oldest newest

answered 2010-03-16 16:31:39 +0800

lazzha gravatar image lazzha
30

Use the collections-21.1 and logging-1.04, I've been using them withzk+hibernate+spring and there's no problem :D

Cheers

link publish delete flag offensive edit

answered 2010-03-18 07:33:13 +0800

yuanbohan gravatar image yuanbohan
258 2 7

Hi lazzha,

thanks for your help. Now I am trying to integrate hibernate and spring to ZK, you know I am a newer for it, I encounter problems. I want to know if it is ok for you to tell me where to put the ApplicationContext.xml to the right folder? and what should I add to the web.xml? When I run my test.zul to test if I have integrated hibernate and spring successfully to ZK, it always tells me that it can not find the ApplicationContext.xml. My God!!! help me... !!!

link publish delete flag offensive edit

answered 2010-03-18 07:37:37 +0800

danielgoodwin gravatar image danielgoodwin
76 2

Might be worthwhile taking a look at the excellent zksample2 demo app which uses hibernate/spring etc and is an excellent reference application for many other constructs as well
It is a complete working app which IMO is better than some of the small talks on ZK with Spring / Hibernate

Quick search of zksample2 in forums should send you on right path - project itself comes with excellent documentation.

link publish delete flag offensive edit

answered 2010-03-18 07:39:31 +0800

techvts gravatar image techvts
120 2 5

if u want to integrate spring and hibernate in zk first create project using DB form Builder it takes all necessary jars for sring-hibernate-ZK integration it itself creates application-context.xml in src/config folder u can further modify u r application-context.xml according to u r need.and


2nd solution plz see that u have given below configuration in web.xml may be that's why application-context.xml is mot found

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/config/application-context.xml,classpath:/config/datasource-context.xml</param-value>
</context-param>

link publish delete flag offensive edit

answered 2010-03-18 08:42:55 +0800

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

updated 2010-03-18 08:44:22 +0800

No one knows what buld system you use??? If your projects is created as 'default' Eclipse Web project build with ant or asa Maven project.
So the folder structur can be difficult. You can play with following:


	<!-- ====================================================== -->
	<!--                  CONFIGURATION FILES                   -->
	<!-- ====================================================== -->
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>
			classpath:applicationContext.xml
 OR 
			/WEB-INF/applicationContext.xml
		</param-value>
	</context-param>

a look in your exported war-file can be helpful to see where your configuration file is stored.

best
Stephan

link publish delete flag offensive edit

answered 2010-03-18 09:57:04 +0800

yuanbohan gravatar image yuanbohan
258 2 7

hi danielgoodwin, I have use svn to download the zksample2, but the hierarchy is so complex and ... I am not familiar with svn, I can not know anything from that project. Can you just pack it and send it to me ? My email is: [email protected] . Thanks a lot. I want to integrate zk with spring and hibernate, my god, difficult for me now!!!! help me ...

link publish delete flag offensive edit

answered 2010-03-18 09:59:16 +0800

yuanbohan gravatar image yuanbohan
258 2 7

hi techvts,

from what you said "f u want to integrate spring and hibernate in zk first create project using DB form Builder it takes all necessary jars for sring-hibernate-ZK integration it itself creates application-context.xml in src/config folder u can further modify u r application-context.xml according to u r need", can you give me some advice how to use DB form builder? and how to get it? some links or advice, vedio. Thank you very much for offering me your help.

link publish delete flag offensive edit

answered 2010-03-18 10:00:18 +0800

yuanbohan gravatar image yuanbohan
258 2 7

hi terrytornado,

can you tell me how to download zksample2 project without svn? I can not get some helpful information from the hierarchy of the svn project. Thanks a lot for helping me .

link publish delete flag offensive edit

answered 2010-03-18 16:06:44 +0800

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

updated 2010-03-18 16:06:57 +0800

on the sourceforge.net page of our Zksample2 project you can download the packed war-file too. It's packed with the sources.
Please read the documentation too.

best
Stephan

link publish delete flag offensive edit

answered 2010-03-19 00:40:39 +0800

techvts gravatar image techvts
120 2 5

hi,

look for steps to build form builder in below link on zk documentation

http://docs.zkoss.org/wiki/Zeta_DB_Form_Builder_Step_by_Step

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-03-16 06:26:01 +0800

Seen: 410 times

Last updated: Mar 19 '10

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