Here's the deal,
I created a class named ' Data' with the variables:
public class Data{ private Clob isRevision; private long storeId; private long id; Data(ResultSet rs) throws SQLException { this.setStoreId(rs.getLong("ID"); this.setId(rs.getLong("ID"); this.setIsRevision(rs.getClob("IS_REVISION"); } // getters and setters public Clob getIsRevision(){ return isRevision; } public void setIsRevision(Clob isRevision){ this.isRevision = isRevision; } }
I also have created a function callled getData() in my DAO class that retrieves the data from an oracle database and stores it to the Data.java class
I then use a controller class with a function that passes the data to a datastore object using JSON:
public JSONObject getData() throws IOException, NamingException, SQLException, JSONException { DataService service = DataService.getInstance(); // Get Collection of RmsIndex. Collection<DATA> data = service.getData(); JSONArray items = new JSONArray(); if (id != null) { JSONObject jo = null; for (Data p : data) { jo = new JSONObject(p, true); items.put(jo); } } JSONObject dataStore = new JSONObject(); dataStore.put("identifier", "storeId"); dataStore.put("label", "Id"); dataStore.put("items", items); return dataStore; }
This all works when I read variables that are not Clob type. This only fails when I use the Clob type.
The errors I receive are:
Java.lang.RuntimeExeption Java.lang.reflect.InvocationTargetException java.sql.SQLException: Unsupported Feature oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java.134)
I did not mention the service class but if you are familiar with MVC i am sure you know what this is.
Please Help?