5 Replies Latest reply on Jul 7, 2010 2:51 PM by alwu-Oracle

    Issue with loading SDO_RDF_TRIPLE_S column via an oracle.sql.STRUCT

      Issue with loading SDO_RDF_TRIPLE_S column via an oracle.sql.STRUCT
      Posted: Jul 1, 2010 6:32 AM          
           Edit                    Reply
      I am trying to load table that has an SDO_RDF_TRIPLE_S column via an oracle.sql.STRUCT object. Below is the code I am using:

      OracleConnection connection = (OracleConnection)dataSource.getConnection();     
      Map<String,String> attributesMap = new HashMap<String,String>();
      attributesMap.put("model_name", new String("RDF_TESTCHILD_RDF_EXT"));
      attributesMap.put("subject",new String("Test Subject"));
      attributesMap.put("property", new String("Test Property"));
      attributesMap.put("object", new String("Test Object"));
      StructDescriptor structDescriptor = StructDescriptor.createDescriptor("SDO_RDF_TRIPLE_S", connection);     
      STRUCT myTriple = new STRUCT(structDescriptor, connection, attributesMap);

      When I execute the last line of code, I get the following error:

      java.sql.SQLException: Invalid argument(s) in call
      at oracle.sql.StructDescriptor.toOracleArray(StructDescriptor.java:768)
      at oracle.sql.STRUCT.<init>(STRUCT.java:205)

      I am using Oracle 11g Release 2, with the latest JDBC drivers for this version of the db.

      For the life of me, I can not figure out what is going on. Any help would be appreciated.