This discussion is archived
6 Replies Latest reply: Apr 26, 2012 11:08 PM by Frank Nimphius RSS

[BUG] NUMBER(38) to BigInteger mapping error. JDev 11.1.2.1.0

752685 Newbie
Currently Being Moderated
When I try to update value in af:table, popup error says "Invalid column type" (in WL logs - "java.sql.SQLException: Invalid column type")
Though SELECT succeeds, i.e. I can see table's data

*[EDIT]* This is not bug from 11.1.2.0, attribute type is java.math.BigInteger, not just BigInteger *[EDIT]*

Steps to reproduce:

1. table
CREATE TABLE anm_tmp( i NUMBER(38) PRIMARY KEY );

BEGIN
   INSERT INTO anm_tmp( i ) VALUES( 1 );
   INSERT INTO anm_tmp( i ) VALUES( 2 );
   COMMIT;   
END;
2. create "Business Component from Tables"

3. create single page, add af:table, add commit button

Workaround
change attribute's type to BigDecimal or Integer (open entity object, go to "Attributes" tab, "Details" tab)


Questions
1. Is this really a bug, or I've missed smth ?
2. Should I choose BigDecimal or Integer (or smth else) ?

*[EDIT 2]*
Configuration: <pre>
CPU: Intel E5300
OS: Windows 7 (x32)
JDev:
build: JDEVADF_11.1.2.1.0_GENERIC_110907.2314.6081
Java: 1.6.0_24
Oracle IDE: 11.1.2.1.38.60.81
</pre>

Edited by: Alexander Malakhov on Apr 4, 2012 10:16 AM
  • 1. Re: [BUG] NUMBER(38) to BigInteger mapping error. JDev 11.1.2.1.0
    Frank Nimphius Employee ACE
    Currently Being Moderated
    Hi,

    Big Decimal appears to be the correct choice. Not sure if this is a bug (I am kind of undecided). However, feel free to file it as a bug if you think it is one

    Frank
  • 2. Re: [BUG] NUMBER(38) to BigInteger mapping error. JDev 11.1.2.1.0
    918614 Newbie
    Currently Being Moderated
    Hi Frank,

    I am getting the same error of "java.sql.SQLException: Invalid column type". If I change to Integer works but I want to have them right (as BigInteger).

    I read perhaps it's a JDBC bug, did you find the solution on that?

    Many thanks.
  • 3. Re: [BUG] NUMBER(38) to BigInteger mapping error. JDev 11.1.2.1.0
    Frank Nimphius Employee ACE
    Currently Being Moderated
    Hi,

    as I mentioned I was undecided of whether this is an issue or not. Note however that it seems that primary and foreign key are created as Integer by ADF Bc and only numeric non-key fields show as Big Decinal. So far for me things work as expected. So if nobody filed this as a bug then this is not worked at.

    Frank

    Edited by: Frank Nimphius on Feb 20, 2012 11:25 AM
  • 4. Re: [BUG] NUMBER(38) to BigInteger mapping error. JDev 11.1.2.1.0
    Frank Nimphius Employee ACE
    Currently Being Moderated
    Hi,

    see there is bug 11672797 filed as a JDBC bug.

    Frank
  • 5. Re: [BUG] NUMBER(38) to BigInteger mapping error. JDev 11.1.2.1.0
    752685 Newbie
    Currently Being Moderated
    Hmm, I can't find it on support.oracle.com (searched for the text "11672797" in "bug database" and "all sources").
    Also, search for {"Invalid column type" BigInteger} gives just 8 results, and I don't see my problem among them (maybe I've missed something).
    *[edit]* B.t.w. I doubt it's JDBC bug - 11.1.1.5 works OK in this regard, or do 1.5 and 2.1 use different versions of JDBC ? *[edit]*

    So, you can't reproduce it with steps in OP ? I.e. you can update trough af:table ?
    That's strange - it's 100% reproducible on both PCs we've tried it on.
    (our production projects use JDev 11.1.1.x, so we haven't filed bug)

    Maybe it's specific to my PC's configuration - I've updated OP.

    Edited by: Alexander Malakhov on Apr 27, 2012 10:37 AM
  • 6. Re: [BUG] NUMBER(38) to BigInteger mapping error. JDev 11.1.2.1.0
    Frank Nimphius Employee ACE
    Currently Being Moderated
    Alexander,

    The reason you don't see bug 11672797 is that it was filed by an internal employee and thus not externalized. The bug summary is:

    Looks like JDBC is having trouble with BigInteger for a column of type NUMBER(38).

    JDBC VERSION AND NAME OF JDBC JAR FILE (REQUIRED):
    ---
    JDBCDriverVersion: 11.2.0.2.0
    DatabaseProductName: Oracle
    DatabaseProductVersion: Oracle Database 11g Enterprise Edition Release
    11.1.0.7.0 - Production With the Partitioning, OLAP, Data Mining and Real
    Application Testing options

    This bug has been fixed in November 2011 and has been filed against the JDBC driver. The fix is available in version 12.1 (backport appears to be feasible)

    Anyway, If this issue only reproduces in JDeveloper 11g R2 and not for 11.1.1.5 then chances are that indeed the issue might be different. So if it reproduces for you then please go ahead and file a bug. I am spending larger parts of my time trying to reproduce issues reported on OTN. If things don't reproduce for me but you have a reproducible testcase, please file a bug so the issue is fixed once you upgrade to a next release

    Frank

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points