Problem with open connection
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 Tutorials/Questions & Answers:
problem in jdbc connectionproblem 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
Advertisements
how to solve an internet connection problemhow 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 - SQLjava 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
Open Jgraph Problem - Java BeginnersOpen 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 to get connection from DAO class to JDBCProblem 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
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 connection connection how to make multiple database
connection using jdbc
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
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 Problem for " + "the
connection to: sunil-PC."+ e);
System.exit(1... "java.net.connectexception
connection refused: connect"
Check
connection - JNDIconnection 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
Connection pooling of
open database connections.ADS_TO_REPLACE_2
Hi,
Connection pool...
Connection pooling hii,
What is
Connection pooling?
hello,ADS_TO_REPLACE_1
Connection pooling is a technique used for sharing server
compilation problemcompilation 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 problemcompilation 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
problem in onlinetest...problem in onlinetest... hi,
my code getting the
problem is ,when user leave a question then the server puts error...
pls help me
uploading problem browser...it
shows like this...
problem loading page..
The
connection was reset...("sun.jdbc.odbc.JdbcOdbcDriver");
Connection
con...();
}
}
}
}
%>
my
problem...:
firstly
Problem in jsp.Problem in jsp. hello friends, I have a
problem in jsp.I want to insert data, which is given by user through a html page into a table.And the table...");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test
Problem in jsp.Problem in jsp. hello friends, I have a
problem in jsp.I want to insert data, which is given by user through a html page into a table.And the table...");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test
Problem in jsp.Problem in jsp. hello friends, I have a
problem in jsp.I want to insert data, which is given by user through a html page into a table.And the table...");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test
problem in jsp programming - JSP-Servlet in solving the
problem :
Connection with mysql database
Connection status
Item NameCompanyAddress
Thanks...
problem in jsp programming Write a JSP program which displays
problem in codingproblem 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
Servlet problem problem from last three month and now i hope rose india developers... connectivity code it works but
problem is with servlet page.
My servlet code... password="pass";
Connection con = java.sql.DriverManager.getConnection(url,username
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 connection of jsp with mysql - JSP-Servletconnection 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 Hibernate code problem - HibernateHibernate code problem Hi,
This is Birendra Pradhan.I want to create a DAO,who takes the
connection from Hibernate.I want to use multiple query... & Regards
Birendra Hi friend,
For solving the
problem visit
problem getting password - JavaMailproblem getting password hi i am trying to get password but igot following error
Error sending mail:javax.mail.MessagingException: Could... is:
java.net.ConnectException:
Connection timed out: connect
please help
jasper problem - XMLjasper problem URGENT
PROBLEM!!!!!!!!!!!!!
how can we use a hash table in jasper reports to generate reports without using database
connection directly
but access data from the hash table what we needed for creation
DataBase ConnectionDataBase Connection How to connect java and Oracle 10g? Tell me Jdbc
connection problem in database problem in database thanks for web site.
I want change this code to insert data into PostgreSql database using jsp,servlets.
but i getting...
connection.
try {
if (
connection != null) connection.close();
}
catch
solve this problem in table please tell me the solution for thid
problem
import java.io.*;
import...://localhost/zulfiqar?user=root&password=admin";
Connection conn...://localhost/test?user=root&password=root";
Connection conn;
ResultSet rs;
try
jdbc problem jdbc
problem hi my name is mohit...i am making a project in java... jTextField1;
// End of variables declaration
}
2)login
connection with the database... main(String[] args) {
try
{
Connection con = null;
Statement stmt
problem in validationproblem in validation sir/madam,
i m using struts-1.3.10. i m getting a
problem my properties file is not found....
while i hav configuired it in struts-config.xml file,
likeADS_TO_REPLACE_1
thanks n regards
himanshu
javascript problemjavascript problem hi guys
My
problem is that I am using radio button for yes or no but i want to do that if I press yes button then enter... enter
please help me this
problem connection to the printer - Development processconnection 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
JDBC connectionJDBC 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 problem on stringsproblem on strings in string1 "123456 ABC DEF...",IN string2 "raveen". iwant to add string2 after 123456 in the first string based on index number.i need logic for this
with out using StringBuffer concept.
Thanks in advanace
Problem with loginbean.jspProblem with loginbean.jsp http://www.roseindia.net/jsp/loginbean.shtml
-
I am getting an error in loginbean.jsp.There is some error regarding .What is hello in this?
Also in this example how
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 jsp problemjsp problem
problem::::::::
On JSP form ,when i insert data in text field........at that time action is perform and data is retriev from data base...{
Class.forName("com.mysql.jdbc.Driver");
Connection con
Problem with cookiesProblem with cookies Hello All,
i need jsp code for RememberMe module of login.
i am facing
problem with cookies. so please if any one could guide me please help and provide mme the exact code.
Please visit
problem with packageproblem with package Dear sir,
i have created one java file with package com.net; and i compiled the program.it showing the .class file in " net" folder.The
problem is i want to use that .class file in some other
Open or Open Source SoftwareOpen 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