"Fail to convert to internal representation" Error

From: Benji (gamhead_at_hotmail.com)
Date: 12/18/03


Date: 18 Dec 2003 09:01:12 -0800

Hi guys,

I'm getting this error:

  java.sql.SQLException: Fail to convert to internal representation

When trying to prepare a statement in Java using the
OracleJDBC_classes12.jar

Code is:

    String query =
    "SELECT " + DB_VIEW_SPOTRANGES + "." + DB_FIELD_DOCUMENTID + ", "
              + DB_VIEW_SPOTRANGES + "." + DB_FIELD_BIPRODUCT + ", "
              + DB_VIEW_SPOTRANGES + "." + DB_FIELD_MINTRADE + ", "
              + DB_VIEW_SPOTRANGES + "." + DB_FIELD_MAXTRADE + ", "
              + DB_VIEW_SPOTRANGES + "." + DB_FIELD_CLOSESPOT + ", "
              + DB_VIEW_SPOTRANGES + "." + DB_FIELD_REPORTDATE + ", "
              + DB_VIEW_SPOTRANGES + "." + DB_FIELD_TIMEZONE + ", "
              + DB_VIEW_SPOTRANGES + "." + DB_FIELD_VERIFIED

        + " FROM " + DB_VIEW_SPOTRANGES
        + " WHERE " + DB_VIEW_SPOTRANGES + "." + DB_FIELD_DOCUMENTID
        + " = ? ORDER BY "
        + DB_VIEW_SPOTRANGES + "." + DB_FIELD_BIPRODUCT;

Which I can see from my logs becomes

SELECT SPOTRANGES.DocumentID, SPOTRANGES.Biproduct,
SPOTRANGES.MinTrade, SPOTRANGES.MaxTrade, SPOTRANGES.CloseSpot,
SPOTRANGES.ReportDate, SPOTRANGES.TimeZone, SPOTRANGES.Verified FROM
SPOTRANGES WHERE SPOTRANGES.DocumentID = ? ORDER BY
SPOTRANGES.Biproduct

....

          Prepared stmt = dbConn.prepareStatement(query);
          BigDecimal b = new BigDecimal(documentID);
          ResultSet rslt = stmt.executeQuery();

...where documentID is an "int"

I've looked about and I seem to be doing the right thing. This is how
I've approached the problem in the past.

Any ideas?



Relevant Pages

  • "Fail to convert to internal representation" Error
    ... Fail to convert to internal representation ... When trying to prepare a statement in Java using the ... ...where documentID is an "int" ...
    (comp.lang.java.programmer)
  • Re: swap method in Java
    ... >Which will only work for unsigned integer values and will still fail ... // XOR swap fail for swapping array elements if two indexes refer to ... See http://mindprod.com/jgloss/jgloss.html for The Java Glossary. ...
    (comp.lang.java.programmer)
  • Re: Exit code 255
    ... > not just a generic exit on fail. ... Is the Java virtual machine up and running when the error occurs? ... does the JVM fail to start or does it terminate after some time ... A Java program can return an arbitraty return code to the operating ...
    (comp.unix.aix)
  • Re: Java 1.6 Heisenbug involving startsWith
    ... > I can't get it to fail myself. ... I don't think this is due to some different Java setting on the two ... Is there some separate way of clearing a Java-specific cache? ...
    (comp.lang.java.programmer)
  • Re: converting char to an integer
    ... >>introductory books on Java. ... Programming, as many stars of our profession have ... fail and try again. ... lest he spends an inordinate amount of time wasting his time. ...
    (comp.lang.java.programmer)