Error Performing Load Command Cannot Open Connection
Contents |
not work correctly without it enabled. Please turn JavaScript back on and reload this page. All Places > Seam > Discussions Please enter a title. You can not post a blank message. Please type your message and try again. 6 Replies Latest reply org.hibernate.exception.genericjdbcexception cannot open connection with root cause on Sep 19, 2007 10:06 AM by Fernando MontaƱo org.hibernate.exception.GenericJDBCException: Cannot open
Org.hibernate.exception.genericjdbcexception Cannot Open Connection Oracle
co Robin Aug 30, 2007 3:40 AM I have a SFSB with this factory: @Factory("userSubscriptions") public void getUserSubscriptions() org hibernate exception genericjdbcexception cannot open connection mysql { userSubscriptions = em.createQuery("FROM Subscription s WHERE s.user.sign=:sign ORDER BY s.prio") .setParameter("sign", getCurrentUser().getSign()) .getResultList(); }This collection is used as value for a datatable and works fine. When I click a org.hibernate.exception.genericjdbcexception could not insert button in which triggers an action in which userSubscriptions is accessed again I get: 2007-08-30 09:22:49,843 INFO [org.hibernate.event.def.DefaultLoadEventListener] Error performing load command org.hibernate.exception.GenericJDBCException: Cannot open connection Caused by: org.jboss.util.NestedSQLException: Transaction is not active:To me "Cannot open connection" indicates some problem with the database but thats not possible since I do a lot of other db operations. I think I can get
Org.hibernate.exception.genericjdbcexception: Could Not Extract Resultset
around this problem by doing the transactions manually but do I really want to do that? I've had a lot of problems with this in my application so any tips would be most appreciated =). 7883Views Tags: none (add) This content has been marked as final. Show 6 replies 1. Re: org.hibernate.exception.GenericJDBCException: Cannot ope Miloslav Vlach Sep 19, 2007 5:04 AM (in response to Robin) Hi, I have the same problem you are wrote. Some of DB operations succesed but some throws this exception. Like Show 0 Likes(0) Actions 2. Re: org.hibernate.exception.GenericJDBCException: Cannot ope stephen.friedrich Sep 19, 2007 7:11 AM (in response to Robin) Typically this means there was a previous error that corrupted the transaction.Specifically I have been getting this when trying to use MyFaces Trinidad with Sun's JSF RI. For some strange reason whenever a validation fails from that point on you'll get this error. Like Show 0 Likes(0) Actions 3. Re: org.hibernate.exception.GenericJDBCException: Cannot ope Alex Ka Sep 19, 2007 7:16 AM (in response to Robin) I'm facing the same problem but with another idea in my mind:http://www.jboss.com/index.html?module=bb
Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.
This Site Careers Other all forums Forum: Object https://coderanch.com/t/502139/ORM/databases/Exception-thread-main-org-hibernate Relational Mapping Exception in thread "main" org.hibernate.exception.GenericJDBCException: Cannot open connection Prasanna Lakshmi Tallapaka Greenhorn Posts: 24 posted 6 years http://forum.spring.io/forum/spring-projects/data/23138-hibernate-cannot-open-connection-under-peak-load ago Hi, Could any one be so kind to help me getting rid of this exception. Many thanks! Warm cannot open Regards, Prasanna Lakshmi Tallapaka Paul Sturrock Bartender Posts: 10336 I like... posted 6 years ago Can you show us your code and post the stack trace? JavaRanch FAQ HowToAskQuestionsOnJavaRanch Prasanna Lakshmi Tallapaka Greenhorn Posts: 24 posted 6 years cannot open connection ago many thanks for your response. Here you go! My Hibernate Client program. EmployeeDetailsClient.java. import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; import com.myhibernate.hp.util.HibernateUtil; public class EmployeeDetailsClient { public static void main(String[] args) { Session session = null; try{ // This step will read hibernate.cfg.xml and prepare hibernate for use session = HibernateUtil.getSessionFactory().openSession(); //Transaction transaction = null; //SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory(); //session =sessionFactory.openSession(); //Create new instance of EmployeeDetails and set values in it by reading them from form object System.out.println("Inserting Record"); EmployeeDetails employeeDetails=new EmployeeDetails(); employeeDetails.setEmpName("xxxxxx"); employeeDetails.setEmpDept("vvvvvvv"); session.save(employeeDetails); System.out.println("Done"); }catch(Exception e){ System.out.println(e.getMessage()); }finally{ // Actual contact insertion will happen at this step session.flush(); session.close(); } } } hibernate.cfg.xml ...