| hi,
 got the error as
 
 15:34:00,106 ERROR JDBCExceptionReporter:58 - Io exception: The Network Adapter
 could not establish the connection
 Exception in thread "main" org.hibernate.exception.GenericJDBCException: Cannot
 open connection
 at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificExceptio
 n(ErrorCodeConverter.java:92)
 at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter
 .java:80)
 at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
 er.java:43)
 at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
 er.java:29)
 at org.hibernate.jdbc.AbstractBatcher.openConnection(AbstractBatcher.jav
 a:384)
 at org.hibernate.jdbc.JDBCContext.connect(JDBCContext.java:141)
 at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:88)
 at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:
 49)
 at org.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDB
 CTransactionFactory.java:19)
 at org.hibernate.jdbc.JDBCContext.beginTransaction(JDBCContext.java:204)
 
 at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1007
 )
 at employ.FirstExample.main(FirstExample.java:16)
 Caused by: java.sql.SQLException: Io exception: The Network Adapter could not es
 tablish the connection
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
 :124)
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
 :161)
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
 :273)
 at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:321)
 at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
 346)
 at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:149)
 at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
 n.java:31)
 at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:543)
 at java.sql.DriverManager.getConnection(DriverManager.java:517)
 at java.sql.DriverManager.getConnection(DriverManager.java:146)
 at org.hibernate.connection.DriverManagerConnectionProvider.getConnectio
 n(DriverManagerConnectionProvider.java:110)
 at org.hibernate.jdbc.AbstractBatcher.openConnection(AbstractBatcher.jav
 a:381)
 
 and i have already included classes12.jar and classes111.jar in my classpath.
 i am not able to resolve it.
 can anybody help on this.
 
 my configuration file hibernate.cfg.xml is as follows
 
 
 <hibernate-configuration>
 <session-factory>
 <!-- Database connection settings -->
 <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
 <property name="connection.url">jdbc:oracle:thin:@202.169.68.44:1521:EXL</property>
 <property name="connection.username">scott</property>
 <property name="connection.password">tiger</property>
 
 <!-- JDBC connection pool (use the built-in) -->
 <property name="connection.pool_size">1</property>
 
 <!-- SQL dialect -->
 <property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
 
 <!-- Enable Hibernate's automatic session context management -->
 <property name="current_session_context_class">thread</property>
 
 <!-- Echo all executed SQL to stdout -->
 <property name="show_sql">true</property>
 
 <mapping resource="employ/Emp.hbm.xml"/>
 </session-factory>
 </hibernate-configuration>
 
 please help on this
 
 Thnaks
 
 
 |