Home » Developer & Programmer » JDeveloper, Java & XML » Fail to construct descriptor: Unable to resolve type:
Fail to construct descriptor: Unable to resolve type: [message #91575] |
Thu, 21 November 2002 09:50 |
Valentin
Messages: 1 Registered: November 2002
|
Junior Member |
|
|
Could someone give me a hand ?
This is my code :
import="java.text.*,
java.util.Date ,
java.sql.*,
java.io.*,
java.util.*,
java.sql.*,
oracle.sql.*,
oracle.jdbc.driver.*,
javax.naming.*,javax.sql.*"
Connection objConn = null;
java.sql.Date dtDate = new java.sql.Date(2001,11,1);
try
{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
objConn = DriverManager.getConnection("jdbc:oracle:thin:@ch1ux086:1822:FINSTP","BESPOKE","BESPOKE");
}
catch (Exception e)
{
e.printStackTrace();
System.err.print(e.getClass().getName());
System.err.println(e.getMessage());
}
try
{
StructDescriptor sdDesc1 = StructDescriptor.createDescriptor("FLASHREC",objConn);
ArrayDescriptor sdDesc2 = ArrayDescriptor.createDescriptor("FLASHTAB",objConn);
//ARRAY arrReturned = new ARRAY(sdDesc2, objConn, elements);
OracleCallableStatement ocs = (OracleCallableStatement)objConn.prepareCall("{call ZSALESFLASH.FLASH_PROC(?,?,?,?,?,?,?,?,?,?,?,?,?}");
ocs.setDate(1,dtDate);
ocs.setString(2,"272");
ocs.registerOutParameter(3,OracleTypes.NUMBER);
ocs.registerOutParameter(4,OracleTypes.NUMBER);
ocs.registerOutParameter(5,OracleTypes.NUMBER);
ocs.registerOutParameter(6,OracleTypes.NUMBER);
ocs.registerOutParameter(7,OracleTypes.NUMBER);
ocs.registerOutParameter(8,OracleTypes.NUMBER);
ocs.registerOutParameter(9,OracleTypes.NUMBER);
ocs.registerOutParameter(10,OracleTypes.NUMBER);
ocs.registerOutParameter(11,OracleTypes.NUMBER);
ocs.registerOutParameter(12,OracleTypes.NUMBER);
ocs.registerOutParameter(13,OracleTypes.ARRAY,"FLASHTAB");
ocs.execute();
}
catch (SQLException s)
{
out.println ("ErrorCode: " + s.getErrorCode() + " || State:" + s.getSQLState() + " || Message:" + s.toString());
}
catch (Exception e)
{
out.println("Error:" + e.toString());
}
try
{
objConn.close();
}
catch (Exception e)
{
out.println("Connection close failed");
out.println(e.toString());
}
This is my package definition :
CREATE OR REPLACE PACKAGE ZSALESFLASH AS
-- RECORD OUTPUT DEFINITION FOR SALES FLASH.
TYPE FLASHREC IS RECORD
(
F_TOTAL VARCHAR2(10),
F_TA VARCHAR2(5),
F_CAT VARCHAR2(15),
F_MTD_ACTUAL NUMBER(6,2),
F_MTD_BSC NUMBER(6,2),
F_MTD_REMAIN NUMBER(6,2),
F_MTD_ACHIVE NUMBER(6,2),
F_DTD_ACTUAL NUMBER(6,2),
F_WTD_ACTUAL NUMBER(6,2),
F_MTD_AVG_DAY NUMBER(6,2),
F_MTD_AVG_BSC NUMBER(6,2),
F_MTD_LY NUMBER(6,2),
F_YTD_ACTUAL NUMBER(6,2),
F_YTD_BSC NUMBER(6,2),
F_YTD_REMAIN NUMBER(6,2),
F_YTD_ACHIVE NUMBER(6,2),
F_YTD_AVG_DAY NUMBER(6,2),
F_YTD_AVG_BSC NUMBER(6,2),
F_YTD_LY NUMBER(6,2)
);
TYPE FLASHTAB IS TABLE OF
FLASHREC INDEX BY BINARY_INTEGER;
PROCEDURE FLASH_PROC (
P_DATE_IN IN DATE,
P_ORG_ID IN VARCHAR2,
P_MTD_WORKING_DAYS OUT NUMBER,
P_MTD_DAYS_ELAPSED OUT NUMBER,
P_MTD_DAYS_REMAINING OUT NUMBER,
P_MD_ELAPSED_PER OUT NUMBER,
P_MD_REMAINING_PER OUT NUMBER,
P_YTD_WORKING_DAYS OUT NUMBER,
P_YTD_DAYS_ELAPSED OUT NUMBER,
P_YTD_DAYS_REMAINING OUT NUMBER,
P_YD_ELAPSED_PER OUT NUMBER,
P_YD_REMAINING_PER OUT NUMBER,
P_FLASH_CURSOR OUT FLASHTAB
);
END ZSALESFLASH;
/
and I keep getting this error :
Fail to construct descriptor: Unable to resolve type: "BESPOKE.FLASHTAB".
My types (FLASHTAB AND FLASHREC) are also defined at the schema level....
I am stuck with this bug...please let me know if you have any answer !! Thanks for your time. Valentin
|
|
|
|
|
Goto Forum:
Current Time: Mon Nov 25 20:24:24 CST 2024
|