2
votes

My code is given below. Its a program that adds leaves to the database.I am getting the Fatal Error has been detected by java runtime environment and I am not understanding why. I am new to Java, so I am very confused about this. Can anybody tell me why is this happening? I am putting up the error file as well. I tried understanding that too but couldn't find where is the error located.

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.lang.String;
import java.io.*;
import java.sql.*;

public class AddLeave extends JFrame implements ActionListener
{

JFrame frame;
JPanel panel,panel1;
JLabel empid,name1,name2,department,designation;
JTextField txtempid,txtname1,txtname2,txtdepartment,txtdesignation;
JButton find,ok,cancel;
String txtname1_1 = "";
String  txtname2_1 = "";
String  txtdepartment_1 = "";
String  txtdesignation_1 = "";
String  txtempid1="";   
Connection conn;

public AddLeave()
{
    frame=new JFrame("ADD LEAVE");
    frame.setLayout(new BorderLayout());
    panel=new JPanel();
    panel.setLayout(new GridLayout(5,2,5,5));
    panel.setBackground(Color.RED);

    panel1=new JPanel();
    //panel1.setLayout(new GridLayout(1,3,10,10));
    panel1.setBackground(Color.GREEN);

    empid=new JLabel("Employee Id:");
    name1=new JLabel("First Name:");
    name2=new JLabel("Last Name:");
    department=new JLabel("Department:");
    designation=new JLabel("Designation:");

    txtempid = new JTextField();
    txtname1 = new JTextField();
    txtname1.setEditable(false);
    txtname2 = new JTextField();
    txtname2.setEditable(false);
    txtdepartment = new JTextField();
    txtdesignation = new JTextField();
    txtdesignation.setEditable(false);

    find=new JButton("FIND");
    find.addActionListener(this);
    ok=new JButton("OK");
    ok.addActionListener(this);
    cancel=new JButton("CANCEL");
    cancel.addActionListener(this);


    panel.add(empid);
    panel.add(txtempid);
    panel.add(name1);
    panel.add(txtname1);
    panel.add(name2);
    panel.add(txtname2);
    panel.add(department);
    panel.add(txtdepartment);
    panel.add(designation);
    panel.add(txtdesignation);

    panel1.add(find);
    panel1.add(ok);
    panel1.add(cancel);

    frame.add(panel,BorderLayout.CENTER);
    frame.add(panel1,BorderLayout.SOUTH);
    frame.setVisible(true);
    frame.pack();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    connect();
}

public void connect()
{
    try
    {
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
             conn=DriverManager.getConnection("jdbc:odbc:demo","system","scott");

    }
    catch(Exception e)
    {
    System.out.println("Error : "+e);
    }
}

public void actionPerformed(ActionEvent event)
{
    Object source= event.getSource();
    if(source.equals(find))
    {
        find();
    }

    if(source.equals(ok))
    {
        System.out.println("Leave added");
    }
    if(source.equals(cancel))
    {
        System.out.println("Canceled");
    }
}

public void find()
{

    txtempid1=txtempid.getText();
    try
    {

        if(txtempid1.isEmpty())
        {
            JOptionPane.showMessageDialog(null,"ID REQUIRED!!!","warning",JOptionPane.WARNING_MESSAGE);

        }
        else
        {
            Statement stmt = conn.createStatement();
            String query = "SELECT * FROM demo WHERE empid='"+txtempid1+"'";
            ResultSet rs = stmt.executeQuery(query);
            int foundrec = 0;
            while (rs.next())
            {
                        txtname1_1 = rs.getString(2);
                txtname2_1 = rs.getString(3);
                txtdesignation_1 = rs.getString(4); 
                foundrec =foundrec+ 1;
            }
            if(foundrec==1)
            {
                JOptionPane.showMessageDialog(null,"**Record Found**"," Message",JOptionPane.PLAIN_MESSAGE);
                txtname1.setText(txtname1_1);
                txtname2.setText(txtname2_1); 
                txtdesignation.setText(txtdesignation_1); 

            }
            else
            {
            JOptionPane.showMessageDialog(null,"!!!!EMPLOYEE DOES NOT EXIST!!!!"," ERROR",JOptionPane.ERROR_MESSAGE);
            }
        }
        conn.close();   
    }
    catch(Exception e)
    {
        System.out.println("Error : "+e);
    }

}

public static void main(String[] args)
{
    new AddLeave();
}
}

this is the error file

    #
    # A fatal error has been detected by the Java Runtime Environment:
    #
    #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c901010, pid=3052, tid=3732
    #
    # JRE version: 6.0_31-b05
    # Java VM: Java HotSpot(TM) Client VM (20.6-b01 mixed mode, sharing windows-x86 )
    # Problematic frame:
    # C  [ntdll.dll+0x1010]
    #
    # If you would like to submit a bug report, please visit:
    #   http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    #

    ---------------  T H R E A D  ---------------

    Current thread (0x03054400):  JavaThread "AWT-EventQueue-0" [_thread_in_native,     id=3732, stack(0x03250000,0x032a0000)]

    siginfo: ExceptionCode=0xc0000005, reading address 0x00000018

    Registers:
    EAX=0x00000004, EBX=0x329ab298, ECX=0x7ffad000, EDX=0x00000004
    ESP=0x0329ea48, EBP=0x0329ea60, ESI=0x00000000, EDI=0x03401590
    EIP=0x7c901010, EFLAGS=0x00010246

    Top of Stack: (sp=0x0329ea48)
    0x0329ea48:   74355a16 00000004 034015b4 7432139f
    0x0329ea58:   034015b4 03401590 0329ea70 74322c5d
    0x0329ea68:   034015b4 03054528 0329ea84 74325fa0
    0x0329ea78:   03401590 74350000 0329f1ac 0329eaa0
    0x0329ea88:   7432740e 03401590 0329eac0 00000003
    0x0329ea98:   0312cd28 03054528 0329eab8 6d36124e
    0x0329eaa8:   03401590 0329eac0 03054400 329ab298
    0x0329eab8:   0329eb04 00919fc7 00000000 0329eb20 

    Instructions: (pc=0x7c901010)
    0x7c900ff0:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x7c901000:   90 90 90 90 90 64 8b 0d 18 00 00 00 8b 54 24 04
    0x7c901010:   83 7a 14 00 75 4f f0 ff 42 04 75 19 8b 41 24 89
    0x7c901020:   42 0c c7 42 08 01 00 00 00 33 c0 c2 04 00 8d a4 


    Register to memory mapping:

    EAX=0x00000004 is an unknown value
    EBX=0x329ab298 is an oop
    {method} 
     - klass: {other class}
    ECX=0x7ffad000 is an unknown value
    EDX=0x00000004 is an unknown value
    ESP=0x0329ea48 is pointing into the stack for thread: 0x03054400
    EBP=0x0329ea60 is pointing into the stack for thread: 0x03054400
    ESI=0x00000000 is an unknown value
    EDI=0x03401590 is an unknown value


    Stack: [0x03250000,0x032a0000],  sp=0x0329ea48,  free space=314k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C  [ntdll.dll+0x1010]  RtlEnterCriticalSection+0xb
    C  [ODBC32.dll+0x2c5d]  MpHeapAlloc+0x452
    C  [ODBC32.dll+0x5fa0]  SQLSetStmtAttrW+0xfeb
    C  [ODBC32.dll+0x740e]  SQLAllocStmt+0x21
    C  [JdbcOdbc.dll+0x124e]  Java_sun_jdbc_odbc_JdbcOdbc_allocStmt+0x28
    j  sun.jdbc.odbc.JdbcOdbc.allocStmt(J[B)J+0
    j  sun.jdbc.odbc.JdbcOdbc.SQLAllocStmt(J)J+47
    j  sun.jdbc.odbc.JdbcOdbcConnection.createStatement(II)Ljava/sql/Statement;+27
    j  sun.jdbc.odbc.JdbcOdbcConnection.createStatement()Ljava/sql/Statement;+7
    j  AddLeave.find()V+37
    j  AddLeave.actionPerformed(Ljava/awt/event/ActionEvent;)V+17
    j  javax.swing.AbstractButton.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+84
    j  javax.swing.AbstractButton$Handler.actionPerformed(Ljava/awt/event/ActionEvent;)V+5
    j  javax.swing.DefaultButtonModel.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+35
    j  javax.swing.DefaultButtonModel.setPressed(Z)V+117
    j     javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Ljava/awt/event/MouseEvent;)V+35
    j  java.awt.Component.processMouseEvent(Ljava/awt/event/MouseEvent;)V+64
    j  javax.swing.JComponent.processMouseEvent(Ljava/awt/event/MouseEvent;)V+23
    j  java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V+81
    j  java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V+18
    j  java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V+570
    j  java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+42
    j  java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
    j   java.awt.LightweightDispatcher.retargetMouseEvent(Ljava/awt/Component;ILjava/awt/event/Mous eEvent;)V+320
    j  java.awt.LightweightDispatcher.processMouseEvent(Ljava/awt/event/MouseEvent;)Z+139
    j  java.awt.LightweightDispatcher.dispatchEvent(Ljava/awt/AWTEvent;)Z+50
    j  java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+12
    j  java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V+65
    j  java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
    j  java.awt.EventQueue.dispatchEventImpl(Ljava/awt/AWTEvent;Ljava/lang/Object;)V+41
    j  java.awt.EventQueue.access$000(Ljava/awt/EventQueue;Ljava/awt/AWTEvent;Ljava/lang/Object;)V+3
    j  java.awt.EventQueue$1.run()Ljava/lang/Void;+12
    j  java.awt.EventQueue$1.run()Ljava/lang/Object;+1
    v  ~StubRoutines::call_stub
    V  [jvm.dll+0xfac3b]
    V  [jvm.dll+0x18c3a1]
    V  [jvm.dll+0xfacbd]
    V  [jvm.dll+0xbb654]
    C  [java.dll+0x102f]     Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2+0x17
    j   java.security.AccessControlContext$1.doIntersectionPrivilege(Ljava/security/PrivilegedActio n;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;)Ljava/lang/Objec t;+28
    j   java.security.AccessControlContext$1.doIntersectionPrivilege(Ljava/security/PrivilegedActio n;Ljava/security/AccessControlContext;)Ljava/lang/Object;+6
    j  java.awt.EventQueue$2.run()Ljava/lang/Void;+11
    j  java.awt.EventQueue$2.run()Ljava/lang/Object;+1
    v  ~StubRoutines::call_stub
    V  [jvm.dll+0xfac3b]
    V  [jvm.dll+0x18c3a1]
    V  [jvm.dll+0xfacbd]
    V  [jvm.dll+0xbb654]
    C  [java.dll+0x102f]              Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_se curity_AccessControlContext_2+0x17
    j    java.security.AccessControlContext$1.doIntersectionPrivilege(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;)Ljava/lang/Object;+28
    j  java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+73
    j  java.awt.EventDispatchThread.pumpOneEventForFilters(I)Z+204
    j  java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V+30
    j   java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11
    j  java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
    j  java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
    j  java.awt.EventDispatchThread.run()V+9
    v  ~StubRoutines::call_stub
    V  [jvm.dll+0xfac3b]
    V  [jvm.dll+0x18c3a1]
    V  [jvm.dll+0xfade1]
    V  [jvm.dll+0xfae3b]
    V  [jvm.dll+0xb5569]
    V  [jvm.dll+0x118f14]
    V  [jvm.dll+0x140ffc]
    C  [msvcr71.dll+0x9565]  endthreadex+0xa0
    C  [kernel32.dll+0xb50b]  GetModuleFileNameA+0x1b4

    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j  sun.jdbc.odbc.JdbcOdbc.allocStmt(J[B)J+0
    j  sun.jdbc.odbc.JdbcOdbc.SQLAllocStmt(J)J+47
    j  sun.jdbc.odbc.JdbcOdbcConnection.createStatement(II)Ljava/sql/Statement;+27
    j  sun.jdbc.odbc.JdbcOdbcConnection.createStatement()Ljava/sql/Statement;+7
    j  AddLeave.find()V+37
    j  AddLeave.actionPerformed(Ljava/awt/event/ActionEvent;)V+17
    j  javax.swing.AbstractButton.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+84
    j  javax.swing.AbstractButton$Handler.actionPerformed(Ljava/awt/event/ActionEvent;)V+5
    j  javax.swing.DefaultButtonModel.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+35
    j  javax.swing.DefaultButtonModel.setPressed(Z)V+117
    j   javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Ljava/awt/event/MouseEvent;)V+35
    j  java.awt.Component.processMouseEvent(Ljava/awt/event/MouseEvent;)V+64
    j  javax.swing.JComponent.processMouseEvent(Ljava/awt/event/MouseEvent;)V+23
    j  java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V+81
    j  java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V+18
    j  java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V+570
    j  java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+42
    j  java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
    j  java.awt.LightweightDispatcher.retargetMouseEvent(Ljava/awt/Component;ILjava/awt/event/MouseEvent;)V+320
    j  java.awt.LightweightDispatcher.processMouseEvent(Ljava/awt/event/MouseEvent;)Z+139
    j  java.awt.LightweightDispatcher.dispatchEvent(Ljava/awt/AWTEvent;)Z+50
    j  java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+12
    j  java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V+65
    j  java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
    j  java.awt.EventQueue.dispatchEventImpl(Ljava/awt/AWTEvent;Ljava/lang/Object;)V+41
    j  java.awt.EventQueue.access$000(Ljava/awt/EventQueue;Ljava/awt/AWTEvent;Ljava/lang/Object;)V+3
    j  java.awt.EventQueue$1.run()Ljava/lang/Void;+12
    j  java.awt.EventQueue$1.run()Ljava/lang/Object;+1
    v  ~StubRoutines::call_stub
    j    java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/ AccessControlContext;)Ljava/lang/Object;+0
    j  java.security.AccessControlContext$1.doIntersectionPrivilege(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;)Ljava/lang/Object;+28
    j  java.security.AccessControlContext$1.doIntersectionPrivilege(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;+6
    j  java.awt.EventQueue$2.run()Ljava/lang/Void;+11
    j  java.awt.EventQueue$2.run()Ljava/lang/Object;+1
    v  ~StubRoutines::call_stub
    j  java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;+0
    j  java.security.AccessControlContext$1.doIntersectionPrivilege(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;)Ljava/lang/Object;+28
    j  java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+73
    j  java.awt.EventDispatchThread.pumpOneEventForFilters(I)Z+204
    j  java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V+30
    j  java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11
    j  java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
    j  java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
    j  java.awt.EventDispatchThread.run()V+9
    v  ~StubRoutines::call_stub

    ---------------  P R O C E S S  ---------------

    Java Threads: ( => current thread )
      0x0312dc00 JavaThread "TimerQueue" daemon [_thread_blocked, id=3508,   stack(0x03540000,0x03590000)]
      0x002a6400 JavaThread "DestroyJavaVM" [_thread_blocked, id=3588, stack(0x008c0000,0x00910000)]
     0x0308f400 JavaThread "D3D Screen Updater" daemon [_thread_blocked, id=3808, stack(0x03370000,0x033c0000)]
    =>0x03054400 JavaThread "AWT-EventQueue-0" [_thread_in_native, id=3732,  stack(0x03250000,0x032a0000)]
      0x02b8f800 JavaThread "AWT-Windows" daemon [_thread_in_native, id=380, stack(0x02f90000,0x02fe0000)]
      0x02b8e400 JavaThread "AWT-Shutdown" [_thread_blocked, id=3368, stack(0x02f40000,0x02f90000)]
      0x02b8cc00 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=972, stack(0x02ef0000,0x02f40000)]
      0x02b48800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=1524, stack(0x02dc0000,0x02e10000)]
      0x02b43400 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=3272, stack(0x02d70000,0x02dc0000)]
      0x02b41000 JavaThread "Attach Listener" daemon [_thread_blocked, id=1364, stack(0x02d20000,0x02d70000)]
      0x02b3f800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2804, stack(0x02cd0000,0x02d20000)]
      0x02b38400 JavaThread "Finalizer" daemon [_thread_blocked, id=3164, stack(0x02c80000,0x02cd0000)]
      0x02b36c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=1656, stack(0x02c30000,0x02c80000)]

     Other Threads:
      0x02afa000 VMThread [stack: 0x02be0000,0x02c30000] [id=1988]
      0x02b4b400 WatcherThread [stack: 0x02e10000,0x02e60000] [id=956]

     VM state:not at safepoint (normal execution)

     VM Mutex/Monitor currently owned by a thread: None

     Heap
    def new generation   total 4928K, used 2084K [0x22970000, 0x22ec0000, 0x27ec0000)
    eden space 4416K,  47% used [0x22970000, 0x22b791d8, 0x22dc0000)
    from space 512K,   0% used [0x22dc0000, 0x22dc0000, 0x22e40000)
     to   space 512K,   0% used [0x22e40000, 0x22e40000, 0x22ec0000)
    tenured generation   total 10944K, used 0K [0x27ec0000, 0x28970000, 0x32970000)
     the space 10944K,   0% used [0x27ec0000, 0x27ec0000, 0x27ec0200, 0x28970000)
     compacting perm gen  total 12288K, used 764K [0x32970000, 0x33570000, 0x36970000)
     the space 12288K,   6% used [0x32970000, 0x32a2f0f0, 0x32a2f200, 0x33570000)
     ro space 10240K,  51% used [0x36970000, 0x36e9e318, 0x36e9e400, 0x37370000)
     rw space 12288K,  55% used [0x37370000, 0x37a0a088, 0x37a0a200, 0x37f70000)

    Code Cache  [0x00910000, 0x009b0000, 0x02910000)
     total_blobs=316 nmethods=92 adapters=160 free_code_cache=32927040 largest_free_block=0

    Dynamic libraries:
    0x00400000 - 0x00425000     C:\WINDOWS\system32\java.exe
    0x7c900000 - 0x7c9b0000     C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c8f4000     C:\WINDOWS\system32\kernel32.dll
    0x77dd0000 - 0x77e6b000     C:\WINDOWS\system32\ADVAPI32.dll
    0x77e70000 - 0x77f01000     C:\WINDOWS\system32\RPCRT4.dll
    0x7c340000 - 0x7c396000     C:\Program Files\Java\jre6\bin\msvcr71.dll
    0x6d7f0000 - 0x6da9f000     C:\Program Files\Java\jre6\bin\client\jvm.dll
    0x77d40000 - 0x77dd0000     C:\WINDOWS\system32\USER32.dll
     0x77f10000 - 0x77f56000    C:\WINDOWS\system32\GDI32.dll
    0x76b40000 - 0x76b6d000     C:\WINDOWS\system32\WINMM.dll
    0x6d7a0000 - 0x6d7ac000     C:\Program Files\Java\jre6\bin\verify.dll
    0x6d320000 - 0x6d33f000     C:\Program Files\Java\jre6\bin\java.dll
    0x6d7e0000 - 0x6d7ef000     C:\Program Files\Java\jre6\bin\zip.dll
    0x6d000000 - 0x6d14c000     C:\Program Files\Java\jre6\bin\awt.dll
     0x73000000 - 0x73026000    C:\WINDOWS\system32\WINSPOOL.DRV
    0x77c10000 - 0x77c68000     C:\WINDOWS\system32\msvcrt.dll
    0x76390000 - 0x763ad000     C:\WINDOWS\system32\IMM32.dll
    0x774e0000 - 0x7761c000     C:\WINDOWS\system32\ole32.dll
    0x773d0000 - 0x774d2000     C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-  Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\COMCTL32.dll
    0x77f60000 - 0x77fd6000     C:\WINDOWS\system32\SHLWAPI.dll
    0x5ad70000 - 0x5ada8000     C:\WINDOWS\system32\uxtheme.dll
    0x6d230000 - 0x6d27f000     C:\Program Files\Java\jre6\bin\fontmanager.dll
    0x74720000 - 0x7476b000     C:\WINDOWS\system32\MSCTF.dll
    0x4fdd0000 - 0x4ff76000     C:\WINDOWS\system32\d3d9.dll
    0x03020000 - 0x03026000     C:\WINDOWS\system32\d3d8thk.dll
    0x77c00000 - 0x77c08000     C:\WINDOWS\system32\VERSION.dll
    0x7c9c0000 - 0x7d1d4000     C:\WINDOWS\system32\shell32.dll
    0x6d600000 - 0x6d613000     C:\Program Files\Java\jre6\bin\net.dll
    0x71ab0000 - 0x71ac7000     C:\WINDOWS\system32\WS2_32.dll
     0x71aa0000 - 0x71aa8000    C:\WINDOWS\system32\WS2HELP.dll
    0x6d620000 - 0x6d629000     C:\Program Files\Java\jre6\bin\nio.dll
    0x77120000 - 0x771ac000     C:\WINDOWS\system32\OLEAUT32.DLL
    0x6d360000 - 0x6d36d000     C:\Program Files\Java\jre6\bin\JdbcOdbc.dll
    0x74320000 - 0x7435d000     C:\WINDOWS\system32\ODBC32.dll
    0x763b0000 - 0x763f9000     C:\WINDOWS\system32\comdlg32.dll
    0x20000000 - 0x20017000     C:\WINDOWS\system32\odbcint.dll
    0x032e0000 - 0x032e5000     C:\WINDOWS\system32\msorc32r.dll
    0x10000000 - 0x10061000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\oci.dll
    0x76bf0000 - 0x76bfb000     C:\WINDOWS\system32\PSAPI.DLL
    0x61c20000 - 0x61e73000      C:\oraclexe\app\oracle\product\10.2.0\server\bin\ORACLIENT10.DLL
     0x60870000 - 0x60956000    C:\oraclexe\app\oracle\product\10.2.0\server\bin\oracore10.dll
     0x60a80000 - 0x60b46000    C:\oraclexe\app\oracle\product\10.2.0\server\bin\oranls10.dll
    0x63690000 - 0x636a8000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\oraunls10.dll
    0x60eb0000 - 0x60eb7000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\orauts.dll
    0x636b0000 - 0x636b6000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\oravsn10.dll
     0x60fa0000 - 0x61092000    C:\oraclexe\app\oracle\product\10.2.0\server\bin\oracommon10.dll
    0x60300000 - 0x60858000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\orageneric10.dll
    0x63430000 - 0x63457000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\orasnls10.dll
    0x035a0000 - 0x0372c000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\oraxml10.dll
    0x03730000 - 0x03741000     C:\WINDOWS\system32\MSVCIRT.dll
    0x60960000 - 0x60a6d000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\oran10.dll
    0x62740000 - 0x6277d000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\oranl10.dll
    0x62790000 - 0x627a7000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\oranldap10.dll
    0x627f0000 - 0x628f9000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\orannzsbb10.dll
    0x62530000 - 0x62583000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\oraldapclnt10.dll
    0x62670000 - 0x6268b000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\orancrypt10.dll
    0x71ad0000 - 0x71ad9000     C:\WINDOWS\system32\WSOCK32.dll
    0x62920000 - 0x6296c000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\oranro10.dll
    0x626b0000 - 0x626b7000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\oranhost10.dll
    0x62660000 - 0x62666000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\orancds10.dll
    0x629c0000 - 0x629c8000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\orantns10.dll
    0x60b50000 - 0x60ea9000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\orapls10.dll
    0x63420000 - 0x63429000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\oraslax10.dll
    0x63080000 - 0x63284000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\oraplp10.dll
    0x61ed0000 - 0x61f5b000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\orahasgen10.dll
    0x62ab0000 - 0x62b1a000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\oraocr10.dll
    0x62b20000 - 0x62b60000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\oraocrb10.dll
    0x5b860000 - 0x5b8b4000     C:\WINDOWS\system32\NETAPI32.dll
    0x62980000 - 0x62990000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\orantcp10.dll
    0x63520000 - 0x635ba000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\orasql10.dll
    0x5fe80000 - 0x5fe9b000     C:\WINDOWS\system32\odbccp32.dll
    0x77fe0000 - 0x77ff1000     C:\WINDOWS\system32\Secur32.dll
    0x62650000 - 0x62659000     C:\oraclexe\app\oracle\product\10.2.0\server\bin\oranbeq10.dll
    0x71f80000 - 0x71f84000     C:\WINDOWS\system32\security.dll
    0x77c70000 - 0x77c93000     C:\WINDOWS\system32\msv1_0.dll
     0x76d60000 - 0x76d79000    C:\WINDOWS\system32\iphlpapi.dll

    VM Arguments:
     java_command: AddLeave
     Launcher Type: SUN_STANDARD

     Environment Variables:
     CLASSPATH=.
   PATH=C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WIN    DOWS\System32\Wbem;C:\Program Files\Java\jdk1.6.0\bin;C:\Program Files\Common       Files\Nero\Lib\
    USERNAME=sunanda
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 13, GenuineIntel


    ---------------  S Y S T E M  ---------------

     OS: Windows XP Build 2600 Service Pack 2

     CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 15 stepping 13, cmov,  cx8, fxsr, mmx, sse, sse2, sse3, ssse3

    Memory: 4k page, physical 1045684k(346004k free), swap 2517544k(1203440k free)

    vm_info: Java HotSpot(TM) Client VM (20.6-b01) for windows-x86 JRE (1.6.0_31-b05),  built on Feb  3 2012 18:44:09 by "java_re" with MS VC++ 7.1 (VS2003)

    time: Sun Apr 08 15:46:59 2012
    elapsed time: 9 seconds

"Demo" is the name of the database which has 4 columns namely empid,Fname,Lname,designation. The working of the program is that when I enter the employee ID it retrieves the remaining data from the database. As I have not added the department Id column I am not getting that from the database.

2
This could help: stackoverflow.com/…assylias

2 Answers

1
votes

I usually see these errors when something went wrong in the JNI (Java Native Interface) code, i.e. here, perhaps the JDBC (Java DataBase Connectivity) driver ODBC32.dll. Are you sure you are using correct version of the JDBC driver for your platform? Especially check you are using 32-bit version on a 32-bit OS (Operating System) and not a 64-bit version (or vice-versa).

The crash happened outside the Java Virtual Machine in native code.

1
votes

You should be using the Oracle JDBC Driver appropriate for your Oracle database version; these are typically pure Java. The JDBC-ODBC Bridge Driver has significant limitations, including JNI dependency.