Hi,
Has anybody tried to convert a Oracle REF CURSOR to a ColdFusion QueryTable.
The code fails on the following line.
   //convert this into a coldfusion resultset.
   QueryTable cfquery = new QueryTable(rs);

here is the code snippet that does the call
-------------------------------------------

//get the connection
    Connection conn = DBUtil.getConnection();
//prepared statement
CallableStatement cstmt = conn.prepareCall(" CALL SVES_REFERENTIAL.SEL_CONTRACT_VENDORS(?,?)");

   cstmt.setInt(1,contractYear);//contract year
   cstmt.registerOutParameter(2,OracleTypes.CURSOR);//ref cursor

   //execute the call
   cstmt.execute();

   //get the resultset from the ref cursor return parameter
   ResultSet rs = ((OracleCallableStatement)cstmt).getCursor(2);


   //convert this into a coldfusion resultset.
   QueryTable cfquery = new QueryTable(rs);

This is the Exception that I get
---------------------------------
java.lang.ExceptionInInitializerError
at coldfusion.sql.QueryTable.populate(QueryTable.java:232)
at coldfusion.sql.QueryTable.populate(QueryTable.java:159)
at coldfusion.sql.QueryTable.<init>(QueryTable.java:47)
at gov.michigan.mdot.sves.dao.ReferenceTablesDAO.getContractVendors(ReferenceTablesDAO.java:57)
at gov.michigan.mdot.sves.dao.ReferenceTablesDAO.main(ReferenceTablesDAO.java:74)
Caused by: coldfusion.server.ServiceFactory$ServiceNotAvailableException: The Runtime service is not available.
at coldfusion.server.ServiceFactory.getRuntimeService(ServiceFactory.java:107)
at coldfusion.runtime.RequestMonitor.<clinit>(RequestMonitor.java:11)
... 5 more

thanks in advance for your time
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to