Re: Question about JPublisher ...

From: Andreas Leitgeb <avl_at_gamma.logic.tuwien.ac.at>
Date: 06 Sep 2011 11:22:43 GMT
Message-ID: <slrnj6c0k3.6gl.avl_at_gamma.logic.tuwien.ac.at>


Robert Klemme <shortcutter_at_googlemail.com> wrote:

> On 04.09.2011 20:03, Andreas Leitgeb wrote:

>> Robert Klemme<shortcutter_at_googlemail.com> wrote:
>>> On 09/02/2011 04:55 PM, Andreas Leitgeb wrote:
>>>> We've got a pl/sql package, which defines a couple of records:
>>>>     create or replace package foo.bar is
>>>>        type snafu is record (
>>>>           sf_col1     varchar2(42),
>>>>        );
>>>>        type blarg is record (
>>>>           bg_col1     varchar2(42),
>>>>        );
>>>> We use JPublisher to create Java classes for this package, and
>>>> *sometimes* it (unrequestedly) merges two of the records into
>>>> one (Java-)class, which then has (e.g.) both sfCol1 and bgCol1.
>>> Just guessing here: both records have the exact same structure

>> Sorry, this guess didn't hit.
>> One of the structures has 59 elements, the other has 61 elements,
>> and the Java struct (as well as the one in plsql_wrapper.sql) has 120
> That wasn't obvious from your first posting.

Indeed, I didn't (and still don't) find this information relevant. JPublisher adds a wrong record's fields to the wanted record's fields, so it didn't occur to me that this could possibly be a buggy attempt at *unifying records* in the first place.

As it happened, the two original records even had two fields in common (same field name and type in both records, the other fields being different), and these two showed up doubly in the generated Java class, which caused the Java compiler to barf on it, which again made us notice it, because we didn't actually use this particular record. (it only gets generated as a byproduct when we need other parts of that plsql-package)

I had hoped for someone recognizing some bug of JPublisher (and perhaps the oracle-release by which this would be fixed). Googling (and I did a lot of it) didn't show anything relevant, but then again, Google doesn't seem to have oracle's bug-database in its index. Received on Tue Sep 06 2011 - 13:22:43 CEST

Original text of this message