I can able to connect to database separately.while connecting using hiberate,iam getting " java.sql.SQLException: Io exception: The Network Adapter could not establish the connection" error.Please help.
Can you check you are using the correct version of jar files / JDK, also may be you can try connect to the DB using any other tool to make sure the DB is up and running fine. If you use Eclipse then you can use Data Source Explorer to test this.
Few notes available in oracle site about the dependency of the jar/java etc.. "•Oracle Database XE does not support JDK 1.2 and JDK 1.3, including all classes12*.* files. You need to use the ojdbc14.jar file with JDK 1.4.x instead."