Home Answers Viewqa Hibernate Problem with open connection

 
 


subbu
Problem with open connection
0 Answer(s)      2 years and 9 months ago
Posted in : Hibernate

Hi Team,

I am running one hibernate application and the database is ORACLE 10g.I am getting the below error.I connected to the database by using JDBC(with same driver and url).Please tell me where my mistake is ?

org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
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:301)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:110)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:137)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:49)
at org.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:24)
at org.hibernate.jdbc.JDBCContext.beginTransaction(JDBCContext.java:271)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1079)
at Store.main(Store.java:27)
Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:210)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:251)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:298)
... 7 more


and my Hibernate.hbm.xml file is:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin://localhost:1522/xe></property>
<property name="hibernate.connection.username">hr</property>
<property name="hibernate.connection.password">subbu</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
<!-- Mapping files -->
<mapping resource="xxx.hbm.xml"/>
</session-factory>
</hibernate-configuration>
View Answers









Related Pages:
Problem with open connection - Hibernate
Problem with open connection  Hi Team, I am running one... open connection... Adapter could not establish the connection
problem in jdbc connection
problem in jdbc connection  when i am trying to insert into apache derby databse using java in netbeans an exceprion is thrown at run time like this:- java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver....what
open a connection to a database with exclusive mode with JDBC
open a connection to a database with exclusive mode with JDBC  Is possible to open a connection to a database with exclusive mode with JDBC
open a connection to a database with exclusive mode with JDBC
open a connection to a database with exclusive mode with JDBC  Is possible to open a connection to a database with exclusive mode with JDBC
how to solve an internet connection problem
how to solve an internet connection problem  when i run my application it give me this error: Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: Not yet implemented the problem is that i don`t know
Correctly Open and Close database connection
; } Completely Open and Close A Database Connection Database Connection... depends on database connectivity. Therefore it is very important to open and close database connections properly. If any database connection is open
java oracle connection problem - SQL
java oracle connection problem  I have successfully made connection with the oracle10g database that i am using and also able to put in data using JSP. But the codes that i have tried for fetching the data are not working even
Connection pooling
connection with every request. Connection pool manager maintains a pool of open...Connection pooling  hii, What is Connection pooling?   hello, Connection pooling is a technique used for sharing server resources among
Open Jgraph Problem - Java Beginners
Open Jgraph Problem  Hi, I have go through the example given in http://sourceforge.net/projects/openjgraph/ for Open Jgraph by Jesus M. Salvo Jr. I have amended one of the sample (SampleTreeLayout.java) codes as below
Problem
) { System.err.println("Couldn't get I/O for " + "the connection to: sunil-PC."+ e... with no errors, but when running giving "java.net.connectexception connection
connection - JNDI
connection   Hi, i am getting this error,can any one know pls give... a connection, pool exhausted  Hi friend, Plz give full details with source code to solve the problem : Thanks
Problem
for " + "the connection to: sunil-PC."+ e); System.exit(1... "java.net.connectexception connection refused: connect"   Check
JDBC connection
JDBC connection  ![alt text][1]I got exception in Connecting to a MySQL Database in Java. The exception is ClassNotFoundException:com.mysql.jdbc.Driver wat is the problem
Connection to Database
database tables? Do I need to open one connection to each section? Thank you...Connection to Database  Hello, I have a website with more than 50.... However, most of times my web pages displays the error message" Too many Connection
java multiple users with single connection - JSP-Servlet
java multiple users with single connection  hi, my problem... the type A user , a new login page will be open. it asks for name and email.... a new page should open which consists of user A1's profile. now on the same
Java jdbc connection
Java jdbc connection  Does the JDBC-ODBC Bridge support multiple concurrent open statements per connection
problem with applet plugin - Applet
) Caused by: java.io.IOException: open HTTP connection failed:http://localhost...problem with applet plugin  hello friends, iam using Eclipse IDE...-->com.ezsoft.applets.Upload.java please friends how can i resolve that problem
code problem - Struts
(); System.out.println(dao); Connection conn= dbu.getDBConnection...(); DAOImpl dao=new DAOImpl(); Connection conn= dbu.getDBConnection(); //Code to open existing sheet i.e if login time != NULL
Open Source E-mail
Open Source E-mail Server MailWasher Server Open Source MailWasher Server is an open-source, server-side junk mail filter package for businesses. MailWasher Server differs from other open-source server anti-spam
connection to the printer - Development process
connection to the printer  hi deepak this is sampath reddy, am facing the problem with connecting the peinter through java.How can i connect to printer and how to get the printout the document.can you give me the suggestion
connection pooling - JDBC
commands on a database. It open and maintain a database connection for each user...connection pooling  how to manage connection pooling?   Hi friend, A connection pool is a cache of database connections maintained
Hibernate- Oracle connection - Hibernate
; Open perspective--> other in that Database Development Right click... and password as scott and tiger. clicked Test connection. I'm getting Ping... could not establish the connection
connection with database - JSP-Servlet
connection with database  I tried the DSN and connection... { Connection con=null; Class.forName... and the connection with the database using jsp code, I get exceptions that I have
Connection
Connection  What is Connection
struts2-db connection error - Struts
struts2-db connection error  i m unable to connect to the database in one of my application using struts2???These concepts are pretty new to me..so i wanted to know where the problem would hav occured?  Hi Friend
Open Source MP3 Player
Open Source MP3 Player Neuros to open source MP3 player blueprints... to the open source community and has pledged to open up the device's hardware... for some time. NA's willingness to work with the open source world
Connection pooling - Java Beginners
Connection pooling  Respected Sir/Madam, I am Ragavendran.R.. I need some clarification on what connection pooling is? Moreover can u provide me an example of how to implement connection pooling concept
connection
connection   how to make multiple database connection using jdbc
Open Source E-mail Server
Open Source E-mail Server MailWasher Server Open Source MailWasher Server is an open-source, server-side junk mail filter package for businesses. MailWasher Server differs from other open-source server anti-spam
JDBC Connection and Registration
JDBC Connection and Registration   How to create a JDBC connection... void main(String[] args) throws Exception { Connection conn... in MS Access Database manually. Follow these steps: 1)Open your MS Access Database
arraylist problem - JSP-Servlet
my code once again only in which i m facing the problem. /* * To change this template, choose Tools | Templates * and open the template in the editor... */ /* * To change this template, choose Tools | Templates * and open the template
combo box code problem
combo box code problem  in this my problem related to : when i select state MP then i wil open the its corresponding city but in database it only...;% Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection con
arraylist problem - JSP-Servlet
* and open the template in the editor. */ package servletclasses; import... | Templates * and open the template in the editor. */ protected void doPost..."); System.out.println("hi12222222222222222222222"); Connection
connection
the connection with the available port on the host machine: import java.net.... the connection was not established. Predict the output of the preceding code. Explain why the connection cannot be established
Open Source FTP
Open Source FTP Open source FTP clients The always-excellent Blogzilla, a blog about Mozilla, mentions a free, open FTP client that hooks... it. In the meantime, if you need a good, free, open source FTP client for Windows
connection of jsp with mysql - JSP-Servlet
connection of jsp with mysql  can anybody tell me about connection of JSP with MYSQL? and also tell me which version is compatible with tomcat 4.1 i am using tomcat 4.1, MYSQL 5.0 but i have problem with connection
Use of Connection Pooling - JSP-Servlet
Use of Connection Pooling  Dear Friends i want to use connection... Connection con=null; public static Connection getConnection() { try..."); Connection con=po.getConnection(); } catch(Exception e
connection pooling - Java Interview Questions
commands on a database. It open and maintain a database connection for each user...connection pooling  What is connection pooling?kindly help me in giving this answer. give me one example?  Hi friend, Connection
open source help desk
Open Source Help Desk Open Source Help Desk Software As my help desk... of the major open source help desk software offerings. I?m not doing... or two. What I?m really looking to do is build relationships with the best open
connection with mysql with jstl - JSP-Servlet
connection with mysql with jstl  hi, i m working on jstl . i hv done connection in MS -Access with JSTL . The code is working well. but when i am trying to connect database with mysql 5.0 it is creating problem. Plz tell me
compilation problem
compilation problem  struts 2.0 : i have included all 5 jars in lib folder,but its giving compilation problem that package open symphony doesnot... havenot set the build path.if this is the problem then tell me how to set
compilation problem
compilation problem  struts 2.0 : i have included all 5 jars in lib folder,but its giving compilation problem that package open symphony doesnot... havenot set the build path.if this is the problem then tell me how to set
Could not open JPA EntityManager for transaction
: org.hibernate.exception.JDBCConnectionException: Cannot open connection Tell me how to resolve it? Thanks  ...Could not open JPA EntityManager for transaction  Hi, I am getting following error: Could not open JPA EntityManager for transaction; nested
problem in coding
problem in coding  i have a following code which display the contents of the text file but not other program like java or any c program is there any handler to open the program files other than Filereader. FileReader fr = new
Open Source Accounting
Open Source Accounting Turbocase open source Accounting software TurboCASH .7 is an open source accounting package that is free for everyone... of the world's first fully-featured open source accounts packages for small

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.