1. Basics - Troubleshooting Hibernate / JDBC Connection Pool Issue stackoverflow.comWhat is Hibernate's responsibility in regards to database connections it gets from an underlying connection pool. Does it test to see if a connection is closed before it uses it? and ... |
2. Multiple JDBC Connections via Hibernate coderanch.com |
3. Providing JDBC Connections to Hibernate coderanch.comHi all, I am planning to use hibernate in a new project. I have the following restriction from security unit: Every user must be authenticated against Oracle database and all the inserts/updates s/he makes must be tracked to that user in oracle. I understand that with such requirement, I will not be able to use Connection Polling since any connection created ... |
4. Hibernate JDBC connection-cannot open coderanch.comHi, I have written a application for publishing company.I have used mysql as database.while i getting the user from the database i got this error. I have surfed in the internet i couldnt resolve this . Exception is org.hibernate.exception.JDBCConnectionException: Cannot open connection at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561) at org.hibernate.loader.Loader.doQuery(Loader.java:661) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at ... |
5. Hibernate JDBC connections coderanch.com |
6. Hibernate and connection pooling coderanch.com |
7. When actual JDBC Connection established in Hibernate ? coderanch.com |
8. Please help me need urgent help on JPA connection java-forums.orgHi, In my current assignment I'm trying to connect a remote MS Access database using JPA. But I'm not able to connect to database in my desktop itself . Below is my code let me know if I'm doing something wrong. persistence.xml ========= |
9. Opening JDBC connection - No response after this forum.hibernate.orgNewbie Joined: Wed Feb 24, 2010 1:05 pm Posts: 5 Location: India Hi, I have a web application powered by struts 2-Spring-hibernate. It is working fine in all screens. After some time, when I press submit button to fetch the results, hibernate hangs while opening a connection. It hangs for hours. no error messages are written in the log. LOG: ------ ... |
10. Regarding Jdbc Connection while executing forum.hibernate.org |
11. The user must supply a JDBC connection forum.hibernate.orgI am using hibernate 2.0.3 in JBoss. It's not configured as an EJB service, it is just used in some classes. The configuration is read and used in the following fashion: conf.addInputStream(this.getClass().getResourceAsStream("hibernate.cfg.xml")); SessionFactory sf = cfg.buildSessionFactory(); Session sesna = this.newSession(); sesna.beginTransaction(); When I want to start a new transaction an exception apears: java.lang.UnsupportedOperationException: The user must supply a JDBC connection at ... |
12. connection pooling and user provided JDBC connection forum.hibernate.orgHi, I am using user provided JDBC connections that I get from our own pool. My question is wether is spite of that should I set any connection pooling in the properties (like c3p0 for instance). Would it do any good? I mean for prepared statement caching or stuff like that. Sorry if it is a naive question but I am ... |
13. what's the difference of jdbc and hibernate connection ? forum.hibernate.orgwhe i use the connection which get from jdbc to call a procedure,it works well.but when i use the connection which get from Hibernate.getSession().connection(),it does't work.my code as follow: CallableStatement cs; try { cs = connection.prepareCall("{call sp_zyjs_match(?,?,?,?)}"); cs.registerOutParameter(4, Types.VARCHAR); cs.setInt(1,1); cs.setString(2, "1000000000"); cs.setString(3,"admin"); cs.execute(); String outParam=cs.getString(4); System.out.println("message = " + outParam); ...... the error is: java.lang.NullPointerException at oracle.jdbc.dbaccess.DBDataSetImpl._createOrGetDBItem(DBDataSetImpl.java:535) at oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(DBDataSetImpl.java:1642) at ... |
14. Using the same connection pool as Hibernate, from JDBC forum.hibernate.orgHello, Due to some minor limitations of Hibernate (can't use function in the select part of the query), I had to resort to using JDBC to execute one particular query. To do that I still use Hibernate's Session to get a hold of java.sql.Connection (session.getConnection() method) first. This is kind of ugly, as it creates a dependency of JDBC implementation on ... |
15. How do I get JDBC connections from Hibernate? forum.hibernate.orgI route all my dataaccess through hibernate- that is, if I need to do something in jdbc, I retrieve the connection via session.connection(). Using the hibernate config (xml) files to move from local jdbc connection in test/unit testing, and changing to a jndi source is very simple. No problems so far, although keep in mind that you autocommit may not default ... |
16. the user must supply JDBC connections forum.hibernate.orgI am receiving this error message in log file when I try to initialize a user-supplied connection. Our application uses JBOSS 3.2.3 as our app server, and is configured to use the JBOSS supplied data source to MYSQL. This works perfectly, I have a hibernate.cfg.xml file, and hibernate connects to the data source, and updates the schema if necessary. This connection ... |
17. The user must supply a JDBC connection forum.hibernate.orgI m using hibernate with JBoss I ve done everything that described in "Using Hibernate with JBoss" but my application throws exception: java.lang.UnsupportedOperationException: The user must supply a JDBC connection at net.sf.hibernate.connection.UserSuppliedConnectionProvider.getConnection(UserSuppliedConnectionProvider.java:32) at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278) at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3264) at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3244) at net.sf.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:40) at net.sf.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:19) at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2195) at kz.junit.nat.gbl.com.hibernate.rep.GroupTest.testGroup(GroupTest.java:54) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.junit2.JUnitStarter.main(Unknown Source) What i do wrong Help ... |
18. The user must supply a JDBC connection forum.hibernate.orgI m using hibernate with JBoss I ve done everything that described in "Using Hibernate with JBoss" but my application throws exception: java.lang.UnsupportedOperationException: The user must supply a JDBC connection at net.sf.hibernate.connection.UserSuppliedConnectionProvider.getConnection(UserSuppliedConnectionProvider.java:32) at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278) at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3264) at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3244) at net.sf.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:40) at net.sf.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:19) at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2195) at kz.junit.nat.gbl.com.hibernate.rep.GroupTest.testGroup(GroupTest.java:54) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.junit2.JUnitStarter.main(Unknown Source) What i do wrong Help ... |
19. JOTM and JDBC Connections forum.hibernate.orgHi, I have configured JOTM 1.5.3 for use with Hibernate 2.1.3 and Tomcat 5.0.24. I also use EHCache as a second level cache (Why I need JOTM). I'm a bit confused if I'm using it the way it was intended. I'm doing the following: Tomcat 5 configuration I have created a conf/Catalina/localhost/monster.xml file. This is the way to do "application level ... |
20. C3P0Connection JDBC Connection Object forum.hibernate.orgHi, I am using Hibernate v22branch and I was trying to access the JDBC connection object of a session. When I load hibernate I get this message: INFO DriverManagerConnectionProvider:42 - Using Hibernate built-in connection pool (not for production use!) I understand what this means: I am using no external connection pool manager. This is not the problem. When I use this ... |
21. The user must supply a JDBC connection,what i am doing wrom forum.hibernate.orgHello forum, when I run my application I get the folllowing error. here is my hibernate.cfg.xml ************************************************************* |
22. How to supply a JDBC connection? forum.hibernate.org |
23. How to supply JDBC Connection forum.hibernate.orgHello!! I have this servlet: protected void doProcess( HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); SessionFactory sessionFactory; Configuration config; Session session; try{ InitialContext context = new InitialContext(); sessionFactory = (SessionFactory)context.lookup("java:/hibernate/HibernateFactory"); config = new Configuration(); config.addClass(Persona.class); sessionFactory = config.buildSessionFactory(); session = sessionFactory.openSession(); Persona p = (Persona)session.get(Persona.class,new Integer("52717995")); if(p!=null){ out.println(p.toString()); } else{ out.println("Nula"); } } catch(Exception e){ ... |
24. Using a User Defined JDBC connection forum.hibernate.orgNewbie Joined: Wed Aug 18, 2004 2:07 pm Posts: 1 I am trying to use hibernate with a pre existing JDBC pool by creating a connection and passing it the url of the pool, then using the connection to create a session object, just like the example in the documentation. However, I get the exception below. I have traced through the ... |
25. The user must supply a JDBC connection forum.hibernate.orgNewbie Joined: Fri Sep 17, 2004 8:00 am Posts: 6 Hibernate version: 2.1 Mapping documents: Code between sessionFactory.openSession() and session.close(): Transaction tx = null; // An element Element elem = new Element(); elem.setAge( 30 ); elem.setDescription( "Some long winded description" ); elem.setName( "Element1Name" ); Element elem2 = new Element(); elem2.setAge( 15 ); elem2.setDescription( "Some more long winded description2" ); elem2.setName( "Element2Name" ... |
26. Bloody "The user must supply a JDBC connection" forum.hibernate.orgHi guys Please find beloew my hipernate.properties file + error message. I'm successfully configure hibernate with the hibernate.propertires file but I always get this error message. Regarding the manual it should work. Do I miss something here ? Any help is very much appreciated ? Cheers Rolf [b]hibernate.properties:[/b] hibernate.connection.driver_class com.microsoft.jdbc.sqlserver.SQLServerDriver hibernate.connection.url jdbc:microsoft:sqlserver://localhost;DatabaseName=edoc09 hibernate.connection.username edoc_appserver hibernate.connection.password password hibernate.c3p0.min_size=5 hibernate.c3p0.max_size=20 hibernate.c3p0.timeout=1800 hibernate.c3p0.max_statements=50 hibernate.dialect ... |
27. Unable to use BitMechanic JDBC connection pool forum.hibernate.orgI'm trying to use the BitMechanic JDBC pool when creating Hibernate Sessions., My code in the Factory reads: Code: public static Session currentSession() { net.sf.hibernate.Session s = (net.sf.hibernate.Session) SESSION.get(); // Open a new Session, if this Thread has none yet ... |
28. JDBC connection outside connection pool forum.hibernate.orgJust a general query in case someone has encountered similar pattern. My application is falling over under stress and it turns out, it is creating a large number of DB connections outside the configured connection pool. i.e. the connections in the pool remains within the default 5, but the number of active physical DB connections grows enormously large. I wasn't able ... |
29. Hibernate configuration of JDBC connection via MD5 or SSL forum.hibernate.orgI was wondering how to configure hibernate (using the hibernate.cfg.xml) to tell the JDBC driver to authenticate using a md5 password or using ssl for the communication with the database. My database (PostgreSQL) does support md5 password authentication and I enabled it in the configuration file. Since doing so I can't connect to the database anymore. Configuration File: Code: |
30. Using Hibernate only for JDBC Connection forum.hibernate.orgCan i use Hibernate just for making JDBC Connection and getting a session and not using Hibernate for Object Relational Mapping. I want to use SQL after connection is made to database for returning rows from the database by using ResultSet in JDBC because in our case View tables are used for querying.When the View is created there are so many ... |
31. Connection Pool conflict using JDBC and Hibernate forum.hibernate.org |
32. The user must supply a JDBC connection forum.hibernate.orgPls help me to get around this problem. I am new to Hibernate.I am using Hibernate 2.1. I am using mysql, i create a database "cdviewer". I created a datasource link using tomcat as below In the tomcat admin console i done the following things to create a datasource. In the left panel i click the "Resources ->Data Sources " link ... |
33. opening JDBC connection blocked forum.hibernate.orgwe found it too....though a different way we were using spring's dao support class to manage sessions (until i get off my lazy butt and put a filter on the app for transactional mgmt). I didn't read the spring javadoc completely, though. In some places I was using the HibernateTemplate class. In others (mostly simple cases), I was using getSession(). Stupidly, ... |
34. The user must supply a JDBC connection forum.hibernate.orgI am new to Hibernate.I am using Hibernate 2.1. I am using mysql, i create a database "cdviewer". I created a datasource link using tomcat as below In the tomcat admin console i done the following things to create a datasource. In the left panel i click the "Resources ->Data Sources " link and i fill the following values JNDI Name ... |
35. How to dectect jdbc connection leak? forum.hibernate.orghi, i'm using Hibernate 3.1 and i want to check if my web app has connection leak so i set log4j.logger.org.hibernate.transaction=debug, stdout log4j.logger.org.hibernate.jdbc=debug, stdout and hibernate output: 10:11:22,390 DEBUG ConnectionManager:398 - aggressively releasing JDBC connectio n 10:11:22,390 DEBUG ConnectionManager:398 - aggressively releasing JDBC connectio n ... 10:11:22,390 DEBUG ConnectionManager:369 - connection already null in cleanup : no action 10:11:22,390 DEBUG ConnectionManager:369 ... |
36. Setting the read only hint on JDBC connection forum.hibernate.org |
37. hibernate and weblogic JDBC connection pool forum.hibernate.orgNewbie Joined: Tue Aug 01, 2006 5:19 pm Posts: 3 We are using hibernate configured to use weblogic connection pool. Whenever database is restarted without restarting weblogic, we get the following exceptions in our application. java.lang.Throwable: org.hibernate.TransactionException: Transaction not successfully started at com.verisign.vps.common.dao.hibernateimpl._RootDAO.closeSession(_RootDAO.java:390) at com.verisign.vps.common.dao.hibernateimpl._RootDAO.closeSession(_RootDAO.java:355) at com.verisign.vps.common.dao.hibernateimpl._RootDAO.closeLiveSession(_RootDAO.java:335) at com.verisign.vps.common.dao.hibernateimpl._RootDAO.closeCurrentThreadSessions(_RootDAO.java:400) at com.verisign.vps.webapps.pandora.action.PandoraBaseAction.execute(PandoraBaseAction.java:91) If the application server is restarted or left for 24 ... |
38. HibernateThreadFilter and releasing JDBC connections forum.hibernate.orgIf using the HibernateThreadFilter and setting the Hibernate property hibernate.current_session_context_class to thread, I'm confused as to whether I need to manually unbind the the Session and close it. I see at http://hibernate.org/42.html it says the "current" Session is automatically closed when the transaction is committed, but at http://blog.hibernate.org/cgi-bin/blosx ... ioncontext it says I need to manually unbind and close the Session. ... |
39. User-Provided JDBC Connections forum.hibernate.orgI have a test database and a production database (most of us do). I want to be able to take data exactly as it exists from my production database and save it into my test database. The hibernate configuration files and the POJOs are the same regardless of datasource. I want to know if it is possible to populate the POJOs ... |
40. CurrentSession - open JDBC Connections in CMT forum.hibernate.org |
41. Use existing JDBC connection forum.hibernate.orgHi, I want to introduce Hibernate to an existing project that uses plain JDBC connections for DB access so far. I may not replace all existing JDBC code, but I could use Hibernate functionality for all new modules. The existing application uses real database accounts where a new JDBC connection is created for each user during login. It is a mandatory ... |
42. How to access jdbc connection object hibernate is currently forum.hibernate.orgHI I am a newbee to Hibernate. I want to access the current connection object that is created by Hibernate while creating the connection with the db but I don't want to use seeesion.connection as that method is deprecated.However I don't want to create a new connection but to access a current connection object that is used by hibernate to connect ... |
43. How to inject JDBC connection forum.hibernate.orgHi! I have very simple question which demands very long answer:) I'm using EntityManagerFactory and EntityManager. Configuration is done in runtime with this method: Code: public static void init(LoginInfo info, String PU) { props.put("hibernate.connection.url", "jdbc:oracle:thin:@" + info.getDbLoginInfo().getConnString()); LOG.debug(props); props.put("hibernate.connection.username", info.getDbLoginInfo().getUsername()); ... |
44. Pre-bound JDBC Connection found! HibernateTransactionManager forum.hibernate.org |
45. jdbc connection fails after some hours of inactivity forum.hibernate.orgHi to all. I've installed Tomcat 6 and mysql 5 with a little java application. After some hours of inactivity, when I try to load my application, I receive this error on internet explorer. My os is Win Xp, but I tryed on Vista and the result is the same. If I stop and start tomcat again, it works correctly again. ... |
46. Weblogic 10.3 - "The user must supply a JDBC connection" forum.hibernate.orgHi, I searched too much to solve this problem, but whatever I did I couldn't get rid of this exception. Quote: "javax.ejb.EJBException : EJB Exception: ; nested exception is: java.lang.UnsupportedOperationException: The user must supply a JDBC connection" I am using Oracle Weblogic 10.3 as application server and trying to use a MySQL data source. My configuration is as following: In my ... |