This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes An unexpected error of Java Runtime Environment: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "An unexpected error of Java Runtime Environment:" Watch "An unexpected error of Java Runtime Environment:" New topic
Author

An unexpected error of Java Runtime Environment:

faisal hameed
Ranch Hand

Joined: Jan 19, 2009
Posts: 48
I hava a two classes MainDataBase(parent) and SignUpDatabase.When i call methods of SignUpDatabase seperately,its working fine and when i call two methods same time it shows error.
My classes are :
Parent Class is


Child Class is


The exception is

Connection Created
Connection Closed
Connection Already Created
ok22
#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c90100b, pid=1000, tid=3912
#
# Java VM: Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing)
# Problematic frame:
# C [ntdll.dll+0x100b]
#
# An error report file with more information is saved as hs_err_pid1000.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Java Result: 1

Regards, M Faisal Hameed
PUCIT, Pakistan
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

This is a JVM crash. Usually I would recommend updating to a more recent JDK (a good idea anyway) and if the problem still occurs sending it to Sun (now Oracle, I guess). But given where it is aborting I suspect that your NIC driver might be bad. Try updating the driver to the latest level. If that does not solve the problem, try to code on another machine. If the problem happens there also, send the issue to Sun/Oracle.

Another possibility: what database are you using and what driver? Be very specific as to which driver. If could be the driver that is crashing.


JBoss In Action
faisal hameed
Ranch Hand

Joined: Jan 19, 2009
Posts: 48
I am using sql server 2000 and jdk version 1.6.If there is problem of jdbc driver then why single method works fine??
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30133
    
150

Faisal,
Different code gets executed when you do different things. The face that it worked for something doesn't mean it isn't the driver.

I don't think this is your problem, but note that closing the statement/connection should be in different try/catch blocks. If closing the Statement fails, you still want to close the Connection.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
faisal hameed
Ranch Hand

Joined: Jan 19, 2009
Posts: 48
I found its solution by putting con = null; just after con.close(); in method closeConnection();
But i dont know how works?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: An unexpected error of Java Runtime Environment:
 
Similar Threads
Sessions in JSF
java.net.ConnectException:
DataTap Connection pool usage?
Reconnecting to Database
How to use DBCP with JNDI ?