Problem with open connection



Share on Google+Share on Google+

Problem with open connection
0 Answer(s)      7 years 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(
at org.hibernate.exception.ErrorCodeConverter.convert(
at org.hibernate.exception.JDBCExceptionHelper.convert(
at org.hibernate.exception.JDBCExceptionHelper.convert(
at org.hibernate.jdbc.ConnectionManager.openConnection(
at org.hibernate.jdbc.ConnectionManager.getConnection(
at org.hibernate.jdbc.JDBCContext.connection(
at org.hibernate.transaction.JDBCTransaction.begin(
at org.hibernate.transaction.JDBCTransactionFactory.beginTransaction(
at org.hibernate.jdbc.JDBCContext.beginTransaction(
at org.hibernate.impl.SessionImpl.beginTransaction(
at Store.main(
Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.driver.OracleConnection.<init>(
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(
at oracle.jdbc.driver.OracleDriver.connect(
at java.sql.DriverManager.getConnection(
at java.sql.DriverManager.getConnection(
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(
at org.hibernate.jdbc.ConnectionManager.openConnection(
... 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"

<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"/>
View Answers

Related Tutorials/Questions & Answers:
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
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
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
Problem to get connection from DAO class to JDBC
Problem to get connection from DAO class to JDBC  package controller... ConnectionProvider { private static Connection con=null; //static Connection..."); }catch(Exception e){} } public static Connection getCon(){ return con
Open Jgraph Problem - Java Beginners
Open Jgraph Problem  Hi, I have go through the example given in for Open Jgraph by Jesus M. Salvo Jr. I have amended one of the sample ( codes as below
Connection  What is Connection
connection   how to make multiple database connection using jdbc
the connection with the available port on the host machine: import the connection was not established. Predict the output of the preceding code. Explain why the connection cannot be established
please help me solve this problem when i am create database connection using servlecontext
please help me solve this problem when i am create database connection using servlecontext  hi... I have create a database connection using... understand what is the problem .... the code are as follows. the servlet context
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
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
) { System.err.println("Couldn't get I/O for " + "the connection to: sunil-PC."+ e... with no errors, but when running giving " connection
for " + "the connection to: sunil-PC."+ e); System.exit(1... " connection refused: connect"   Check
Connection pooling
Connection pooling  What is Connection pooling
Java jdbc connection
Java jdbc connection  Does the JDBC-ODBC Bridge support multiple concurrent open statements per connection
connection closing
connection closing  hello, what happens if connection is not closed
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
DataBase Connection
DataBase Connection  How to connect java and Oracle 10g? Tell me Jdbc connection
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 pooling
Connection pooling  Sir, In my project i want to implement connection pooling with ms-sql server 2005. i wrote the code in JSP like this... <% Connection con=DbCon.getConnection(); Statement stmt
connection - SQL
connection  how can i establish connection between netbean_ide6.9 with mysql or oracle  Hi Friend, Please visit the following link: Hope that it will be helpful
Open or Open Source Software
Open or Open Source Software  what is mean by open or open source software in Computer Terminology?   In a computer terminology, open or open source software means any technology or a software that are freely available
ODBC connection
ODBC connection   import java.sql.*; import java.util.*; public...("password","tiger"); Connection con=d.connect(s,p); Statement st... the connection


Advertisement null