Uderc programming article aggregator sites

Dr.Watson problems solved.

Answers: Have 2 answers
WLS 5.1 with SP11 running on NT4 Using OCI817_8.
Oracle 7.3.4 running on NT4.
Dr.Watson exceptions in native code...
# An EXCEPTION_ACCESS_VIOLATION exception has been detected in native code outside
the VM.
# Program counter=0x60239689
When asking BEA and Oracle:
"Use the latest OCI available. It is backward compatible !"
What have been done to solve the problem:
Going through all SQL code (and doing some rewriting), configuring connection
pools (TestOnReserve / TestOnRelease, refresh, etc) and several other configurations...
At last, we tried to change to the OCI version matching the Oracla versions we
were connecting to (from OCI817_8 to OCI734_7).
Our conclusion:
If possible, use the OCI version that matches the Oracle version you are running
The best answer: Hi Abhijit
Couple of pointers which could resolve the issue:
1. Since you are using the JDBC-ODBC bridge what occurs internally is that your JDBC API through the Virtual Machine make calls into the ODBC API on your Windows system. So the Watson error that you are getting is probably an illegal access by one of the methods in the ODBC API - this is for the Diagnosis part.
2. The Solution part -
a. Should I change my JDBC-ODBC driver? Not necessarily because the problems could be with the ODBC interface implementation and changing the driver might not help.
b. Should I change my programming style? This is one thing which could really help. The problem with creating connections each time is that it takes a lot of resources to do it, So there is a performance degradation. What you could do inyour code is use a Java Bean to create the required Connection. You can also think of using a prepared statement appropriately encapsulate it since you are invoking a particular query repeatedly. In your JSP page you can retrive(create) this bean through the jsp:useBean tag with the session as the scope attribute. The <jsp:setProperty methods could also be used to set the DSN name and the driver.
Once this bean is successfully created you have an open connection.
Now for the part you have pasted - replace the create connections with getting a new Statement object which would hold your Query. At the end of the JSP just close the Statement object.
Once you are done updating the page you may transfer the control to a different JSP - Let that transfer trigger the connection close in the Java bean.
This should solve the Dr.Watson problem.
Good Luck!
Eshwar Rao
Developer Technical Support
Sun microsystems inc