zk « Development « JPA Q&A





1. Hibernate with ZK    stackoverflow.com

Does anyone have any experience on getting Hibernate working with ZK? Thanks Edit: Sorry to clarify what I am looking for: I am looking for anyone that has experience doing this, maybe they can ...

2. Problem with ZK 3.6.2 and Hibernate 3.3.0    zkoss.org

HI , I am new to ZK. I am trying integrate ZK with Hiberante by steps mentioned in http://docs.zkoss.org/wiki/Hibernate. But while excuting I am getting following error ... Oct 26, 2009 3:36:54 PM org.zkoss.zkplus.hibernate.HibernateUtil initSessionFactory:124 SEVERE: Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/hibernate/cfg/HbmBinder$SecondPass Oct 26, 2009 3:36:54 PM org.zkoss.zk.ui.util.Configuration invokeExecutionCleanups:822 SEVERE: Failed to invoke class org.zkoss.zkplus.hibernate.OpenSessionInViewListener java.lang.ExceptionInInitializerError at org.zkoss.zkplus.hibernate.HibernateUtil.initSessionFactory(HibernateUtil.java:125) at org.zkoss.zkplus.hibernate.HibernateUtil.initSessionFactory(HibernateUtil.java:108) at org.zkoss.zkplus.hibernate.HibernateUtil.getSessionFactory(HibernateUtil.java:68) ...

3. ZK-Hibernate    zkoss.org

4. ZK5 Hibernate problem    zkoss.org

I just downloaded the example.war file from this page (http://www.zkoss.org/smalltalks/hibernatezk/hibernatezk.dsp) and was able to make the application work with Eclipse, MySQL, and Tomcat. However, when I replace the ZK libraries with the latest ZK5 libraries, I get a variety of errors. First is the dom4j conflict. If I then remove the dom4j library from my WEB-INF/lib folder, then I get the ...

5. Problem : Hibernate 3.3.2 with ZK 3.6.3    zkoss.org

Hi everybody , I'm newbie in Zk and i want to start my project by using hibernate, spring with Zk so i tried to create some projects for test but i got exceptions when i try to apply the tutorial mentioned on this page : http://docs.zkoss.org/wiki/HibernateExceptions-------------------------javax.servlet.ServletException: L'excution de la servlet a lanc une exception

6. Hibernate LazyInitializationException JEE Environment    zkoss.org

I'm having some difficulties configuring a plain JEE web application using ZK and Hibernate. I'm trying to configure the org.zkoss.zkplus.jpa.OpenEntityManagerInViewListener, but it depends on hibernate.cfg.xml, what is not my case. I'm using JPA and hibernate as my JPA provider. I already wrote a simple filter starting a UserTransaction on request, but this didn't work either. Do anyone has experience with this ...

7. Hibernate help    zkoss.org

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. ...

8. Hibernate Problem !!    zkoss.org

24-Mar-2010 23:00:04 org.apache.tomcat.util.digester.SetPropertiesRule beginWARNING: {Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:canvas_demo' did not find a matching property.24-Mar-2010 23:00:04 org.apache.tomcat.util.digester.SetPropertiesRule beginWARNING: {Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:DERI' did not find a matching property.24-Mar-2010 23:00:04 org.apache.catalina.core.AprLifecycleListener initINFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Diskeeper Corporation\Diskeeper\;C:\Program Files\ThinkPad\ConnectUtilities;C:\Program ...

9. reload hibernate    zkoss.org

Hello,I'm using ZK and Hibernate.I want to create a class dynamically (from a template, then compile the class by running javac, then map the class name in hibernate.cfg.xml), but if I don't redeploy/restart the application, that new class will never be loaded. is there anyway to restart hibernate without restarting the application?





10. zk3.6.3 and Hibernate 3.5.5 problem    zkoss.org

zk3 Used to cleanup when a session is destroyed ZK Session cleaner org.zkoss.zk.ui.http.HttpSessionListener The ZK loader for ZUML pages zkLoader org.zkoss.zk.ui.http.DHtmlLayoutServlet update-uri /zkau 1 The asynchronous update engine for ZK auEngine org.zkoss.zk.au.http.DHtmlUpdateServlet zkLoader *.zul ...

11. Zk and hibernate    zkoss.org

Hi,I am using ZK and Hibernate. Till now everything is good.But for my project, I have to communicate with two distinct databases.How can I manage this? I have created a second hibernate configuration file, created my mapping classes, as I was doing for the first database. But the connection to the second database never happens.Any hint to do this?

12. Need a good example from Hibernate + zk    zkoss.org

Good afternoon Zk friends, i'm using zk + hibernate but i need a good example about how could i insert data from .zul pages to a database using MySQL, to see how hibernate works! if you can give me a source with java + zk + hibernate that would be awesome! Thanks for reading!!

15. Hibernate and ZK    zkoss.org

I want to combine Hibernate and ZK in my project. First I tried hibernate in a normal java project, and that works perfectly!Then I tried to do the same with ZK. I got a lot of errors, but I solved them by including several .jars. In the end I get this error I couldn't cope:

16. Automated Business Logic Layer for ZK with Hibernate/JPA    zkoss.org

I have observed a number of fundamentally different approaches for implementing business logic. Some advocate a services layer, others advocate adding logic to domain objects. I have not yet read anything entirely convincing. Though the term is often used, there is considerable confusion, ranging from definition to architecture to proper tool utilization.





17. ZK Hibernate SessionCleanup problem    zkoss.org

Orignial message at: https://sourceforge.net/forum/message.php?msg_id=4007780 By: andigre Hi On my ZK Webpage I use zhe ZKHibernateUtil to access the session. It looks like everything works fine. But after a day or a couple accesses from different sessions, the database access fails. I run ZK 2.1.3, Hibenrate 3.2 on Tomcat 5.5.20. The catalina log: 11.11.2006 10:17:04 org.hibernate.transaction.JDBCTransaction commit SCHWERWIEGEND: JDBC commit failed com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: ...

18. Problem with Hibernate    zkoss.org

Orignial message at: https://sourceforge.net/forum/message.php?msg_id=4032408 By: taffit_ Hello @all, I have a problem with Hibernate and the Hibernate-session. I've read everything here in the forum, the documentation and the examples and tried for a few days different settings, but with no results. It seems that the session is not set by the constructor, although when I get it within the method, everything ...

19. problem zk + hibernate (Master-detail)    zkoss.org

Orignial message at: https://sourceforge.net/forum/message.php?msg_id=4071563 By: cmaniac Can anybody help me with this issue? We are starting a project with zk+hibernate, first of all we have everything configurated, I mean the project is runnig (still under development) and it goes well.. until.., well I resume de problem: we have a window which we have to edit elements from it's Master and details, ...

20. JPA With Hibernate?    zkoss.org

Orignial message at: https://sourceforge.net/forum/message.php?msg_id=4442529 By: sousa1981 Go to: http://en.wikibooks.org/wiki/ZK/How-Tos Direct Link: http://en.wikibooks.org/wiki/ZK/How-Tos#ZK_2.x.x_.2B_Spring_2.x.x_. 2B_Hibernate_3.x_.2B_JUnit_Test There is an entry ZK 2.x.x + Spring 2.x.x + Hibernate 3.x + JUnit Test So, you could modify it to use JPA easily or use both together Hibernate and Jpa Implementation. To change to use only JPA, do the following: 1. Under "C. Code - Data Access ...

22. Hibernate problem with new ZK 2.3    zkoss.org

23. ZK, Hibernate and JSE1.4 problem    zkoss.org

Orignial message at: https://sourceforge.net/forum/message.php?msg_id=4240679 By: andigre Hi Zk seems not to work with 1.4 and Hibernate (Since 2.2.1). I found out that I have to replace the HibernateUtil in the zkplus.jar with an older version. Since 2.2.1 there is a static initializer which uses AnotationConfiguration. This not only requires the hibernate-annotations.jar in the classpath, but also jdk1.5. --> with 1.4 you ...

24. Can't use hibernate and dont know whatto do    zkoss.org

Orignial message at: https://sourceforge.net/forum/message.php?msg_id=4275209 By: ananban This is my zul script import org.hibernate.*; import org.hibernate.Session; import org.hibernate.SessionFactory; import cfo.persistence.HibernateUtil; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; void selectProjects() { Session session = HibernateUtil.getSessionFactory().getCurrentSession(); } And this is HibernateUtil class package cfo.persistence; import org.hibernate.*; import org.hibernate.cfg.*; public class HibernateUtil { private static final SessionFactory sessionFactory; static { try { sessionFactory = ...

25. How to initialize Hibernate?    zkoss.org

Orignial message at: https://sourceforge.net/forum/message.php?msg_id=4642258 By: enixser After doing my first steps with ZK (creating a ZUL page) I'm now trying to use the business logic of an existing web application. That means, I want to use some classes to load objects from the database using Hibernate with annotations. My existing application uses its own HibernateUtil class with a static block doing ...

26. Hibernate lazy problem    zkoss.org

Orignial message at: https://sourceforge.net/forum/message.php?msg_id=4864623 By: zemo3320 Hi to all, I have a problem regarding ZK and Hibernate, tried with two different DBMSs, MySQL and Postgre. The problem lies in lazy initialization in some cases, most things work just fine. Theese two lines of code are together: ProviderOwner owner = provider.getProviderOwner(); // this line is ok, provider is the method parameter OwnerGroup ...

27. Hibernate + ZK = weird results    zkoss.org

Orignial message at: https://sourceforge.net/forum/message.php?msg_id=4931253 By: brendan4linux Hi, I'm pretty new to java programming, but I use netbeans and the nbxdoclet plugin to generate Objects and the data model. Everything is going great, but when I started creating and saving objects from zscript using hibernate (through generated Facade beans), I get inconsistent results. For example, I change a value of an object ...

28. Hibernate    zkoss.org

29. Hibernate Help Help ^^    zkoss.org

30. Hibernate + JPA    zkoss.org

how should i open a session and process a request? i already read the provided smalltalk article "Hibernate + ZK", but that dont handles jpa-integration :( i know, that with the code printed above, i made a session per request... i would be highly appreciated if someone gives me a code snippet or a good explanation how to handle this problem... ...

31. Startup Problems / Configuring ZK and Hibernate / JPA    zkoss.org

public long getId() { return id; } public void setId(long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPassword() { return password; } public void setPassword(String password) { this.password ...

32. Hibernate and threads    zkoss.org

33. ZK3.5 + Hibernate    zkoss.org

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

35. Hibernate Programmatic Configuration    zkoss.org

Hello all. I am writing an Open Source help desk application (http://code.google.com/p/triage/). Upon first accessing the web app, the user is going to be prompted to configure the default settings for the application. Part of this is configuring the database connection settings. Since I am using Hibernate, I need to configure the Listeners for the Hibernate session handling. I figured out ...

36. problems with zk + jpa(hibernate)    zkoss.org

hi all, i am having trouble when creating a entitymanager in a zk aplication. That is the error messagem. Someone could help to solve this problem? hibernateCore, HibernateAnotations, HibernateValidadtor are on classpath 04/03/2009 11:05:39 org.apache.catalina.startup.Catalina start INFO: Server startup in 2895 ms 04/03/2009 11:06:01 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1107 SEVERE: >>java.lang.NoClassDefFoundError: javax/persistence/Persistence >>java.lang.ClassNotFoundException: javax.persistence.Persistence >> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) >> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) >> at java.lang.ClassLoader.loadClassInternal(Unknown Source) ...

37. Hibernate problem    zkoss.org

20 Mar 2009 21:44:41 GMT 20 Mar 2009 21:44:41 GMT Hi everyone, I'm trying to develop a zk + hibernate app, I followed the recommendation in the smalltalk, but I had no success with that, I'm getting the following message: GRAVE: Erreur lors de la configuration de la classe d'coute de l'application (application listener) org.zkoss.zkplus.hibernate.HibernateSessionContextListener java.lang.NullPointerException at org.zkoss.zkplus.hibernate.HibernateSessionContextListener.(HibernateSessionContextListener.java:70) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ...

38. Jasper JPA    zkoss.org

import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; public EntityManagerFactory emf; emf = Persistence.createEntityManagerFactory("MiUnidadPersistente"); EntityManager em = emf.createEntityManager(); Map parameters = new HashMap(); parameters.put("JPA_ENTITY_MANAGER", em); //zk.demo.categ.CategDS ds = new zk.demo.categ.CategDS(); Clients.showBusy("Attendere mentre si genera ...

39. Using hibernate with ZK    zkoss.org