The link is broken
A reader, November 18, 2003 - 2:47 pm UTC
November 21, 2003 - 10:57 am UTC
referencing types in pl/sql package from java
mahi, October 25, 2004 - 3:55 pm UTC
I am facing the similar problem now. Its saying "Sql Exception is:invalid name pattern: "medart_dev.mypkg.DestQtrArray_type".
I have created a type inside a pkg specification mypkg.
Here is my java code snippet
ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor("mypkg.DestQtrArray_type", conn );
I am using oracle 9i and thin driver for connecting to the database.
October 25, 2004 - 4:00 pm UTC
type must be a sql type - not a plsql type.
you can only use plsql index by tables (link above shows how to do that) or sql types.
Oracle Interconnect Database adapter error
Faheem, October 19, 2006 - 10:29 am UTC
Tom,
I having similar kind of problem, but I have type created outside of the pl/sql as "Table" here it is
CREATE OR REPLACE TYPE demosub_Address_OAI_V1 IS OBJECT (
City VARCHAR2(1000),
State VARCHAR2(1000),
Zip VARCHAR2(1000)
);
create TYPE demosub_Address_OAI_V1_Arr IS table of demosub_Address_OAI_V1;
I am using collection type demosub_Address_OAI_V1_Arr in a stored proc which is called by Oracle Inter Connect Subscription database adapter.
Here is the proc
CREATE OR REPLACE PACKAGE BODY Customer AS
PROCEDURE sub_CreateCustomer_OAI_V1(
ID IN NUMBER,
Address IN demosub_Address_OAI_V1_Arr
)
AS
dummy NUMBER;
-- fill declarations here
BEGIN
-- fill code here
dummy:= 0;
insert into results values (id, address);
insert into executed values(sysdate);
commit;
END sub_CreateCustomer_OAI_V1;
END Customer ;
So this proc I beleived is called by the Oracle Interconnect database adapter and I think is called through Java which is trying to pass a message as input argument as Array Data type. and I am getting following.
***********
Error: db_bridge_writer_1 could not write the message to the database because of an application error (java.sql.SQLException: invalid name pattern: OAI_USER.DEMOSUB_ADDRESS_OAI_V1_ARR) in the application stored procedure. Please check your stored procedure. (Customer.CreateCustomer:OAI/V1,OAI/V1,false,0
ID: 10
Address[0]
City: SFO
State: CA
Zip: 94040
Address[1]
City: Reno
State: NV
Zip: 93949
Address[2]
City: SJC
State: CA
Zip: 95117
) was not written to the database.
java.sql.SQLException: invalid name pattern: OAI_USER.DEMOSUB_ADDRESS_OAI_V1_ARR
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161)
at oracle.jdbc.oracore.OracleTypeADT.initMetadata(OracleTypeADT.java:411)
at oracle.jdbc.oracore.OracleTypeADT.init(OracleTypeADT.java:326)
at oracle.sql.ArrayDescriptor.initPickler(ArrayDescriptor.java:1299)
at oracle.sql.ArrayDescriptor.<init>(ArrayDescriptor.java:155)
at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:112)
at oracle.oai.agent.adapter.database.DBMessageWriter.createOracleArray
********************************
October 19, 2006 - 2:06 pm UTC
sorry, I've never used that tool myself.