Null Pointer when fetching VARRAY / OBJECT TYPE

Hi,
i'm trying to fetch a VARRAY, containing an Obeject Type consisiting of two NUMBERS (see scripts below). Now i used JDeveloper to generate corresponding Java Klasses. What i'm trying to do is this:
String SQL = "select quantityprice from ts_transaction_q_history where hist_id = 125608";
Map map = null;
Class obj = null;
Connection tmpCon = null;
PreparedStatement tmpStmt = null;
ResultSet tmpRS = null;
VaQuantitypriceQ100 tmpQP100 = null;
OtQuantityprice tmpQP = null;
OtQuantityprice[] tmpQPArr = null;
ARRAY tmpQP100ARR = null;
try {
tmpCon = getConnection();
map= tmpCon.getTypeMap();
obj = Class.forName("ch.egl.emis.persistence.wrapper.VaQuantitypriceQ100");
map.put(VaQuantitypriceQ100._SQL_NAME, obj);
tmpCon.setTypeMap(map);
tmpStmt = tmpCon.prepareStatement(SQL);
tmpRS = tmpStmt.executeQuery();
while (tmpRS.next()) {
tmpQP100ARR = (ARRAY) tmpRS.getObject(1);
System.out.println(tmpQP100ARR.toString());
ORADataFactory factory = VaQuantitypriceQ100.getORADataFactory();
tmpQP100 = (VaQuantitypriceQ100) factory.create(tmpQP100ARR, OracleTypes.ARRAY);
Long quan = tmpQP.getQuantity().longValue();
Long price = tmpQP.getPrice().longValue();
Well, everything works fine, as far as i can see. I get a Quantity (quan), but when i try to get the price, i get a null pointer.
I am sure, that there is data on the DB and the value for price is nut null. i an using JBoss 3.2.7 and Oracle 9i. Connection is "thin" (may that be the Ptoblem)?
Anybody there who had similar problems or has a solution for this?
Many thanks
Sven
********************** VA_QUANTITYPRICE_Q_100 *********************************
CREATE OR REPLACE TYPE VA_QUANTITYPRICE_Q_100 AS VARRAY(100) OF OT_QUANTITYPRICE
********************** OT_QUANTITYPRICE *********************************
CREATE OR REPLACE TYPE "OT_QUANTITYPRICE" as object (
quantity number,
price number
)

Hi,
i'm trying to fetch a VARRAY, containing an Obeject Type consisiting of two NUMBERS (see scripts below). Now i used JDeveloper to generate corresponding Java Klasses. What i'm trying to do is this:
String SQL = "select quantityprice from ts_transaction_q_history where hist_id = 125608";
Map map = null;
Class obj = null;
Connection tmpCon = null;
PreparedStatement tmpStmt = null;
ResultSet tmpRS = null;
VaQuantitypriceQ100 tmpQP100 = null;
OtQuantityprice tmpQP = null;
OtQuantityprice[] tmpQPArr = null;
ARRAY tmpQP100ARR = null;
try {
tmpCon = getConnection();
map= tmpCon.getTypeMap();
obj = Class.forName("ch.egl.emis.persistence.wrapper.VaQuantitypriceQ100");
map.put(VaQuantitypriceQ100._SQL_NAME, obj);
tmpCon.setTypeMap(map);
tmpStmt = tmpCon.prepareStatement(SQL);
tmpRS = tmpStmt.executeQuery();
while (tmpRS.next()) {
tmpQP100ARR = (ARRAY) tmpRS.getObject(1);
System.out.println(tmpQP100ARR.toString());
ORADataFactory factory = VaQuantitypriceQ100.getORADataFactory();
tmpQP100 = (VaQuantitypriceQ100) factory.create(tmpQP100ARR, OracleTypes.ARRAY);
Long quan = tmpQP.getQuantity().longValue();
Long price = tmpQP.getPrice().longValue();
Well, everything works fine, as far as i can see. I get a Quantity (quan), but when i try to get the price, i get a null pointer.
I am sure, that there is data on the DB and the value for price is nut null. i an using JBoss 3.2.7 and Oracle 9i. Connection is "thin" (may that be the Ptoblem)?
Anybody there who had similar problems or has a solution for this?
Many thanks
Sven
********************** VA_QUANTITYPRICE_Q_100 *********************************
CREATE OR REPLACE TYPE VA_QUANTITYPRICE_Q_100 AS VARRAY(100) OF OT_QUANTITYPRICE
********************** OT_QUANTITYPRICE *********************************
CREATE OR REPLACE TYPE "OT_QUANTITYPRICE" as object (
quantity number,
price number
)

Similar Messages

  • Null Pointer when fetching VARRAY / OBJEC TYPE

    Hi,
    i'm trying to fetch a VARRAY, containing an Obeject Type consisiting of two NUMBERS (see scripts below). Now i used JDeveloper to generate corresponding Java Klasses. What i'm trying to do is this:
    String SQL = "select quantityprice from ts_transaction_q_history where hist_id = 125608";
    Map map = null;
    Class obj = null;
    Connection tmpCon = null;
    PreparedStatement tmpStmt = null;
    ResultSet tmpRS = null;
    VaQuantitypriceQ100 tmpQP100 = null;
    OtQuantityprice tmpQP = null;
    OtQuantityprice[] tmpQPArr = null;
    ARRAY tmpQP100ARR = null;
    try {
    tmpCon = getConnection();
    map= tmpCon.getTypeMap();
    obj = Class.forName("ch.egl.emis.persistence.wrapper.VaQuantitypriceQ100");
    map.put(VaQuantitypriceQ100._SQL_NAME, obj);
    tmpCon.setTypeMap(map);
    tmpStmt = tmpCon.prepareStatement(SQL);
    tmpRS = tmpStmt.executeQuery();
    while (tmpRS.next()) {
    tmpQP100ARR = (ARRAY) tmpRS.getObject(1);
    System.out.println(tmpQP100ARR.toString());
    ORADataFactory factory = VaQuantitypriceQ100.getORADataFactory();
    tmpQP100 = (VaQuantitypriceQ100) factory.create(tmpQP100ARR, OracleTypes.ARRAY);
    Long quan = tmpQP.getQuantity().longValue();
    Long price = tmpQP.getPrice().longValue();
    Well, everything works fine, as far as i can see. I get a Quantity (quan), but when i try to get the price, i get a null pointer.
    I am sure, that there is data on the DB and the value for price is nut null. i an using JBoss 3.2.7 and Oracle 9i. Connection is "thin" (may that be the Ptoblem)?
    Anybody ther who had similar problems or has a solution for this?
    Many thanks
    Sven
    ********************** VA_QUANTITYPRICE_Q_100 *********************************
    CREATE OR REPLACE TYPE VA_QUANTITYPRICE_Q_100 AS VARRAY(100) OF OT_QUANTITYPRICE
    ********************** OT_QUANTITYPRICE *********************************
    CREATE OR REPLACE TYPE "OT_QUANTITYPRICE" as object (
    quantity number,
    price number
    )

    Sven,
    Here is my simplified example. I hope it helps you.
    I am using JDK 1.5.0_06, Oracle 9.2.0.1 database and latest Oracle JDBC driver ("ojdbc14.jar").
    create or replace type OBJ as object (
      QUANTITY  number
    ,PRICE     number
    create or replace type VA_OBJ as varray(100) of OBJ
    create table TBL (
      CLMN  VA_OBJ
    insert into TBL (CLMN)
    values (VA_OBJ(OBJ(0,1),OBJ(10,100),OBJ(100,1000)))
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.Arrays;
    import oracle.jdbc.pool.OracleDataSource;
    import oracle.sql.ARRAY;
    import oracle.sql.STRUCT;
    public class ArStruct {
      public static void main(String[] args) {
        Connection c = null;
        OracleDataSource ods = null;
        ResultSet rs = null;
        Statement s = null;
        try {
          ods = new OracleDataSource();
          ods.setURL("jdbc:oracle:thin:scott/tiger@//host:1521/orcl");
          c = ods.getConnection();
          s = c.createStatement();
          rs = s.executeQuery("select CLMN from TBL");
          if (rs.next()) {
            ARRAY ar = (ARRAY) rs.getObject(1);
            Object[] obj = (Object[]) ar.getArray(1L, 1);
            if (obj != null) {
              STRUCT struct = (STRUCT) obj[0];
              obj = struct.getAttributes();
              System.out.println(Arrays.asList(obj));
        catch (Exception x) {
          x.printStackTrace();
        finally {
          if (c != null) {
            try {
              c.close();
            catch (SQLException xSql) {
              System.err.println("Failed to close database connection.");
              xSql.printStackTrace();
          if (ods != null) {
            try {
              ods.close();
            catch (SQLException xSql) {
              System.err.println("Failed to close datasource.");
              xSql.printStackTrace();
    }When I run the above class, this is the output:
    [0, 1]Good Luck,
    Avi.

  • [svn] 4619: Bug: BLZ-313 - HTTPProxyService throws null pointer when non-turnkey BlazeDS app is deployed to Tomcat 6 .0.16

    Revision: 4619
    Author: [email protected]
    Date: 2009-01-22 10:47:12 -0800 (Thu, 22 Jan 2009)
    Log Message:
    Bug: BLZ-313 - HTTPProxyService throws null pointer when non-turnkey BlazeDS app is deployed to Tomcat 6.0.16
    QA: Yes
    Doc: No
    Checkintests: Pass
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-313
    Modified Paths:
    blazeds/trunk/modules/proxy/src/flex/messaging/services/HTTPProxyService.java

    I submitted a bug, and this was fixed in the latest trunk
    version.

  • Fetch into object type

    Oracle 10.2.0.5.0
    Using Pl/SQL Developer
    Hi I'm new to collections, object types etc, so I aologize for any poor wording and missed concepts...
    I need to output a ref cursor from my package (for a summary report in SQL Server Reporting Services 2005). The summary report has two fields that come from the database table and 5 calculated fields. My idea for creating the ref cursor is as follows:
    1. Define an object type at the schema level
    2. Define a table (collection) type at the schema level
    3. Define a ref cursor at the package level
    4. Using dynamic SQL create a sql statement creating virtual columns for the 5 calculated fields
    5. Fetch cursor with dynamic sql into object type one record at a time
    6. Calculate the other five field values and update the object for each record processed
    7. Add the object 'record' to the table (collection) after each record is processed
    8. After the fetch is complete, convert the table to a ref cursor for returning to my application
    Here is what I have so far. I have cut out several of the calculated fields for simplicities sake. It is not complete and I don't know how to fetch the database row into the object, nor convert the collection to a ref cursor.
    Any help would be greatly appreciated.
    create or replace type dlyout.srvCtr_sum_rec_type as object (
                               zoneNo number,
                               zonetx varchar2(15),
                               distNo varchar2(4),
                               distTx varchar2(30),
                               numOccr number,
                               MEError varchar2(1));
    create or replace type dlyout.srvCtr_sum_tbl_of_recs is table of srvCtr_sum_rec_type;
    CREATE OR REPLACE PACKAGE DLYOUT.REPORTS_PKG is
      TYPE CUR IS REF CURSOR; 
    PROCEDURE testABC(startDate IN date,
                           endDate IN date,
                           startTime IN varchar2,
                           endTime IN varchar2,
                           zoneNo IN dlyout.loc.zone_no%type,
                           distNo IN dlyout.loc.dist_cd%type,
                           CUROUT OUT CUR);
    END;
    CREATE OR REPLACE PACKAGE BODY DLYOUT.REPORTS_PKG IS
      PROCEDURE testABC(startDate IN date,
                           endDate IN date,
                           startTime IN varchar2,
                           endTime IN varchar2,
                           zoneNo IN dlyout.loc.zone_no%type,
                           distNo IN dlyout.loc.dist_cd%type,
                           CUROUT OUT CUR) as
      startDateTimeStr varchar2(10) := to_Char(startDate, 'MM/DD/YYYY') ;     
      endDateTimeStr varchar2(10) := to_Char(endDate, 'MM/DD/YYYY');   
      startDateTime date := to_date(startDateTimeStr || ' ' || startTime, 'MM/DD/YYYY HH24:MI:SS');
      endDateTime date := to_date(endDateTimeStr|| ' ' || endTime, 'MM/DD/YYYY HH24:MI:SS');
      distClause varchar2(1000);
      sqls varchar2(2000);
      zoneClause varchar2(1000) :='';
      idx number :=0;
      curSrvCtr cur;
      srvCtrRec srvCtr_sum_rec_type;
      srvCtrTbl srvCtr_sum_tbl_of_recs :=srvCtr_sum_tbl_of_recs();
      BEGIN
        if zoneNo <> 9999 then
            zoneClause := ' and zone_no member of dlyout.reports_common_stuff_pkg.convert_to_collection(zoneNo)';
        end if;
        if distNo <> '9999' then
            distClause := ' and dist_cd member of dlyout.reports_common_stuff_pkg.convert_to_collection(distNo) ';
        end if;
        sqls := 'select distinct l.zone_no zoneNo, l.zone_tx zoneTx,
                l.dist_cd distCd , l.dist_tx distTx, 0 numOccr, '''' MEError       
                from dlyout.loc l
                where l.ts between  :startts and :endts ' ||
                zoneClause ||
                distClause ||
                ' order by l.zone_no, l.dist_tx ';
        open curSrvCtr for sqls using  startDateTime, endDateTime;
        LOOP
          FETCH curSrvCtr INTO srvCtrRec;      --ORA:00932 inconsistent datatype expected - got -
          EXIT WHEN curSrvCtr%NOTFOUND;
            --call other functions to get calculated fields
            srvCtrRec.numOccr := dlyout.reports_common_stuff_pkg.Num_Loc_Exc_Mom(startDateTimeStr, endDateTimeStr, starttime, endTime, srvctrRec.distno);
            srvCtrRec.MEError := dlyout.reports_common_stuff_pkg.ME_Error(startDateTimeStr, endDateTimeStr, starttime, endTime, srvCtrRec.distNo, null);
            dbms_output.put_line(srvCtrRec.distTx || ' ' || srvCtrRec.numoccr|| ' ' || srvCtrRec.MEError);
         end loop;
    end testABC;
    END;
      Then I need to add the object to the table. Something like this?
           -- add object 'record' to table
           srvCtrTbl.extend;
           srvCtrTbl.last := srvCtrRec;
    Then I am not sure how to do the cast to get the table to a ref cursor. Something like this?
    open curout for SELECT *
    FROM TABLE (CAST (srvCtrTbl AS srvCtr_sum_tbl_of_recs))
    ORDER BY zoneNo, distTx;

    Ok, so after more research if seems that in 10.2 you cannot assign an object (SQL) type to a ref cursor (PLSQL). SO i changed my direction and used a global temp table - created at the schema level.
    Create global temporary table dlyout.srvCtr_summary (
                               zoneNo number,
                               zonetx varchar2(15),
                               distNo varchar2(4),
                               distTx varchar2(30),
                               numOccr number,
                               MEError varchar2(1)
    ) on commit delete rows;Here is what the procedure looks like now.
    PROCEDURE testABC(startDate IN date,
                           endDate IN date,
                           startTime IN varchar2,
                           endTime IN varchar2,
                           zoneNo IN dlyout.location.zone_no%type,
                           distNo IN dlyout.location.dist_cd%type,
                           CUROUT OUT CUR) as
      startDateTimeStr varchar2(10) := to_Char(startDate, 'MM/DD/YYYY') ;     
      endDateTimeStr varchar2(10) := to_Char(endDate, 'MM/DD/YYYY');   
      startDateTime date := to_date(startDateTimeStr || ' ' || startTime, 'MM/DD/YYYY HH24:MI:SS');
      endDateTime date := to_date(endDateTimeStr|| ' ' || endTime, 'MM/DD/YYYY HH24:MI:SS');
      distClause varchar2(1000);
      sqls varchar2(2000);
      zoneClause varchar2(1000) :='';
      curSrvCtr cur;
    --Still need the PLSQL record type to put in the cursor for the dynamic SQL
    type srvCtr_sum_rec_type is record (zoneNo dlyout.location.zone_no%type,
                               zonetx dlyout.location.zone_tx%type,
                               distNo dlyout.location.dist_cd%type,
                               distTx dlyout.location.dist_tx%type,
                               numOccr number,
                               MEError varchar2(1));
      srvCtrRec srvCtr_sum_rec_type;
      BEGIN
        --create clauses for dynamic sql by calling other functions
        if zoneNo <> 9999 then
            zoneClause := ' and zone_no member of dlyout.reports_common_stuff_pkg.convert_to_collection(zoneNo)';
        end if;
        if distNo <> '9999' then
            distClause := ' and dist_cd member of dlyout.reports_common_stuff_pkg.convert_to_collection(distNo) ';
        end if;
        --here is the dynamic sql
        sqls := 'select distinct l.zone_no, l.zone_tx,
                l.dist_cd , l.dist_tx, 0, 0,
                0, 0, ''''       
                from dlyout.location l
                where l.enrgz_ts between  :startts and :endts ' ||
                zoneClause ||
                distClause ||
                ' order by l.zone_no, l.dist_tx ';
       open curSrvCtr for sqls using  startDateTime, endDateTime;
        LOOP
          --fetch in part of the record
          FETCH curSrvCtr INTO srvCtrRec;
          EXIT WHEN curSrvCtr%NOTFOUND;
          --do the calculations to get the other field values
            srvCtrRec.numOccr := dlyout.reports_common_stuff_pkg.Num_Loc_Exc_Mom(startDateTimeStr, endDateTimeStr, starttime, endTime, srvctrRec.distno);
             srvCtrRec.MEError := dlyout.reports_common_stuff_pkg.MEC_Error(startDateTimeStr, endDateTimeStr, starttime, endTime, srvCtrRec.distNo, null);
            dbms_output.put_line(srvCtrRec.distTx || ' ' || srvCtrRec.numoccr|| ' ' || srvCtrRec.MEError);
            --add record to GTT
            insert into dlyout.srvCtr_summary(zoneNo, zoneTx, distNo, distTX, numOccr, MEError )
            values(srvCtrRec.zoneNo, srvCtrRec.zoneTx, srvCtrRec.distNo, srvCtrRec.distTX, srvCtrRec.numOccr, srvCtrRec.MEError);
        end loop;
       --open GTT and return ref cursor to app
       open curout for SELECT *
           FROM srvCtr_summary
           ORDER BY zoneNo, distTx;
      end testABC;

  • Null Pointer when hiding view attribute

    Hi,
    Attached is my override of doDML of table media. The view object contains fields from tables media and idn. The primary key to both, and the link field is called udid. I try to hide the media.udid but I get a null pointer error.
    Do these line (also below) need the primary key of the media table (the table whose doDML the code is located)?
    EntityDefImpl home = IdnImpl.getDefinitionObject();
    IdnImpl idn = (IdnImpl)home.findByPrimaryKey(getDBTransaction(),getPrimaryKey());
    The point of the above code is to grab another field I need for a procedure(from table IDN). When I comment these lines out the error goes away. Procedure doesn't work, but it runs. It seems weird I know to go to another table to capture udid as you can see below, even though it's available to this table instance. The reason I did that (and chose to hide media.udid) is to have a primary key available to table IDN, so as to grab the other field I need (min_val).
    ANy thoughts? I haven't hid a view attribute before..
    Thanks.
    protected void doDML(int operation, TransactionEvent e)
    //super.doDML(operation, e);
    switch(operation)
    case DML_INSERT: {
    CallableStatement st = null;
    EntityDefImpl home[i]Long postings are being truncated to ~1 kB at this time.

    protected void doDML(int operation, TransactionEvent e)
    //super.doDML(operation, e);
    switch(operation)
    case DML_INSERT: {
    CallableStatement st = null;
    EntityDefImpl home = IdnImpl.getDefinitionObject();
    IdnImpl idn = (IdnImpl)home.findByPrimaryKey(getDBTransaction(),getPrimaryKey());
    String min_val = idn.getMinVal();
    Number udid = idn.getUdid();
    try
    String stmt = "BEGIN DA_YAMS.MED_INS(?,?); END;";
    DBTransaction tr = getDBTransaction();
    st = tr.createCallableStatement(stmt,1);
    st.setInt(1,udid.intValue());
    st.setString(2,getFileName());
    st.executeUpdate();
    stmt = "BEGIN DA_YAMS.IDN_INS(?,?);END;";
    DBTransaction idn_tr = getDBTransaction();
    st = idn_tr.createCallableStatement(stmt,1);
    st.setInt(1,udid.intValue());
    st.setString(2,min_val);
    st.executeUpdate();
    catch (SQLException s)
    throw new JboException(s);

  • Null pointer when trying to initialise speech recognition

    Hi all,
    I am attempting to utilise the JSAPI for a project for display at my Uni that utilises freeTTS and also some Java speech recognition. Through the tutorials online (such as the Hello World) I have built my speech recognizer but as I try to allocate() for the speech recogniser the program gives me a null pointer.
    The grammar file that I load into the file reader exists and I do not get a file not found exception. Can anyone see a blindingly obvious error that I am missing?
    Code below. The rec.allocate() (third line after the try... is where i am getting my null pointer from.
    Cheers
    Mark
    public BigEars(SpeakEasy gui){
              mainGui = gui;
              try {
                   EngineModeDesc desk = new EngineModeDesc(Locale.ENGLISH);
                   rec = Central.createRecognizer(desk);
                   rec.allocate();
                   FileReader reader = new FileReader("speechRecog/grammar.txt");
                   RuleGrammar rules = rec.loadJSGF(reader);
                   rules.setEnabled(true);
                   rec.addResultListener(this);
                   rec.commitChanges();
                   rec.requestFocus();
                   rec.resume();
              catch (Exception e) {
                   message("There is a problem with this code.");
                   e.printStackTrace();
         

    Hi dheeraj_chd,
    I never got a reply to this so to move forward I actually incorporated the Sphinx4 speech recognition program into my project. I do not know if this is any help to you but I got it up and running OK with it.
    http://cmusphinx.sourceforge.net/sphinx4/
    I hope this helps. It does dramatically increase the size of the application you are writing but at least it works!
    Cheers
    Mark

  • SQL ... varray / object types

    use 8i
    I have a problem with VARRAYS.
    With the following script there is an error when creating the VArray ->
    TypVa_STUDENT .
    "Type created with compilation errors" (Oracle SQLPlus)
    I can't explain why.
    Could it be that with the Type Typ_STUDENT the attribute COURSE already is a
    type
    which doesn't allow the VArray TypVa_STUDENT to be created
    B.B.
    Matthias
    create type Typ_COURSE as object
    MARK varchar2(200) ,
    SECTION varchar2(200) ,
    COURSENAME varchar2(200)
    create type TypVa_COURSE as
    varray(10) of Typ_COURSE ;
    create type Typ_STUDENT as object
    FNAME varchar2(200) ,
    LNAME varchar2(200) ,
    COURSE TypVa_COURSE
    create type TypVa_STUDENT as
    varray(10) of Typ_STUDENT ;
    create table tblREPORTCARD
    STUDENT TypVa_STUDENT
    null

    You can not include another varray in varray type. It will generate an error
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Matthias ([email protected]):
    use 8i
    I have a problem with VARRAYS.
    With the following script there is an error when creating the VArray ->
    TypVa_STUDENT .
    "Type created with compilation errors" (Oracle SQLPlus)
    I can't explain why.
    Could it be that with the Type Typ_STUDENT the attribute COURSE already is a
    type
    which doesn't allow the VArray TypVa_STUDENT to be created
    B.B.
    Matthias
    create type Typ_COURSE as object
    MARK varchar2(200) ,
    SECTION varchar2(200) ,
    COURSENAME varchar2(200)
    create type TypVa_COURSE as
    varray(10) of Typ_COURSE ;
    create type Typ_STUDENT as object
    FNAME varchar2(200) ,
    LNAME varchar2(200) ,
    COURSE TypVa_COURSE
    create type TypVa_STUDENT as
    varray(10) of Typ_STUDENT ;
    create table tblREPORTCARD
    STUDENT TypVa_STUDENT
    <HR></BLOCKQUOTE>
    null

  • Null Pointer Exception in CO of type Webdynpro ABAP

    Hi Friends,
    I am getting an Error in creating a callable object of type Webdynpro ABAP,
    The ABAP webdynpro application is working fine individually, but while creating a callable object of the same type, I get the following error,
    (This happens when I click on <b>'Search'</b> button after putting the wd app name)
    <i><b>The initial exception that caused the request to fail, was:
       com.sap.mw.jco.JCO$Exception: (127) JCO_ERROR_FIELD_NOT_FOUND: Field LANGU not a member of INPUT
        at com.sap.mw.jco.JCO$MetaData.indexOf(JCO.java:9372)
        at com.sap.mw.jco.JCO$Record.setValue(JCO.java:14778)
        at com.sap.caf.eu.gp.model.connect.rfc.abapwd.impl.ABAPWDAppManager.getAppInfo(ABAPWDAppManager.java:54)
        at com.sap.caf.eu.gp.ui.co.config.abapwd.VSelect.getApplicationData(VSelect.java:493)
        at com.sap.caf.eu.gp.ui.co.config.abapwd.VSelect.onActionSearch(VSelect.java:438)</b></i>
    Do somebody has any idea about the problem?
    Thanks in advance,
    Deepak.

    Please send us the CreateEmployees.java. It seem the problem is in the way you using the generated java classes.

  • Please provide real time scenario for when we use object type in PL/SQL.

    Hi Experts,
    When we use this kind of code in PL/SQL block.
    CREATE OR REPLACE TYPE sample_object IS OBJECT
    (id       NUMBER
    ,name     VARCHAR2(30));
    CREATE OR REPLACE TYPE sample_table IS TABLE OF sample_object;I have read some docs ,but I didn't get any information where exactly we use this.
    Please provide one real time scenario with an example.
    How this is different from record.
    Thanks in advance.

    Hi,
    For an example please have a look at this....
    CREATE OR REPLACE TYPE FML_DAT_ITEMS_OBJ AS OBJECT
                      (F_NAME VARCHAR2 (20), L_NAME VARCHAR2 (20));
    CREATE OR REPLACE TYPE FML_DAT_ITEMS_FTAB AS TABLE OF FML_DAT_ITEMS_OBJ;
    CREATE OR REPLACE FUNCTION GET_FML_ITEMS_DAT (PFML_NR IN NUMBER)
       RETURN FML_DAT_ITEMS_FTAB
       PIPELINED
    AS
       OUT_REC   FML_DAT_ITEMS_OBJ;
    BEGIN
       SELECT FML_DAT_ITEMS_OBJ ('peter', 'zwan') INTO OUT_REC FROM DUAL;
       FOR I IN 1 .. PFML_NR
       LOOP
          PIPE ROW (OUT_REC);
       END LOOP;
    END GET_FML_ITEMS_DAT;To view the o/p:
    SELECT * FROM TABLE (get_fml_items_dat (5));
    F_NAME, L_NAME
    peter,zwan
    peter,zwan
    peter,zwan
    peter,zwan
    peter,zwan Refer these links to know more about the topic...
    http://www.oracle-developer.net/display.php?id=207
    http://www.oracle-base.com/articles/misc/pipelined-table-functions.php

  • Is there a switch for 'FORCE' when creating object type?

    Where is the property to indicate whether or not to include the keyword FORCE when creating an object type?

    Thanks, the support that SDDM provides for Object Types is much better than Oracle Designer. I am looking forward to the release where we can flag a method's parameter as 'DEFAULT NULL' and especially the ability to include an inherited or included attribute as part of the primary key or the primary key. With the last release where the method body is stubbed out with 'BEGIN NULL; END;' really provided the basic ability for rapid prototyping. Once the key 'FORCE' is in place, the ability to rapid prototype will become even more functional.

  • Note correction Instructions point towards object type FUGR / REPS

    Folks
    While looking at Correction Instructions for a note, its pointing to changes in Object Type FUGR, REPS
    I am familiar with Object Type Class and methods and how to navigate to them but am unfamiliar on how to check the Object Type FUGR, REPS and the corrections made to them.
    Is there any standard T-code or process to check the Object Type FUGR, REPS ?
    Thanks

    Further to above ;
    SAP systems record all changes made in the system in transport requests. There are different types of transport objects, depending on the type of change. Each transport object consists of three pieces of information:
    ·        Program ID
    ·        Object type
    ·        Object name
    Program ID can be R3TR, LIMU, or LANG. R3TR is a group of objects, and LIMU is a subobject of a larger object. This means, for example, that R3TR PROG RSPFPAR is the transport of the program RSPFPAR with all its information (source code, text elements, properties, ...), while LIMU REPT RSPFPAR describes the text elements of this program.
    The complete object R3TR PROG includes the following subobjects, among others:
    LIMU REPS
    LIMU REPT
    LIMU DYNP.
    Also REPS stands for Report Source Code
    Manish

  • Crystal report (crystalReportsViewer) crash with null pointer exception

    Hi,
    My application are simple : m_crystalReportsViewer.ViewerCore.ReportSource = report; but in throw exception null pointer when I call showDialog.
    I see in code, we have method ShowTabHeader.
    private void ShowTabHeader(bool isShow)
        Grid child = VisualTreeHelper.GetChild(this.tabViews, 0) as Grid;
        TabPanel panel = child.FindName("HeaderPanel") as TabPanel;
        if (!isShow)
            panel.Visibility = Visibility.Collapsed;
        else
            panel.Visibility = Visibility.Visible;
    My problem :  child.FindName("HeaderPanel") as TabPanel return null
    =>  if (!isShow)
            panel.Visibility = Visibility.Collapsed;
        else
            panel.Visibility = Visibility.Visible;
    throws null pointer exception.
    Do you have any idea about this?
    Thanks.
    Here is stack trace :
    Unerwarteter Fehler im System ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at SAPBusinessObjects.WPF.Viewer.ReportAlbum.ShowTabHeader(Boolean isShow)
       at SAPBusinessObjects.WPF.Viewer.ReportAlbum.ItemsChangedEventHandler(Object sender, ItemsChangedEventArgs e)
       at System.Windows.Controls.Primitives.ItemsChangedEventHandler.Invoke(Object sender, ItemsChangedEventArgs e)
       at System.Windows.Controls.ItemContainerGenerator.OnItemAdded(Object item, Int32 index)
       at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Windows.Controls.ItemContainerGenerator.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
       at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
       at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
       at System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
       at System.Collections.ObjectModel.Collection`1.Add(T item)
       at SAPBusinessObjects.WPF.Viewer.ReportAlbum.OnCreateNewDocumentViewComplete(CreateNewDocumentArgs args)
       at SAPBusinessObjects.WPF.Viewer.DelegateMarshaler.<>c__DisplayClass6`1.<Invoke>b__4(Object )
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       --- End of inner exception stack trace ---
    Edited by: duyhai707 on Jul 13, 2011 7:42 PM
    Edited by: duyhai707 on Jul 13, 2011 8:09 PM

    A lot I don't understand in here... actually, I don't understand anything in your post:
    When you call ShowDialog, what exactly are you trying to show?  The code is the decompiled showtabheader method of the viewer. So, are you trying to override the viewer control and reportalbum?  My guess is that the null reference is for the reportalbum's child object which is not the reportalbum object of the viewer.  I don't understand why the code since its all handled internally to the viewer anyhow.
    Perhaps searching the forum for code sample will help?
    Also, see the [WPF Demo|http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/a09f7025-0629-2d10-d7ae-df006a51d1a8]
    Other good WPF resources to consult:
    http://www.redmondpie.com/incorporate-crystal-reports-in-a-c-wpf-application/
    http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/a09f7025-0629-2d10-d7ae-df006a51d1a8
    http://www.codeproject.com/Tips/74499/Crystal-Report-in-WPF.aspx
    Re: Crystal Reports for Visual Studio 2010 - WPF Viewer for .Net 4.0
    http://codegain.com/articles/crystalreports/howto/incorporate-crystal-reports-in-wpf-using-c-sharp.aspx
    CRVS2010 Beta - WPF Viewer, how to hide the GroupTree control?
    Re: CRVS2010 Beta - WPF Viewer, how to hide the GroupTree control?
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Null Pointer Exception Error's in WebDynpro Java

    Hi All,
    How Types are coming Null Pointer Exception Error's in WebDynpro Java, Please provide the types.of Errors.
    Ex. Cardinality Type not correct etc...
    Thanks,
    Bye,
    Vijay Hari.

    HI
      Null Pointer Exception can occur in may instances , for suppose
      1) when  you create a Value Node with some attribute which has cardinality , and you have not
      initialized the Node , then it would through  Null Pointer exception ,
      2) when you integrate the RFC and parameters you pass as input to the RFC are not set correctly
          then there could be null pointer when you execute the RFC
      3>or may be when you doesnot bind the node when using webservice then there could be null pointer exception
    and there could be many occurances  for the exception

  • Object Types Attributes (Data Modeler 3.0 EA1.)

    Hi,
    Will the attribute object type support in data modeler be upgraded to the same functionality as column relational table support in 3.0? For relational columns I can attach a domain to a column, I can't attach a domain to an attribute in an object type. Also for a column I can define a 'Units', that is VARCHAR2 (30 BYTE) orVARCHAR2 (30 CHAR). If can't do this with the (Data Modeler 3.0 EA1.) for an object type's attribute. Will this be included?
    Thanks,
    Scott

    Sue,
    Thanks to you and your team for extending this to the object type (structured type) portion of SDDM 3.3 EA1 and 3.3 EA2. The object type portion of SDDM is pretty robust now for modeling and actually generating useable structures in the database (Oracle) now. With 3.3 EA2 at this point it will be much easier to take advantage of the object type features in the database and our applications. I have been waiting since Oracle version 8 for the tools team to provide a modeling tool that mirrors the functionality the server team has provided when it comes object types.
    Thanks for this in SDDM 3.3 EA1 and SDDM 3.3 EA2!
    ScottK

  • Problem in fetching varray of Object type

    Below are the code,
    where am calling an procedure which returns me Varray of object type test_obj(id number, name varchar2);
    Am facing an problem in get the object(test_obj) from ARRAY object
    the exception is java.lang.ClassCastException: java.lang.Object
    at line number No 12..
    Can anyone suggest me How handle this...
    1. STRUCT test_objStruct ;
    2. ARRAY test_arr;
    3. OracleCallableStatement cs = (OracleCallableStatement)
    4. con.prepareCall("{call test_data(?)}");
    5. cs.registerOutParameter(1,oracle.jdbc.driver.OracleTypes.ARRAY,"TEST_ARR");
    6. cs.execute();
    7. test_arr = (ARRAY)cs.getObject(1);
    8.System.out.println("array varible "+test_arr.getBaseTypeName());
    9. System.out.println("length "+test_arr.length());
    10. Map map = (Map)con.getTypeMap();
    11. map.put("TEST_OBJ", Class.forName("oracle.sql.STRUCT"));
    12. test_objStruct = (STRUCT)test_arr.getArray(1,1);
    13.Object country_attrs[] = test_objStruct.getAttributes();
    14.System.out.println ("ID: " country_attrs[0]);
    15.System.out.println ("Name: " +country_attrs[1]);
    the output is..
    array varible TEST_OBJ
    length 106
    Error java.lang.ClassCastException: java.lang.Object

    Hi,
    The error occurs on line 12, the first time through the loop, when you try to execute:
    vClient(iCounter).ename_obj:=i.ename;
    At that point, vClient (1) is not an Employee object; it's NULL.
    Try this:
    DECLARE
        TYPE tvrEmploy IS VARRAY(10) OF Employee;
        vClient    tvrEmploy;
        iCounter   integer := 1;
        CURSOR client_cursor IS
            SELECT  ename, sal
            ,       empno                                                 -- ADDED
       FROM    scott.emp
       WHERE   rownum < 11;
    BEGIN
        vClient := tvrEmploy (null,null,null,null,null,null,null,null,null,null) ;  
        FOR i IN client_cursor LOOP
            vClient (iCounter) := Employee (i.ename, i.empno, i.sal);     -- CHANGED
            iCounter := iCounter + 1;
       END LOOP;
    FOR I IN REVERSE 1..10 LOOP
           dbms_output.put_line(to_char(I) ||' '|| vClient(I).ename_obj ||' '|| vClient(I).empno_obj ||' '||
          vClient(I).sal_obj);
       END LOOP;
    END ;

Maybe you are looking for