0 Replies Latest reply: May 16, 2013 4:35 AM by martani RSS

    ClassCastException when running on Oracle Database JVM

    martani
      Hi,

      I have the following code:
      OracleDataSource ods = new OracleDataSource();
      ods.setURL(thinConnectionString);
      OracleConnection conn = (OracleConnection) ods.getConnection();
              
      ArrayDescriptor d = ArrayDescriptor.createDescriptor("MDSYS.RDF_MODELS", conn);
      When I run this code from outside Oracle's VM it works without a problem. However, when I load it the the Oracale Database VM with loadjava, I get the following exception:
      java.lang.ClassCastException
           at oracle.jdbc.driver.PhysicalConnection.putDescriptor(PhysicalConnection.java)
           at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:156)
           at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:123)
           at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:106)
           at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:73)
           at XercesTest.Test1(XercesTest.java:46)
           at XercesTest.Test(XercesTest.java:171)
      What is causing this problem and how to correct it?

      Edited by: 1003769 on 16 mai 2013 02:35