Hi, I have got a major problem. Please help. I am using Oracle9i with Weblogic 8.1 SP4. I am using: oracle.jdbc.driver.OracleDriver drivers. URL starts with: jdbc racle:thin In database, I am having two fields with data type "Date" and "Number". Now, When I am fetching data from database, I am using getObject() method of ResultSet. As per my knowledge, This method should return the object of Date and Object of Integer in java types. After fetching object, In my java class, I am casting the values as follows:
BigDecimal bd=(BigDecimal)resultset.getObject("ProjectID"); //On above line I tried instanceof operator to check if it returns object of BigDecimal. It returns me true. Casting working fine here.
Timestamp ts=(Timestamp)resultset.getObject("ProjectStartDate"); //On above line I tried instanceof operator to check if it returns object of Timestamp. It returns me false. It is returning the object of class Object. Casting is not working here. It is giving me ClassCastException at runtime.
Can somebody suggest why it is happening.? The code was working fine with weblogic 8.1 SP2. Is there some problem of drivers OR something else? Please help as it is very urgent. Thanks in Advance.