Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: crazy effect when altering type

Re: crazy effect when altering type

From: Gary Menchen <gary.e.menchen_at_dartmouth.edu>
Date: Tue, 20 Jul 2004 16:43:21 -0400
Message-ID: <cdk0an$797$1@merrimack.Dartmouth.EDU>


There is a bug related to altering types that can corrupt the data dictionary - when I ran into this I could, by selecting from user_source, see that each line was literally in twice. One way of fixing this is to extract the DDL, manually edit it, drop the object and replace. (If it's part of an object hierarchy you will need to go through those hoops as well).

Christian "Raistlin" Gulich wrote:
> Hi,
>
> I want to add some attributes and methods to the intermedia type
> ORDSys.ORDVideo. After doing this with a statement like that there
> arises a curious problem.
>
> ALTER TYPE ORDSys.ORDVideo ADD ATTRIBUTE (
> attr1 Sys.anytype,
> attr2 number,
> ...
> );
> /
>
> ALTER TYPE ORDSys.ORDVideo
> ADD member procedure myproc
> as language java
> name 'MyClass.myproc()',
> ...
> ;
>
> Just after adding the new attributes my management console shows every
> method of ORDVideo twice! Additionally, JPublisher can't generate
> correct classes any more.
> For the method "writesource(...)" for example, it generates something
> like this before altering the type:
>
> public OrdVideo writetosource (
> byte[] ctx[],
> Integer startpos,
> Integer numbytes[],
> byte[] buffer) throws SQLException {
> ...
> }
>
> After altering it generates 2!!! methods with incorrect signatures like
> this:
>
> public OrdVideo writetosource_1 (
> byte[] ctx[],
> byte[] ctx[],
> Integer startpos,
> Integer startpos) throws SQLException {
> ...
> }
>
> public OrdVideo writetosource_2 (
> byte[] ctx[],
> byte[] ctx[],
> Integer startpos,
> Integer startpos) throws SQLException {
> ...
> }
>
>
> SQLJ can't compile these methods, of course. They have duplicate
> parameter names.
>
> If I try to alter ORDVideo to not final, to be able to create subtypes,
> there is the same effect.
>
> Does anybody know, what could be the reason?
>
> Thanks, Christian
Received on Tue Jul 20 2004 - 15:43:21 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US