Skip to Main Content

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

718949Jun 30 2010 — edited Jul 1 2010
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.

Thanks
Kevin
Comments
Post Details
Added on Jun 30 2010
2 comments
594 views