mysql 1450 error caused by java.

Anyone know what would cause this error?  Or any suggestions to fix it?  I am doing some java coding and it seems to be causing this.

InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
051231 17:42:27  InnoDB: Operating system error number 1450 in a file operation.
InnoDB: Some operating system error numbers are described at
InnoDB: File name .\ibdata1
InnoDB: File operation call: 'Windows aio'.
InnoDB: Cannot continue operation.

This is the code that is crashing it.  I am calling it repeatedly, so maybe I am overwhelming the database?  I thought some companies did 2000 calls per second?  I am doing probably 5 calls per second maybe...  That is just at peak times.  Here is the code, does anyone see something I am doing wrong?

  protected String getStringFromDatabases(String I_SQL_ac, String I_valueToget)
     String returnme_ac="";
         System.setProperty("jdbc.drivers", "com.mysql.jdbc.Driver");

         // Register MySQL driver

         String cs = "jdbc:mysql://" + dbserver + "/" + dbname + "?user=" + user + "&password=" + password;

         // Open a connection to the database
         Connection conn = DriverManager.getConnection(cs);
         Statement stat = conn.createStatement();
         ResultSet rs;
            // Execute the query
            rs = stat.executeQuery(I_SQL_ac);
            // Display results
            while (
               returnme_ac = rs.getString(I_valueToget);
         catch (SQLException ex)
            ex.printStackTrace () ;
            int javaerror_i = ex.getErrorCode();

         // Close everyting
         if (rs!=null)
      catch (Exception ex)
         System.out.println("An exception has been intercepted");
      return returnme_ac;
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

if you wanted to get the  first value, below code is enough

  if (
               returnme_ac = rs.getString(I_valueToget);

if you want the last value build sql string in such a way that order of records fetching should be in descending and get the first record from resultset using my above code.

Oh, What I am saying. In both cases you should get only one record so build your query perfectly so that u can get only one record in your resultset. This helps you to reduce your database reads.

As per your code you are trying to fetch last record using while loop. So obviously it increases database reads. Try these changes and check if the problem still persists.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mayank SPrincipal TechnologistCommented:
You should also be closing the connection in a finally block.
keseaAuthor Commented:
Hmmm, I am still getting the same error with both suggestions.  Does anyone know how to debug mysql resources?
keseaAuthor Commented:
It was a bug in mysql version 5.0.17.  The new version fixed it.  Thanks though.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.