Selecting entire row into instance of jpub class gives error

Hi. I'm using oracle 9i. I used JPublisher to create classes for my db objects, and now I want to execute:
select value(u) from university_tb where u.name = 'Harvard';
where university_tb is a table of university_t. I want to have the row returned into an instance of my java university_t class. So I create an instance of university_t and then say:
ResultSet rs = stmt.executeQuery("select value(u) from University_tb u");
rs.next();
uniInstance = ((university_t)rs.getObject(1));
I get an error which I traced to the casting of the returned object into a university_t. JPub classes use the readSQL() method to handle casting of an object. That's where my error occurs.
public void readSQL(SQLInput stream, String type)
throws SQLException
super.readSQL(stream, type);
setDescription(stream.readString());
setAddress((AddressT) stream.readObject()); <-- IT OCCURS RIGHT HERE
setYearfoundation(stream.readString());
setContactinfo((ContactinfoT) stream.readObject()); <-- IF I REMOVE THE LINE ABOVE IT OCCURS RIGHT HERE INSTEAD
setPresident(stream.readRef());
setFaculties(stream.readArray());
So it can be seen that in both cases it happens when trying to read a non-primitive type. Has anyone heard of any problems/solution with the readSQL() method of jpublisher classes, when there is a non-primitve, user defined type? My schema definitions follow. Any advice would be appreciated. Thanks.
create or replace type Address_t as object
( Num int,
Street varchar2(100),
City varchar2(50),
Province varchar2(50),
Country varchar2(50),
Postcode varchar2(15));     
create type contactinfo_t as object (
phone varchar2(20),
fax varchar2(20),
email varchar2(35));
create type unit_t as object (
name varchar2(200)) not final;
create or replace type University_t under unit_t
     Description varchar2(1000),
     Address Address_t,
     YearFoundation varchar2(10),
     ContactInfo ContactInfo_t,
     President ref Person_t,
     Faculties AcademicUnit_nt);

Hi Saro,
DBMS_STATS.AUTO_SAMPLE_SIZE is a DB setting set for the Estimate Percentage.
We can know the value currently set by using below SQL.
SQL> select dbms_stats.get_prefs('ESTIMATE_PERCENT','DACREP','W_ETL_RUN_S') from dual;
assuming DACREP is the owner of the DAC Repository. If the value is not set please set it by below SQL. The 2 in sql is variable you can size it optimal.
SQL> exec dbms_stats.set_database_prefs('ESTIMATE_PERCENT',2);
Regards,
Jay

Similar Messages

  • Putting a row into a pageable cache failed with error 9 and error message

    Hi Guys,
                 I am fetting the follwoing message when the job is scheduled.
    Putting a row into a pageable cache failed with error <9> and error message <Db::put: Bad file descriptor>
    I read the forum and Manoj has suggested to one of the forum member to change the size of the Pcache setting through the server manager. But I do not see the setting there. can any one please let me know where exactly I can see and increase the size of the Pcache.
    Thanks

    Hi
    I've had the same problem.  We know from other (more meaingful) error messages that we ran out of space for the Pageable Cache, but we've just increased it by 50GB and still get the same error.
    Anyone??
    Btw i don't think you there is a setting for PCache size - it will just use all the free disk you have on the drive where you have located the PCache directory.
    Richard

  • How do I copy content from an entire row into a different table?

    How do I copy content from an entire row of one table into a different table?  When I try to copy/paste the selected row into a row of the same size  and configuration in another table in the same document, the cells change width, the formatting and border thicknesses change, and the text gets squeezed.  When I was working with tables in Microsoft Word, there was no problem selecting text from a row in one table and placing it into a similar row and configuration in another table.

    Hi Christopher Morgan
    And welcome to apple discussions. With regard to your main question ....
    Q: Can this be done?
    A: It can but not easily (in that you may take a hit in quality). Apps like MpegStream Clip or DVDXDV may help:
    http://www.dvdxdv.com/NewFolderLookSite/Products/DVDxDV.products.htm
    It converts it back to a QT file for use with iDvd (or iMovie).
    Hope this helps but if not just come on back.
    Disclaimer: Apple does not necessarily endorse any suggestions, solutions, or third-party software / products that may be mentioned in this topic. Apple encourages you to first seek a solution at Apple Support. The following links are provided as is, with no guarantee of the effectiveness or reliability of the information. Apple does not guarantee that these links will be maintained or functional at any given time. Use the information above at your own discretion.

  • JTable - Select entire Row

    Hi
    How is it possible to select the entire row of a JTable without the cell that`s selected, gaining a border.
    Any help would be appreciated.
    Thanks
    Kelly

    Could you explain what you need? You don't want the border of the selected row to be displayed?

  • Select report row into another report

    I got 2 tables, DERESCE and DRRESERV
    DRRESC contains all the available Resources
    DRRESRV contains the reservation of a Resource per date.
    DRRESRV has 2 Foraign key's of the day and the Resource.
    The day PK is on another page item.
    Objective:
    To click on a link in the DERESCE report and load the resourcePK and dayPK into DRRESERV showing on a report or tabularform.
    So its almost like a submit, with one of the values on another page, one value being the PK of a report and the button a link in a report.
    Can this be done? And how?

    Then move your creation process from on submit to on load and make it conditional to fire only if you have a specific request in your link.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • DB Instance creation using DBCA Gives ERROR

    Hi All,
    I am getting below error while creating a new DB instance using DBCA. Initially I thought it could be a problem of the oracle version. But I checked it is Oracle 10G server version 10.2.0.1. I got it re-installed 3 times, but still same issue. Please help !!!
    ORA-31011: XML parsing failed
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 3
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 14
    ORA-06512: at line 143

    I remember that issue from long long ago, for that old version, although I didn't encounter it that often.
    If I am not mistaken, I solved it by running @?/rdbms/admin/catqm after creation (a multiple times?) and @?/rdbms/admin/utlrp
    Maybe the following will help/assist in solving the issue: http://www.liberidu.com/blog/2009/07/13/howto-clean-xml-db-install/

  • Defining variables from a class gives errors

    Hi,
    I'm trying to create a questionnaire, that can hold an array
    of questions.
    The questions can be of different types, like single punch,
    multi punch, open text etc.
    Much of the code below is copied from examples I've found and
    I am definitely in the beginning
    of my learning process when it comes to Flex, but I think
    Flex can solve a problem I have at work.
    So, I'm trying to cut corners...
    I created this class called Questions, which contains all
    properties any question can have.
    When I'm trying to define a variable (myQuestion) based on
    that class, I the following error.
    (actually I get it on all properties...)
    Error:
    1120: Access of undefined property Qtype.
    This is the class definition:
    package Mycomponents
    //import other classes needed
    //import Mycomponents.Codeframe
    public class Question {
    // Define properties and methods.
    // Define public vars.
    public var Qtype:String="";
    public var Condition:String="";
    public var Qnumber:String="";
    public var Qheading:String="";
    public var Pretext:String="";
    public var Qtext:String="";
    public var Posttext:String="";
    public var Codeframe:String;
    public var Reserved:String="";
    public var EditableFrom:String="";
    public var EditableTo:String="";
    public var Decimal:String="";
    public var SetQfactor:String="";
    public var Logic_if:String="";
    public var Logic_then:String="";
    // Public constructor.
    public function Question(
    Qtype:String,
    Condition:String,
    Qnumber:String,
    Qheading:String,
    Pretext:String,
    Qtext:String,
    Posttext:String,
    Codeframe:String,
    Reserved:String,
    EditableFrom:String,
    EditableTo:String,
    Decimal:String,
    SetQfactor:String,
    Logic_if:String,
    Logic_then:String )
    this.Qtype=Qtype;
    this.Condition=Condition;
    this.Qnumber=Qnumber;
    this.Qheading=Qheading;
    this.Pretext=Pretext;
    this.Qtext=Qtext;
    this.Posttext=Posttext;
    this.Codeframe=Codeframe;
    this.Reserved=Reserved;
    this.EditableFrom=EditableFrom;
    this.EditableTo=EditableTo;
    this.Decimal=Decimal;
    this.SetQfactor=SetQfactor;
    this.Logic_if=Logic_if;
    this.Logic_then=Logic_then;
    This is the part of the code that generates the error:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.states.State;
    import mx.controls.Alert;
    import mx.events.CloseEvent;
    import flash.events.KeyboardEvent;
    import Mycomponents.Codeframe;
    import Mycomponents.Question;
    public var myQuestion:Question = new Question(
    Qtype,
    Condition,
    Qnumber,
    Qheading,
    Pretext,
    Qtext,
    Posttext,
    Codeframe,
    Reserved,
    EditableFrom,
    EditableTo,
    Decimal,
    SetQfactor,
    Logic_if,
    Logic_then
    ....more code...
    ...what am I missing in defining this variable?
    If you have a link to a good book on Flex...let me know.
    Regards
    /Acke

    When you create your local variable myQuestion, where are the
    parameters (used in the constructor) declared and initialized?
    var _qType = "some value";
    var myQ:Question = new Question(_qType,"","" etc);
    Also good OO practice is to declare your variables as private
    and add getters and setters for the values. Sometimes you may want
    to manipulate the values when getting or setting.
    If you use the standard AS3 get and set then declare your
    vars with an _
    so as not to conflict with the getter and setter. For exampe:
    public class MyClass
    private var _var1:String;
    public function get var1():String
    return _var1;
    public function set var1(v:String):void
    _var1 = v;
    This may seem like extra work, but in a complex application
    with lots of classes
    encapsulating updating of members will save you lots of
    headaches.

  • When trying to copy something into InDesign it crashes and gives error faulting MSVCR90.dll ?

    I am IT support person for one of our clients and they are complaining about InDesign crashing every time they try to copy text from Ms Office or Open Office. I checked the event logs I found the following error is thrown many times:
    Faulting application name: InDesign.exe, version: 7.0.4.553, time stamp: 0x4d890440
    Faulting module name: MSVCR90.dll, version: 9.0.30729.4940, time stamp: 0x4ca2ef57
    Exception code: 0xc0000005
    Fault offset: 0x0003b36a
    Faulting process id: 0x9a8
    Faulting application start time: 0x01cd36dcfcee3866
    Faulting application path: C:\Program Files (x86)\Adobe\Adobe InDesign CS5\InDesign.exe
    Faulting module path: C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_50916076bcb9a742\MSVCR90.dll
    Report Id: 482cfdbe-a2d0-11e1-8bdb-bcaec5e1a2cd
    Would appreciate any help you could provide.

    Tangent:
    I would recommend this Wiki entry: http://en.wikipedia.org/wiki/WinDbg
    Begin with the first link in the list at the bottom.
    OK, Mike, you've got me. Why would you recommend a Wikipedia entry only to say that someone should start with the first link at the bottom? Why not link directly to whatever it is you want to link to?
    I'm also kind of confused...are you recommending How to install Windbg and get your first memory dump, blogs.msdn.com/b/johan/archive/2007/01/11/how-to-install-windbg-and-get-your-first-memory -dump.aspx?
    If so, you have me puzzled. It's not wrong information, but we don't want a memory dump. We just want a stack trace. That's the 'kp' command, I believe. I don't have a nice fancy URL to recommnd, so maybe I shouldn't nitpick yours, but it doesn't look very helpful for the problem at hand.
    p.s.: it also seems to recommend loading a bunch of extensions that are not helpful here. Like SOS. All that's needed is the core WinDBG.

  • Pass the name of a button into existing instance of a class from actionlist

    I want to pass a name of a button from actionlistener that is associated with that button into existing instance of a class. I need to do so because I have array of buttons and I have set the name of the buttons as coordinates. Is there a way to do that?

    My buttons are declared as JButton arrayOfButtons[][] = new JButton[numberOfRows][numberOfColumns];and I labeled them inside 2 for loops as:
    arrayOfButtons[row][column].setName(Integer.toString(row) + " " + Integer.toString(column));
    arrayOfButtons[row][column].setText("Some displayed text");I also added ActionListener
    arrayOfButtons[row][column].addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            System.out.println(((JButton)e.getSource()).getName());
    });Now when I press a button it only displays the array coordinates on a command line. I want the class instance where I declared the buttons to get notified which button was clicked.

  • Selecting an entire row with the help of Checkbox

    Hi and Evening to Everybody,
    I have a Scenario where i need to select an entire row using the check box. Let me first define the Situation. I created a Simple Sql-report where the first column is a Simple Checkbox and the second column is a display only name and followed by the rest 5 columns as a checkbox.
    my table structure is :
    **create table satt (SELECT_ALL VARCHAR2(10), Name VARCHAR2(50), Object1 VARCHAR2(10), Object2 VARCHAR2(10), Object3 VARCHAR2(10), Object4 VARCHAR2(10), Object5 VARCHAR2(10));**
    Now i had a requirement where i need to Check All or Uncheck All Checkbox by clicking SELECT_ALL column header and i made it using
    simple java-script :
    "<input type="Checkbox" onclick="$f_CheckFirstColumn(this)">"
    Now i need to Check all checkbox in a row by clicking any of the SELECT_ALL check boxes. (Say i have 5 checkboxes in SELECT_ALL column and if i click 3rd checkbox... i need the entire 3rd row checkbox to be checked on click of that 3rd check box).
    I hope i was clear with my question. i did my best. Please help me out with this... Im eagerly lookin for the solutions.
    Thanks & Regards,
    - The Beginner.
    Edited by: 854477 on Jul 13, 2011 4:57 AM
    Edited by: 854477 on Jul 13, 2011 5:01 AM

    Solomon Yakobson wrote:
    There is no row order in relational tables unless ORDER BY is used, so there is no way to decide if 3 Mathematics belongs to 100 or to 200.
    SY.That's not how I interpretted it. I thought he was saying that in the first row column B has the value:
    '1 Physics'||chr(10)||'2 Chemistry'||chr(10)||'3 Mathematics'
    in which case something like this would work
    select a,replace(b,chr(10),chr(10)||a||' ') from table;

  • Selection of rows in ALV grid (class CL_GRID_CATSXT)

    Hi all,
    The CATS transaction CATS_APPR_LITE is using the class CL_GRID_CATSXT, method GET_SELECTED_ROWS, to retrieve selected rows in the ALV report.
    The user/manager selects these rows to approve the work hours registered by his subordinates. He can only select and approve those rows that have been fully expanded, meaning he cannot select and approve total lines. (If he tries to do so, nothing happens).
    I have created a layout that shows only total lines per employee. Using this layout the manager should be able to select the total line for a particular employee and press the "Approve" button. In this way, I need to get a hold of the rows contained in the total line, meaning I need the row numbers of the actual rows which have been added up in the total line.
    Does anyone know how to do this...? As mentioned earlier, the CATS_APPR_LITE transaction is using class CL_GRID_CATSXT, method GET_SELECTED_ROWS.
    All helpful answers will be rewarded!
    Best regards,
    MV

    I guess method GET_SELECTED_ROWS returns the total lines when they are selected ?
    if so, you just have to do a LOOP on your internal table having same key fields as selected total line

  • TEXT_IO/cursor problem - Appropriate SELECT...INTO.. returns no rows!

    Hi,
    I have a button on a form which, when pressed, uses the built-in "GET_FILE_NAME" to locate a comma-delimited flat file. I use TEXT_IO to open the file and process the rows in a FOR LOOP. In the loop, I parse each comma delimited field into it's own variable. One of these fieldsis a week-ending-date, which is converted to a DATE variable. I need to get the year and week # from a support table called "Week" (I could justget the year from the date, but the week number is arbitrary when crossing over years). I have tried using a SELECT..INTO statement and an explicit cursor with the same results - none. The select into I use is:
    SELECT year, week
    INTO v_year, v_week
    FROM schema1.week
    WHERE TRUNC(end_date) = TRUNC(v_edate);
    --where v_year and v_week are the same %TYPE as their corresponding columns
    -- and v_edate is the week-ending-DATE from the flat file
    When I do this from SQL*PLUS, it comes out fine, but no data is found when run in the form. I don't get it... if there is nothing wrong with the syntax, shouldn't this work in both places? Or is there some limitation on using cursors while processing a TEXT_IO file? If anyone knows the why of this or can think of a workaround, please let me know.
    Oracle Version: 8.1.7.0.0
    Server: IRIX - Unix
    Forms Version: 6.0.5.35.3
    Client: Win 98
    Thanks much,
    Jason

    DECLARE
         v_filename VARCHAR2(100);
         temp_file TEXT_IO.File_Type;
         linebuff VARCHAR2(1800);
         v_edate DATE;
         v_year schema1.week.year%TYPE;
         v_week schema1.week.week%TYPE);
         str_start NUMBER;
         str_end     NUMBER;
         CURSOR week_cur (p_edate IN DATE) IS
              SELECT year, week
              FROM schema1.week
              WHERE TRUNC(end_date) = TRUNC(p_edate);
    BEGIN
         v_filename := GET_FILE_NAME ('c:\files\');
         temp_file := TEXT_IO.Fopen (v_filename, 'R');
         FOR i IN 1..3 LOOP
              TEXT_IO.Get_Line (temp_file, linebuff);
              IF i > 1 THEN
                   GO_BLOCK ('DATA_DUMP');
                   NEXT_RECORD;
              END IF;
              str_end := INSTR(linebuff, ',') - 1;
              :DATA_DUMP.stnum := SUBSTR (linebuff, 1, str_end);
              str_start := str_end +2;
              str_end := INSTR(linebuff, ',', 1, 2);
              :DATA_DUMP.dnum := SUBSTR (linebuff, str_start, str_end - str_start);
              str_start := str_end +1;
              str_end := INSTR(linebuff, ',', 1, 3);
              :DATA_DUMP.spp := SUBSTR (linebuff, str_start, str_end - str_start);
              str_start := str_end +1;
              str_end := INSTR(linebuff, ',', 1, 4);
              v_edate := TO_DATE (SUBSTR(linebuff, str_start, str_end - str_start), 'MM/DD/YYYY');
              str_start := str_end +1;
              str_end := INSTR(linebuff, ',', 1, 5);
              :DATA_DUMP.lbs_land := SUBSTR (linebuff, str_start, str_end - str_start);
              str_start := str_end +1;
              str_end := LENGTH(linebuff);
              :DATA_DUMP.date_in := TO_DATE (SUBSTR(linebuff, str_start, str_end - str_start), 'MM/DD/YY HH:MI');
              OPEN week_cur (v_edate);
                   FETCH week_cur INTO v_year, v_week;
              CLOSE week_cur;
              :DATA_DUMP.year := v_year;
              :DATA_DUMP.week := v_week;
         END LOOP;
    END;          

  • If I add artwork by dragging a jpg to the artwork area after selecting several rows, in some instances a single icon is created in the flipper;  in others one is created for each song. Why? How can I get one image per album every time?

    If I add artwork by dragging a jpg to the artwork area after selecting several rows, in some instances a single icon is created in the flipper;  in others one is created for each song. Why? How can I get one image per album every time?

    If I add artwork by dragging a jpg to the artwork area after selecting several rows, in some instances a single icon is created in the flipper;  in others one is created for each song. Why? How can I get one image per album every time?

  • Multi-select LOV return into single row

    I have a multi-select lov setup on a column in a table layout. I want to be able to select the lov, select multiple rows in the lov and then when I press the select button in the lov window to have those lov records select return to the same column. Currently, the lov returns the multi lov records into multiple records on my table layout.

    IN JHeadstart 10.1.3, we will add the option to return multiple selected values as a comma-separated list into the same field. With 10.1.2 this is not possible. You can implement this yourself by overriding method JhsDataAction.onLovSelect.
    Steven Davelaar,
    JHeadstart Team.

  • I need to divide selected row into multiple rows when i navigate  ADF 11g

    Hi
    I'm using jdeveloper 11.1.1.2.0 with ADF 11g.
    I need to divide selected row into multiple rows when i navigate to other page . Scenario - in first page i'm displaying some records with columns like empno , empstatus , empworkdepts ,curdepts
    Here empworkdepts gives the numeric number like no of departments work shifts 3 or 4 or 5. when i select any particular employee and fire next button to navigate next page.I have to divide the selected employee with same information into multiple times based on the empworkdepts value.
    empno empstatus empworkdepts curdept
    001 eds 2 TS
    002 hr 1 FO
    003 eds 4 TS
    *004 eds 3 TS*
    now i selected employee 004 , when i navigate to next page.
    Empno EmpStatus EmpWorkDepts CurDept
    004 eds 3 TS
    004 eds 3 TS
    004 eds 3 TS
    i did with java code in bean .but not stable .
    any help............
    thanks advance.............
    Edited by: user9010551 on May 5, 2010 10:48 PM
    Edited by: user9010551 on May 10, 2010 11:31 PM

    user9086775 wrote:
    Hi Experts,
    I have a requirment where i need to fetch parts of a single row into multiple rows from a singlt Query, i am sure it is possible using Pivots but just cant figure out an approach. Any help on this is highly appriciapted.
    Requirment:
    This is a sample set record in a table
    Product     Sub Product          Name    Age
    New Car    Nissan                   Tom        49
    New Car    Nissan                   Jack         36
    Old Car      Audi                     Sam         24
    Old Car      Jaguar                  Pint          26
    Old Car      Audi                     Smith       41
    I need to be able to fetch the above data in the below fashion
    Product     Sub Product          Name    Age
    New Car
    Nissan
    Tom        49
    Jack        36
    Old Car     
    Audi            
    Sam        24
    Smith      41
    Jaguar                   Pint         26Please help with ideas as to how can i achive the above without using PLSQL.
    Thanks in advance!You should be doing this in the client on not in the DB. Use the reporting tool that you use to do this.
    For example if you are in SQL Plus you can use the BREAK command.

Maybe you are looking for