Hi all,
I am new to this forum, i am learning
j2ee and there is something going wrong with my codes.. I am posting the code here.
import java.sql.*;
public class TestConnection {
/**
* @param args
*/
public static void main(
String[] args)
{
// TODO Auto-generated method stub
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
try
{
con = ConMgmt.getConnection();
System.out.println("Connection eastablished successfully");
stmt = con.createStatement();
rs = stmt.executeQuery("select ename from emp");
while(rs.next())
{
String Name = rs.getString("ename");
System.out.println("Name: " + Name);
}
}
catch(Exception e)
{
System.out.println(e);
}
finally
{
try
{
if(rs != null)
{
rs.close();
System.out.println("ResultSet closed");
}
if(stmt != null)
{
stmt.close();
System.out.println("Statement closed");
}
if(con != null)
{
con.close();
System.out.println("Connection closed");
}
}
catch(Exception e)
{
System.out.println(e);
}
}
}
}
when I am running this code it is giving rsult as
0
Connection eastablished successfully
java.sql.SQLException: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], []
Statement closed
Connection closed
and not getting the proper output.I had debugged the program and the rsultset still remains null.It is not changing to the desired value.I am using eclipse as the
ide oracle 9i as the database source and jdk1.5.
Plzzzzz help ???