jpublisher Question. Please help.

From: deejay <djuravel_at_dgny.com>
Date: 22 Oct 2001 14:29:45 -0700
Message-ID: <f7b19882.0110221329.48e79d4_at_posting.google.com>



Working with oracle 8i on Soloaris: My stored procedure written in java expects an oracle object (named outer_objtyp) which contains two fields. One field is another oracle object(inner_objtyp) and the other field is a varchar2. I did jpublisher on the Inner_Objtyp and Outer_Obtyp,loaded these java classes to oracle, and type mapped these java classes to the proper corresponding oracle object. When I do jpub using the -usertypes=oracle option everything works well and the stored procedure is executed properly. But when I do jpub using -usertypes=jdbc, upon executing the stored procedure, I get an Inconsistent Datatype error (and a class cast exception too.) I don't know what I need to do in order to get the usertypes=jdbc to work correctly. WHAT DID I LEAVE OUT? What am I missing? Here's the syntax:

THE ORACLE OBJECT:
CREATE TYPE inner_objtyp AS OBJECT(inner_fld VARCHAR2(25)) CREATE TYPE outer_objtyp AS OBJECT

   (inner_obj inner_objtyp,outer_fld VARCHAR2(25))

THE STORED PROCEDURE'S PUBLICATION:
CREATE OR REPLACE PACKAGE sub_clss_proc AS   PROCEDURE proc_sub_clss
  (outer2 IN OUTER_OBJTYP
  );
END sub_clss_proc;
/

CREATE OR REPLACE PACKAGE BODY sub_clss_proc AS   PROCEDURE proc_sub_clss

        (outer2         IN OUTER_OBJTYP
        )

    AS LANGUAGE JAVA
  NAME 'SubClssProc.procOuter(Outer_Objtyp)'; END sub_clss_proc;
/

JPUB STATMENT THAT WORKS:
jpub -user=$SIGNON \
-sql=inner_objtyp:Inner_Objtyp,outer_objtyp:Outer_Objtyp \
-case=mixed -methods=none \
-usertypes=oracle

JPUB STATEMENT THAT CAUSES INCONSISTENT DATA ERROR: jpub -user=$SIGNON \
-sql=inner_objtyp:Inner_Objtyp,outer_objtyp:Outer_Objtyp \
-case=mixed -methods=none \
-usertypes=jdbc

PLEASE RESPOND AS SOON AS POSSIBLE. Thank You Received on Mon Oct 22 2001 - 23:29:45 CEST

Original text of this message