SQL Developer bug? It does not return DATEs if database is only MOUNTED

I'm logging into a mounted database as SYS to check on things using the V$ views, but any query I do involving DATEs never returns any data. If I remove the DATE column, the query works fine. If the database is OPEN, the query works fine with the DATEs. This is a bit of a problem when I want to check on standby databases for example. Is this the way it's supposed to work?
Help!

The original thread appeared to have gone nowhere, so I raised the issue again. If I have violated forum rules, please forgive me.
I have a choice of using either TOAD or SQL Developer at the site that I have just started at, and I have not used either much. I was leaning towards SQL Developer as its price to functionality ratio is very attractive. However, this issue of not working with a mounted database is a show stopper for me for SQL Developer as I prefer to use a single tool that handles all of the DBA work that I do. So far, TOAD does, and SQL Developer does not.

Similar Messages

  • SQL Developer tool sometimes does not display data with date type

    run the following query using the sql developer tool -
    select effective_date from table1 where id = 123;
    (the effective_date is stored in the database as date.)
    one record is returned with no date in the filed.
    However, if I change the query to
    select to_char(effective_date, 'mm/dd/yyyy') from table1 where id = 123;
    one record is returned with effective date.
    Why?
    Thanks for your help.

    First off, there is a dedicated SQL Developer forum where lots of the developers hang out. Those folks are way more knowledgable that we are about the tool.
    That said, I have no problem displaying dates. Do you just have a problem with this particular query/ field/ table? Or does it affect all dates? What version of SQL Developer are you using? 1.1 is out now.
    Justin

  • Query on SQL Developer Connections Tree Does Not Display Objects

    Hi Gurus, Could you please clarify on the below. As per the note ID 1458753.1, SQL Developer Connections Tree Does Not Display Objects to user in order to access database objects outside the owned schema/account. ------------------------- By default, and without granting wide privileges such as DBA, a user will only see his or her own objects in the first level object nodes under their connection.  Objects in other schemas must be accessed via the Other Users node under the connection. This is the intended functionality/display in SQL Developer. ------------------------- Is there any other way we can achieve this? Requirement is very common - user A owns all objects and user B granted read/read-write privileges on user A objects. Now user B wants to Display user A objects in the corresponding objects node of SQL developer. Could any one shed some light here? Thanks Venu

    First off, there is a dedicated SQL Developer forum where lots of the developers hang out. Those folks are way more knowledgable that we are about the tool.
    That said, I have no problem displaying dates. Do you just have a problem with this particular query/ field/ table? Or does it affect all dates? What version of SQL Developer are you using? 1.1 is out now.
    Justin

  • 0EC_PCA_3 does not return data in RSA3 if the target system is entered

    Hello all,
    Datasource 0EC_PCA_3 is not transferring data to the BW 7.0 system. In the ECC 6.0 system datasource 0EC_PCA_3 does not return data in RSA3 if the target system (BWDCLNT100) is entered in the selection fields. When omitting the target system all expected data is returned.
    Datasource 0EC_PCA_1 works fine for the same target system.
    There is one thread dealing with the same problem but the person does not provide the solution he found.
    Does anyone know what the issue is?
    Regards and thanks,
    József.

    The problem was solved by removing the datasource in both BW and R/3 and activating everything from scratch again. We didn't find out what was the cause of the problem, but at least it is working now.

  • SQL Developer table editor does not show anything (no columns, no data,...)

    Hi, I upgraded SQL developer yesterday to the latest version. Now I don't see anything any more in the datagrid, columns, constraints, etc ...
    Connection is OK, in the explorer (to the left) I see tables and columns, in the datagrid (table properties) I don't see anything.
    Here is the contents of the about box
    Many thanks
    About
    Oracle SQL Developer 2.1.1.64
    Version 2.1.1.64
    Build MAIN-64.45
    Copyright © 2005,2009 Oracle. All Rights Reserved.
    IDE Version: 11.1.1.2.36.55.30
    Product ID: oracle.sqldeveloper
    Product Version: 11.1.1.64.45
    Version
    Component     Version
    =========     =======
    Java(TM) Platform     1.6.0_20
    Oracle IDE     2.1.1.64.45
    Versioning Support     2.1.1.64.45
    Properties
    Name     Value
    ====     =====
    awt.toolkit     sun.awt.windows.WToolkit
    class.load.environment     oracle.ide.boot.IdeClassLoadEnvironment
    class.load.log.level     CONFIG
    class.transfer     delegate
    file.encoding     Cp1252
    file.encoding.pkg     sun.io
    file.separator     \
    ice.browser.forcegc     false
    ice.pilots.html4.ignoreNonGenericFonts     true
    ice.pilots.html4.tileOptThreshold     0
    ide.AssertTracingDisabled     true
    ide.bootstrap.start     8627304444140
    ide.build     MAIN-64.45
    ide.conf     C:\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
    ide.config_pathname     C:\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
    ide.debugbuild     false
    ide.devbuild     false
    ide.extension.search.path     sqldeveloper/extensions:jdev/extensions:ide/extensions
    ide.firstrun     true
    ide.java.minversion     1.6.0_04
    ide.launcherProcessId     5928
    ide.main.class     oracle.ide.boot.IdeLauncher
    ide.patches.dir     ide/lib/patches
    ide.pref.dir     C:\Users\johkene\AppData\Roaming\SQL Developer
    ide.pref.dir.base     C:\Users\johkene\AppData\Roaming
    ide.product     oracle.sqldeveloper
    ide.shell.enableFileTypeAssociation     C:\sqldeveloper\sqldeveloper.exe
    ide.splash.screen     splash.gif
    ide.startingArg0     C:\sqldeveloper\sqldeveloper.exe
    ide.startingcwd     C:\sqldeveloper
    ide.user.dir     C:\Users\johkene\AppData\Roaming\SQL Developer
    ide.user.dir.var     IDE_USER_DIR
    ide.work.dir     C:\Users\johkene\Documents\SQL Developer
    ide.work.dir.base     C:\Users\johkene\Documents
    java.awt.graphicsenv     sun.awt.Win32GraphicsEnvironment
    java.awt.printerjob     sun.awt.windows.WPrinterJob
    java.class.path     ..\..\ide\lib\ide-boot.jar
    java.class.version     50.0
    java.endorsed.dirs     C:\Program Files\Java\jdk1.6.0_20\jre\lib\endorsed
    java.ext.dirs     C:\Program Files\Java\jdk1.6.0_20\jre\lib\ext;C:\Windows\Sun\Java\lib\ext
    java.home     C:\Program Files\Java\jdk1.6.0_20\jre
    java.io.tmpdir     C:\Users\johkene\AppData\Local\Temp\
    java.library.path     C:\sqldeveloper;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\Wave Systems Corp\Gemalto\Access Client\v5\;C:\Program Files\Gemplus\GemSafe Libraries\BIN;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;C:\Sybase\DLL;C:\Sybase\BIN;C:\Program Files\Sybase\Shared\PowerBuilder\;C:\Program Files\Java\jdk1.6.0_12\bin;C:\apache-maven-2.0.10\bin;C:\Program Files\Liquid Technologies\Liquid XML Studio 2009\XmlDataBinder7\Redist7\cpp\win32\bin;C:\PROGRA~1\ATT\Graphviz\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Belgium Identity Card;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\Research In Motion\BlackBerry Theme Studio 5.0\bin;C:\Program Files\CVSNT\
    java.naming.factory.initial     oracle.javatools.jndi.LocalInitialContextFactory
    java.runtime.name     Java(TM) SE Runtime Environment
    java.runtime.version     1.6.0_20-b02
    java.specification.name     Java Platform API Specification
    java.specification.vendor     Sun Microsystems Inc.
    java.specification.version     1.6
    java.util.logging.config.file     logging.conf
    java.vendor     Sun Microsystems Inc.
    java.vendor.url     http://java.sun.com/
    java.vendor.url.bug     http://java.sun.com/cgi-bin/bugreport.cgi
    java.version     1.6.0_20
    java.vm.info     mixed mode, sharing
    java.vm.name     Java HotSpot(TM) Client VM
    java.vm.specification.name     Java Virtual Machine Specification
    java.vm.specification.vendor     Sun Microsystems Inc.
    java.vm.specification.version     1.0
    java.vm.vendor     Sun Microsystems Inc.
    java.vm.version     16.3-b01
    jdbc.library     /C:/sqldeveloper/jdbc/lib/ojdbc5.jar
    line.separator     \r\n
    oracle.home     C:\sqldeveloper
    oracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG     true
    oracle.jdbc.Trace     true
    oracle.translated.locales     de,es,fr,it,ja,ko,pt_BR,zh_CN,zh_TW
    oracle.xdkjava.compatibility.version     9.0.4
    orai18n.library     /C:/sqldeveloper/jlib/orai18n.jar
    os.arch     x86
    os.name     Windows Vista
    os.version     6.0
    path.separator     ;
    reserved_filenames     con,aux,prn,lpt1,lpt2,lpt3,lpt4,lpt5,lpt6,lpt7,lpt8,lpt9,com1,com2,com3,com4,com5,com6,com7,com8,com9,conin$,conout,conout$
    sqldev.debug     false
    sun.arch.data.model     32
    sun.boot.class.path     C:\Program Files\Java\jdk1.6.0_20\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_20\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_20\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.6.0_20\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_20\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_20\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_20\jre\classes
    sun.boot.library.path     C:\Program Files\Java\jdk1.6.0_20\jre\bin
    sun.cpu.endian     little
    sun.cpu.isalist     pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
    sun.desktop     windows
    sun.io.unicode.encoding     UnicodeLittle
    sun.java2d.ddoffscreen     false
    sun.jnu.encoding     Cp1252
    sun.management.compiler     HotSpot Client Compiler
    sun.os.patch.level     Service Pack 2
    svnkit.sax.useDefault     true
    user.country     BE
    user.dir     C:\sqldeveloper\sqldeveloper\bin
    user.home     C:\Users\johkene
    user.language     nl
    user.name     JOHKENE
    user.timezone     Europe/Paris
    user.variant     
    windows.shell.font.languages     
    Extensions
    Name     Identifier     Version     Status
    ====     ==========     =======     ======
    Check For Updates     oracle.ide.webupdate     11.1.1.2.36.55.30     Loaded
    Code Editor     oracle.ide.ceditor     11.1.1.2.36.55.30     Loaded
    Database Connection Support     oracle.jdeveloper.db.connection     11.1.1.2.36.55.30     Loaded
    Database Object Explorers     oracle.ide.db.explorer     11.1.1.2.36.55.30     Loaded
    Database UI     oracle.ide.db     11.1.1.2.36.55.30     Loaded
    Diff/Merge     oracle.ide.diffmerge     11.1.1.2.36.55.30     Loaded
    Extended IDE Platform     oracle.javacore     11.1.1.2.36.55.30     Loaded
    External Tools     oracle.ide.externaltools     11.1.1.2.36.55.30     Loaded
    File Support     oracle.ide.files     11.1.1.2.36.55.30     Loaded
    File System Navigator     oracle.sqldeveloper.filenavigator     11.1.1.64.45     Loaded
    Help System     oracle.ide.help     11.1.1.2.36.55.30     Loaded
    History Support     oracle.jdeveloper.history     11.1.1.2.36.55.30     Loaded
    Import/Export Support     oracle.ide.importexport     11.1.1.2.36.55.30     Loaded
    Index Migrator support     oracle.ideimpl.indexing-migrator     11.1.1.2.36.55.30     Loaded
    JDeveloper Runner     oracle.jdeveloper.runner     11.1.1.2.36.55.30     Loaded
    Log Window     oracle.ide.log     11.1.1.2.36.55.30     Loaded
    Mac OS X Adapter     oracle.ideimpl.apple     11.1.1.2.36.55.30     Loaded
    Navigator     oracle.ide.navigator     11.1.1.2.36.55.30     Loaded
    Object Gallery     oracle.ide.gallery     11.1.1.2.36.55.30     Loaded
    Object Viewer     oracle.sqldeveloper.oviewer     11.1.1.64.45     Loaded
    Oracle Data Modeler Reports     oracle.sqldeveloper.datamodeler_reports     11.1.1.64.45     Loaded
    Oracle Database Browser     oracle.sqldeveloper.thirdparty.browsers     11.1.1.64.45     Loaded
    Oracle IDE     oracle.ide     11.1.1.2.36.55.30     Loaded
    Oracle SQL Developer     oracle.sqldeveloper     11.1.1.64.45     Loaded
    Oracle SQL Developer Data Modeler Viewer     oracle.datamodeler     2.0.0.584     Loaded
    Oracle SQL Developer Extras     oracle.sqldeveloper.extras     1.1.1.64.45     Loaded
    Oracle SQL Developer Migrations     oracle.sqldeveloper.migration     11.1.1.64.45     Loaded
    Oracle SQL Developer Migrations - Antlr3 Translation Core     oracle.sqldeveloper.migration.translation.core_antlr3     11.1.1.64.45     Loaded
    Oracle SQL Developer Migrations - DB2     oracle.sqldeveloper.migration.db2     11.1.1.64.45     Loaded
    Oracle SQL Developer Migrations - Microsoft Access     oracle.sqldeveloper.migration.msaccess     11.1.1.64.45     Loaded
    Oracle SQL Developer Migrations - MySQL     oracle.sqldeveloper.migration.mysql     11.1.1.64.45     Loaded
    Oracle SQL Developer Migrations - SQLServer     oracle.sqldeveloper.migration.sqlserver     11.1.1.64.45     Loaded
    Oracle SQL Developer Migrations - Sybase     oracle.sqldeveloper.migration.sybase     11.1.1.64.45     Loaded
    Oracle SQL Developer Migrations - Teradata     oracle.sqldeveloper.migration.teradata     11.1.1.64.45     Loaded
    Oracle SQL Developer Migrations - Translation Core     oracle.sqldeveloper.migration.translation.core     11.1.1.64.45     Loaded
    Oracle SQL Developer Migrations - Translation Db2     oracle.sqldeveloper.migration.translation.db2     11.1.1.64.45     Loaded
    Oracle SQL Developer Migrations - Translation UI     oracle.sqldeveloper.migration.translation.gui     11.1.1.64.45     Loaded
    Oracle SQL Developer Reports     oracle.sqldeveloper.report     11.1.1.64.45     Loaded
    Oracle SQL Developer SearchBar     oracle.sqldeveloper.searchbar     11.1.1.64.45     Loaded
    Oracle SQL Developer TimesTen     oracle.sqldeveloper.timesten     2.0.0.64.45     Loaded
    Oracle SQL Developer Unit Test     oracle.sqldeveloper.unit_test     11.1.1.64.45     Loaded
    Oracle SQL Developer Worksheet     oracle.sqldeveloper.worksheet     11.1.1.64.45     Loaded
    Oracle XML Schema Support     oracle.sqldeveloper.xmlschema     11.1.1.64.45     Loaded
    PROBE Debugger     oracle.jdeveloper.db.debug.probe     11.1.1.2.36.55.30     Loaded
    Peek     oracle.ide.peek     11.1.1.2.36.55.30     Loaded
    Persistent Storage     oracle.ide.persistence     11.1.1.2.36.55.30     Loaded
    QuickDiff     oracle.ide.quickdiff     11.1.1.2.36.55.30     Loaded
    Replace With     oracle.ide.replace     11.1.1.2.36.55.30     Loaded
    Runner     oracle.ide.runner     11.1.1.2.36.55.30     Loaded
    Snippet Window     oracle.sqldeveloper.snippet     11.1.1.64.45     Loaded
    Sql Monitoring Project     oracle.sqldeveloper.sqlmonitor     11.1.1.64.45     Loaded
    Tuning     oracle.sqldeveloper.tuning     11.1.1.64.45     Loaded
    User Extensions Support     oracle.sqldeveloper.userextensions     11.1.1.64.45     Loaded
    VHV     oracle.ide.vhv     11.1.1.2.36.55.30     Loaded
    Versioning Support     oracle.jdeveloper.vcs     11.1.1.2.36.55.30     Loaded
    Versioning Support for Subversion     oracle.jdeveloper.subversion     11.1.1.2.36.55.30     Loaded
    Virtual File System     oracle.ide.vfs     11.1.1.2.36.55.30     Loaded
    Web Browser and Proxy     oracle.ide.webbrowser     11.1.1.2.36.55.30     Loaded
    oracle.ide.indexing     oracle.ide.indexing     11.1.1.2.36.55.30     Loaded

    Yes this was clean directory (I reinstalled twice already). I'm using Oracle Database 10g express edition and also Oracle 10g Standard Edition (same problem for both databases).
    In the messages log I get:
    oracle.dbtools.raptor.oviewer.table.GridDataEditor java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    ... and then each time I switch table:
    oracle.ide.model.IdeSubject Exception while updating observer[8]: Editor5

  • Function Module - E_T_DATA does not return data

    Hi
    I am trying to create a fuction module Generic extraction, the code belwo dosen't return any data.
    when i debug YBW_MAT_STAT does have but after E_T_DATA = YBW_MAT_STAT it dose not return any data
    can you help?
    Ramesh
    FUNCTION YBW_FM_ACTIVE_MATERIAL.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR
    *"     VALUE(I_DSOURCE) TYPE  SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *"     VALUE(I_READ_ONLY) TYPE  SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *"     VALUE(I_REMOTE_CALL) TYPE  SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
    *"  TABLES
    *"      I_T_SELECT TYPE  SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  YBW_MAT_STAT OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    Example: DataSource for table SFLIGHT
      TABLES: YBW_MAT_STAT.
    Auxiliary Selection criteria structure
    DATA: L_S_SELECT TYPE SRSC_S_SELECT.
       DATA : YBW_MAT_STAT type YBW_MAT_STAT occurs 0 with header line.
    Maximum number of lines for DB table
      STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
    counter
              S_COUNTER_DATAPAKID LIKE SY-TABIX,
    cursor
              S_CURSOR TYPE CURSOR.
    Select ranges
    Comment copy code
    RANGES: L_R_CARRID  FOR SFLIGHT-CARRID,
             L_R_CONNID  FOR SFLIGHT-CONNID.
    DATA: begin of t_marc occurs 0,
    ZMATNR type MATNR,
    ZWERKS type WERKS,
    end of t_marc.
    DATA: begin of t_ytmd_mat_ref occurs 0,
    ZMATNR type MATNR,
    ZYNA_MATNR_ST type YNA_MATNR_ST,
    ZYEAME_MATNR_ST type YEAME_MATNR_ST,
    ZYFIN_MATNR_ST type YFIN_MATNR_ST,
    end of t_ytmd_mat_ref.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
      IF I_INITFLAG = SBIWA_C_FLAG_ON.
    Initialization: check input parameters
                    buffer input parameters
                    prepare data selection
    Check DataSource validity
        CASE I_DSOURCE.
          WHEN 'ZAINV_MAT_STATUS'.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE E009(R3). ENDIF.
    this is a typical log call. Please write every error message like this
            LOG_WRITE 'E'                  "message type
                      'R3'                 "message class
                      '009'                "message number
                      I_DSOURCE   "message variable 1
                      ' '.                 "message variable 2
            RAISE ERROR_PASSED_TO_MESS_HANDLER.
        ENDCASE.
        APPEND LINES OF I_T_SELECT TO S_S_IF-T_SELECT.
    Fill parameter buffer for data extraction calls
        S_S_IF-REQUNR    = I_REQUNR.
        S_S_IF-DSOURCE = I_DSOURCE.
        S_S_IF-MAXSIZE   = I_MAXSIZE.
    Fill field list table for an optimized select statement
    (in case that there is no 1:1 relation between InfoSource fields
    and database table fields this may be far from beeing trivial)
        APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
      ELSE.                 "Initialization mode or data extraction ?
    Data transfer: First Call      OPEN CURSOR + FETCH
                   Following Calls FETCH only
    First data package -> OPEN CURSOR
        IF S_COUNTER_DATAPAKID = 0.
    Fill range tables BW will only pass down simple selection criteria
    of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
    Determine number of database records to be read per FETCH statement
    from input parameter I_MAXSIZE. If there is a one to one relation
    between DataSource table lines and database entries, this is trivial.
    In other cases, it may be impossible and some estimated value has to
    be determined.
          SELECT MATNR WERKS FROM MARC into table t_marc where MATNR BETWEEN '4233940M1' and '4233950M1'.
          loop at t_marc.
            SELECT MATNR YNA_MATNR_ST YEAME_MATNR_ST FROM YTMD_MAT_REF into table t_ytmd_mat_ref where MATNR = t_marc-zmatnr.
              loop at t_ytmd_mat_ref.
                if t_marc-zwerks = 'GB71' AND t_ytmd_mat_ref-ZYEAME_MATNR_ST = 'A'.
                  read table t_ytmd_mat_ref with key zmatnr = t_marc-zmatnr.
                  YBW_MAT_STAT-matnr = t_marc-zmatnr.
                  YBW_MAT_STAT-plant = t_marc-zwerks.
                append YBW_MAT_STAT.
                clear YBW_MAT_STAT.
                endif.
               endloop.
          endloop.
        ENDIF.                             "First data package ?
         clear E_T_DATA.
         refresh E_T_DATA.
         E_T_DATA = YBW_MAT_STAT.
        S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.

    Hi
    I have a question,
    With the above code i have all my records (450000+) in a single data package.
    how do i break this in multiple data packages
    regards
    Ramesh

  • SQL Developer 3.2 does not show warnings

    In SQL developer 3.2, I am trying to compilie package. After compilation it shows following message in script output
    PACKAGE BODY package_name_pkg compiled
    Warning: execution completed with warning
    Everytime I need to use 'SHOW ERRORS' command to see all above warnings.
    Is there any other way to see these warnings without using show errors ?
    --Swarup                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Yes, you need to use the Procedure Editor.
    http://www.thatjeffsmith.com/archive/2012/01/viewing-plsql-compilation-errors-in-oracle-sql-developer/

  • Webservice call does not return data

    i have created a stateless EJB and generated webservice from it. the method in ejb just gets data from database table with multiple rows. return type of the method is PlantBean[].  when i invoke this webservice from test console or Webdynpro app it returns Empty objects. it returns exact number of objects  as query returns.
    at test console it just a list of these objects with no data in it. like
    (test.types.PlantBean)
    (test.types.PlantBean)
    (test.types.PlantBean)
    Any help?
    thx in adv.
    krishna

    Hi Krishna,
       Can you please send your peace of code, how your accessing that service? Coz, in navigator it showing all the objects.
      Are you sure that, you are setting values to Return Class Objects?
    Regards,
    Sridhar

  • DATE type returned from function does not return the time component

    Hi,
    I'm dealing with a strange problem. I have a PL/SQL function (running on Oracle 8.1.4.7) which returns a DATE value. Like we all know the DATE datatype includes a date component and a time component.
    The function I used for testing is like this:
    FUNCTION ReturnDate return Date is
    dReturn Date;
    Begin
    select sysdate into dReturn from dual;
    return dReturn;
    end ReturnDate;
    When I call this function from .NET using ODP.NET the date value I get does not have the time component included only the day-month-year components.
    This is a code-snippet that calls the function :
    command.CommandText="Schema.ReturnDate";
    command.CommandType=CommandType.StoredProcedure;
    command.Parameters.Add("Return_Value",
    OracleDbType.Date,0,ParameterDirection.ReturnValue);
    command.ExecuteNonQuery();
    I use the OracleDbType.Date type which I think is the most logical choice, because the type in the Database is after all DATE.
    However this does not include the time componet. But if I change the OracleDbType.Date to OracleDbType.TimeStamp I get the time component. I'm not happy with this "hack" because I'm not sure what will happen when we upgrade our version of the Database to Oracle 9i which uses the new TimeStamp datatype.
    Is this a bug that the OracleDbType.Date does not include the time component??

    How do you examine the output Date value?
    If it is from the string, then the time components will
    not show because the NLS_DATE format in the client
    machine does not contain the time components.
    In American, the Date format is 'DD-MON-RR' by default whereas, the TimeStamp format is 'DD-MON-RR HH.MI.SSXFF AM' by default.
    Can you take a look at the time components from the OracleDate by accessing the time properties, eg. OracleDate.Hour, OracleDate.Minute..etc to see if the time values are there?
    Thanks
    Martha

  • Very Very Urgent Issue: Restricted Key Figure does not return any data

    Hi all,
    Please help me solving this urgent issue.
    created customer exit variable on characterstics version and also
    other customer exit variable on Value type.
    I coded that in variable exit. Problem is when I include these in
    restrickted keyfigure My query does not return me any data.
    But if I remove from restrickted key firgure and put it as normal
    charaterstics I see the variable is getting populated.
    Also in RSRT the SQl generated when these are included in RKF is not
    correct.
    I debugged and know they are getting populated. As when included in RKF
    I can also see the values of customer exit variables from information
    tab.
    I also know that there is data in cube for those restrictions.
    I posted one OSS Notes regarding this urgent issue. But got no reply from SAP.
    FYI: We are using BEx 3.5 Browser SAP GUI 6.4 Patch 20 BW Patch 11
    Thanks
    SAP BW
    **Please do not post the same question twice: Very Urgent Issue: Restricted Key Figure does not return any data

    Hi,
    Everyone out there this is very urgent. If someone can help me solving this problem.
    We are using BEx 3.5 Browser SAP GUI 6.4 Patch 20 BW Patch 11.
    I posted one oss notes also regarding this issue. But got no reply from SAP.
    So, Please help me solving this issue.
    Thanks
    SAP BW

  • Fetching Form Data... does not return form's field list to edit

    I have a Portal Form based on a view. It works fine if I run it.
    Suddenly I am unable to edit the form field properties:
    1) In the application list, I do not get run option for the form.
    2) If I go to manage and edit, "Fetching Form Data..." does not return the list of fields, so I am unable to change field properties.
    3) I can still run the form.
    Please help, I need to fix this within hours.
    Thanks in advance.

    I think I know what causes the error. Whenever I use HTML tags inside the Display Options/label text box I get this error.
    I have tried <p align="right">xyz</p> and <h4 align="right">xyz</h4>. In both cases I can run the form the first time and the label appears right justified, but when you try to edit the form, bottom left shows "error on page" and field data does not show up.
    To fix this I had to go to the version before I added the HTML tags to the label.
    Thank you for your help.

  • Very Urgent Issue: Restricted Key Figure does not return any data

    Hi all,
    created customer exit variable on characterstics version and also
    other customer exit variable on Value type.
    I coded that in variable exit. Problem is when I include these in
    restrickted keyfigure My query does not return me any data.
    But if I remove from restrickted key firgure and put it as normal
    charaterstics I see the variable is getting populated.
    Thanks
    SAP BW

    Hi,
    Everyone out there this is very urgent. If someone can help me solving this problem.
    We are using BEx 3.5 Browser SAP GUI 6.4 Patch 20 BW Patch 11.
    I posted one oss notes also regarding this issue. But got no reply from SAP.
    So, Please help me solving this issue.
    Thanks
    SAP BW

  • Java Perpared Statement does not return anything

    Sorry fo bad language.
    I have connection with Oracle 8 with JDBC thin drivers. Almost all queries, simple and very complex are doing well, except one:
    select srcCard.object_id
    from objects srcCard, params attrs
    where
    attrs.attr_id = ?
    and attrs.object_id = srcCard.object_id and
    attrs.value=?
    union
    select srcCard.object_id
    from objects srcCard
    where project_id = ? and
    object_type_id in (
    select object_type_id
    from object_types
    start with object_type_id=?
    connect by prior object_type_id=parent_id )
    and srcCard.name=?
    Such query get parameters and don't return anywhere. Java waited for 48 hours and still continue to wait results from Oracle. If I look at sessions list in Oracle (with DBA studio), there is no such query.
    The most strange thing is: query is not work only in Weblogic. If I try to run it with sql navigator or with sqlplus it returns data normally (with extract equal arguments).
    Where is the bug? Is it known bug of driver, Oracle or configuration of Oracle?

    Hi, Jason,
    user11925071 wrote:
    Hello All,
    I have a 8i DB and SQL Plus. in SQL Plus, when I do "desc cat", it gave me this:
    SQL> desc cat;
    Name Null? Type
    TABLE_NAME NOT NULL VARCHAR2(30)
    TABLE_TYPE VARCHAR2(11)
    However when I do "select * from cat;", I though I would get a list of tables, but instead I got "no rows selected". Why is that?The most likely reason is that the table has no data.
    Try:
    SELECT  COUNT (*)
    FROM    cat;to check.
    And the second question is very likely related to the first. I can "desc user_constraints" but when I tried to select some constraints, I got error like this:
    SQL> select constraint_name, constraint_type from user_constraints where tname = 'county_of_use';
    select constraint_name, constraint_type from user_constraints where tname = 'county_of_use'
    ERROR at line 1:
    ORA-00904: invalid column nametname is not a column in user_constraints. Perhaps you meant table_name.
    Text inside quotes is case-sensitive. Most names are all upper-case, so you proabably want to say
    SELECT  constraint_name
    ,     constraint_type
    FROM     user_constraints
    WHERE     table_name       = 'COUNTY_OF_USE';Edited by: Frank Kulash on Sep 22, 2009 5:12 PM
    Originally said "you probably want to say constraint_name'. I agree with the next 2 replies; table_name is more likely.

  • EJB 3.0 - JSF APPLICATION: DATA DOES NOT PERSIST TO THE DATABASE

    Hi,
    I am developing a JSF - EJB application and the data that I send from JSP Page through JSF Managed Bean --> Session Bean --> Java Persistence does not persist in database.
    Here is my scenario ( Iam using JDeveloper IDE to create this application) -
    SCENARIO START
    The scenario consists of two web pages, one enlisting all the users stored in the database, the other contains a form for adding a user
    1.) INDEX.JSP
    2.) ADDUSER.JSP
    Step 1: Create the USERS Table in database
    CREATE TABLE users
    user_id serial,
    username varchar(255) NOT NULL,
    first_name varchar(255),
    last_name varchar(255),
    password char(64) NOT NULL,
    CONSTRAINT pk_users PRIMARY KEY (user_id)
    Step 2: Add Database Connection To JDeveloper
    Go to Database Connection Navigator and create a New Database Connection using the Wizard
    Step 3: Create a New Application in JDeveloper and select JSF, EJB from Application Template
    Step 4: ENTITY BEAN - In the EJB Node Right Click and Select EJB à New Entites from Table (JPA/EJB3.0)
    Use The Wizard and create Entity Bean from Users Table which creates an Entity Bea POJO file as follows –
    User.java -
    package lux.domain;
    import java.io.Serializable;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.NamedQuery;
    import javax.persistence.SequenceGenerator;
    import javax.persistence.Table;
    @Entity
    @NamedQuery(name = "User.findAll", query = "select o from User o")
    @Table(name = "USERS")
    public class User implements Serializable {
    @Column(name="FIRST_NAME")
    private String firstName;
    @Column(name="LAST_NAME")
    private String lastName;
    @Column(nullable = false)
    private String password;
    @Column(nullable = false)
    private String username;
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="users_seq_generator")
    @SequenceGenerator(name="users_seq_generator", sequenceName="users_user_id_seq")
    @Column(name="USER_ID", nullable = false)
    private Long userId;
    public User() {
    public String getFirstName() {
    return firstName;
    public void setFirstName(String firstName) {
    this.firstName = firstName;
    public String getLastName() {
    return lastName;
    public void setLastName(String lastName) {
    this.lastName = lastName;
    public String getPassword() {
    return password;
    public void setPassword(String password) {
    this.password = password;
    public String getUsername() {
    return username;
    public void setUsername(String username) {
    this.username = username;
    public Long getUserId() {
    return userId;
    public void setUserId(Long userId) {
    this.userId = userId;
    Step 5: STATELESS SESSION BEAN - In the EJB Node Right Click and Select EJB à New Entites from Table (JPA/EJB3.0)
    Again Right Click on Model and create Session Bean from Wizard which creates two files –
    UserDAOBean.java – Stateless Session Bean
    UserDAO.java – Local Interface
    package lux.facade;
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import java.util.List;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import javax.persistence.Query;
    import lux.domain.User;
    @Stateless(name="UserDAO")
    public class UserDAOBean implements UserDAO {
    @PersistenceContext(unitName="Model")
    private EntityManager em;
    public UserDAOBean() {
    public User getUser(int UserId) {
    User u = new User();
    u = em.find(User.class, UserId);
    return u;
    public List<User> getAllUsers() {
    Query q = em.createQuery("SELECT u FROM User u");
    List<User> users = q.getResultList();
    return users;
    public void createUser(User u) {
    String hashedPw = hashPassword(u.getPassword());
    u.setPassword(hashedPw);
    em.persist(u);
    public void updateUser(User u) {
    String hashedPw = hashPassword(u.getPassword());
    u.setPassword(hashedPw);
    em.merge(u);
    public void deleteUser(User u) {
    em.remove(u);
    private String hashPassword(String password) {
    StringBuilder sb = new StringBuilder();
    try {
    MessageDigest messageDigest = MessageDigest.getInstance("SHA");
    byte[] bs;
    bs = messageDigest.digest(password.getBytes());
    for (int i = 0; i < bs.length; i++) {
    String hexVal = Integer.toHexString(0xFF & bs);
    if (hexVal.length() == 1) {
    sb.append("0");
    sb.append(hexVal);
    } catch (NoSuchAlgorithmException ex) {
    Logger.getLogger(UserDAOBean.class.getName()).log(Level.SEVERE, null, ex);
    return sb.toString();
    Step 6: Create a Deployment file in the Model and Deploy this to a JAR file
    Step 7: Now Right Click on View/Controller Node and create a Java File –
    UserController.java -
    package lux.controllers;
    import javax.ejb.EJB;
    import javax.faces.model.DataModel;
    import javax.faces.model.ListDataModel;
    import lux.domain.User;
    import lux.facade.UserDAO;
    public class UserController {
    @EJB UserDAO userDao;
    private User user;
    private DataModel model;
    public String createUser() {
    this.user = new User();
    return "create_new_user";
    public String saveUser() {
    String r = "success";
    try {
    userDao.createUser(user);
    } catch (Exception e) {
    e.printStackTrace();
    r = "failed";
    return r;
    public DataModel getUsers() {
    model = new ListDataModel(userDao.getAllUsers());
    return model;
    public User getUser() {
    return user;
    public void setUser(User user) {
    this.user = user;
    Step 8: Configure page flow in faces-config.xml
    1. Create the JSP file adduser.jsp by right-clicking View-Controller
    node and selecting New > JSP. Use the wizard to create JSF – JSP Page, fill in
    File Name adduser.jsp, click Finish. -
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>New user</title>
    </head>
    <body>
    <f:view>
    <h:form>
    <h:messages/>
    <h:panelGrid columns="2">
    <h:outputText value="Username"/>
    <h:inputText
    id="Username"
    value="#{user.user.username}"
    required="true"/>
    <h:outputText value="First name"/>
    <h:inputText
    id="FirstName"
    value="#{user.user.firstName}" />
    <h:outputText value="Last name"/>
    <h:inputText
    id="LastName"
    value="#{user.user.lastName}" />
    <h:outputText value="Password" />
    <h:inputSecret
    id="Password"
    value="#{user.user.password}"
    required="true" />
    <h:panelGroup/>
    <h:commandButton
    action="#{user.saveUser}"
    value="Save"/>
    </h:panelGrid>
    </h:form>
    </f:view>
    </body>
    </html>
    2. Repeat the previous step for another JSP file failed.jsp.
    3. On failed.jsp add the string
    Save failed
    Next we configure the page flow.
    1. Open faces-config.xml.
    2. Create index.jsp -
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>User Listing</title>
    </head>
    <body>
    <f:view>
    <h:form>
    <h:outputText value="User Listing"/>
    <h:commandLink action="#{user.createUser}" value="Create a user"/>
    <h:dataTable value="#{user.user}"
    var="dataTableItem" border="1" cellpadding="2" cellspacing="2">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Username"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.username}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="First name"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.firstName}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Last name"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.lastName}" />
    </h:column>
    </h:dataTable>
    </h:form>
    </f:view>
    </body>
    </html>
    3. Drag an arrow from index.jsp to adduser.jsp and replace the arrow’s label to create_new_user.
    4. Repeat the previous step for failed, by dragging and arrow from adduser.jsp to failed.jsp renaming the label to f
    ailed
    5. Finally repeat the step for adduser.jsp, by dragging from adduser.jsp to index.jsp renaming the label to success.
    This creates the following faces-config.xml file –
    <?xml version='1.0' encoding='UTF-8'?>
    <faces-config>
    <managed-bean>
    <managed-bean-name>user</managed-bean-name>
    <managed-bean-class>lux.controllers.UserController</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>username</property-name>
    <value>#{username}</value>
    </managed-property>
    <managed-property>
    <property-name>firstName</property-name>
    <value>#{firstName}</value>
    </managed-property>
    <managed-property>
    <property-name>lastName</property-name>
    <value>#{lastName}</value>
    </managed-property>
    <managed-property>
    <property-name>password</property-name>
    <value>#{password}</value>
    </managed-property>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/index.jsp</from-view-id>
    <navigation-case>
    <from-outcome>create_new_user</from-outcome>
    <to-view-id>/adduser.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/adduser.jsp</from-view-id>
    <navigation-case>
    <from-outcome>failed</from-outcome>
    <to-view-id>/failed.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/index.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    Step 9: Create a Deployment file in the View-Controller and Deploy this to a WAR file
    Step 10: Create a Deployment file in the View-Controller and create an EAR file and add Model’s JAR and View-Controller’s
    WAR files to it.
    Step 11: Run the JSP Files
    SCENARIO END
    Now, When I execute Index.jsp, it does not list values from database and when I click on Create User link, it takes me to adduser.jsp page. When I fill values in this page and click Save button, it takes me to Save Failed page and data does not persist to the database.
    WHAT IS WRONG OUT HERE ???

    If you set a breakpoint in your createUser method - does this code get executed?
    We have a couple of tutorials that might show you how to do this.
    EJB/JSF with ADF-binding tutorial:
    http://www.oracle.com/technology/obe/obe1013jdev/10131/ejb_and_jpa/master-detail_pagewith_ejb.htm
    EJB/JSF without ADF binding:
    http://www.oracle.com/technology/obe/JavaEE_tutorial_10131/index.htm

  • JSF - EJB 3.0 Application - Data does not persist to the database

    Hi,
    I am developing a JSF - EJB application and the data that I send from JSP Page through JSF Managed Bean --> Session Bean --> Java Persistence does not persist in database.
    Here is my scenario ( Iam using JDeveloper IDE to create this application) -
    ------------------------------------------------------- SCENARIO START
    The scenario consists of two web pages, one enlisting all the users stored in the database, the other contains a form for adding a user
    1.) INDEX.JSP
    2.) ADDUSER.JSP
    Step 1: Create the USERS Table in database
    CREATE TABLE users
    user_id serial,
    username varchar(255) NOT NULL,
    first_name varchar(255),
    last_name varchar(255),
    password char(64) NOT NULL,
    CONSTRAINT pk_users PRIMARY KEY (user_id)
    Step 2: Add Database Connection To JDeveloper
    Go to Database Connection Navigator and create a New Database Connection using the Wizard
    Step 3: Create a New Application in JDeveloper and select JSF, EJB from Application Template
    Step 4: ENTITY BEAN - In the EJB Node Right Click and Select EJB � New Entites from Table (JPA/EJB3.0)
    Use The Wizard and create Entity Bean from Users Table which creates an Entity Bea POJO file as follows �
    User.java -
    package lux.domain;
    import java.io.Serializable;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.NamedQuery;
    import javax.persistence.SequenceGenerator;
    import javax.persistence.Table;
    @Entity
    @NamedQuery(name = "User.findAll", query = "select o from User o")
    @Table(name = "USERS")
    public class User implements Serializable {
    @Column(name="FIRST_NAME")
    private String firstName;
    @Column(name="LAST_NAME")
    private String lastName;
    @Column(nullable = false)
    private String password;
    @Column(nullable = false)
    private String username;
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="users_seq_generator")
    @SequenceGenerator(name="users_seq_generator", sequenceName="users_user_id_seq")
    @Column(name="USER_ID", nullable = false)
    private Long userId;
    public User() {
    public String getFirstName() {
    return firstName;
    public void setFirstName(String firstName) {
    this.firstName = firstName;
    public String getLastName() {
    return lastName;
    public void setLastName(String lastName) {
    this.lastName = lastName;
    public String getPassword() {
    return password;
    public void setPassword(String password) {
    this.password = password;
    public String getUsername() {
    return username;
    public void setUsername(String username) {
    this.username = username;
    public Long getUserId() {
    return userId;
    public void setUserId(Long userId) {
    this.userId = userId;
    Step 5: STATELESS SESSION BEAN - In the EJB Node Right Click and Select EJB � New Entites from Table (JPA/EJB3.0)
    Again Right Click on Model and create Session Bean from Wizard which creates two files �
    UserDAOBean.java � Stateless Session Bean
    UserDAO.java � Local Interface
    package lux.facade;
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import java.util.List;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import javax.persistence.Query;
    import lux.domain.User;
    @Stateless(name="UserDAO")
    public class UserDAOBean implements UserDAO {
    @PersistenceContext(unitName="Model")
    private EntityManager em;
    public UserDAOBean() {
    public User getUser(int UserId) {
    User u = new User();
    u = em.find(User.class, UserId);
    return u;
    public List<User> getAllUsers() {
    Query q = em.createQuery("SELECT u FROM User u");
    List<User> users = q.getResultList();
    return users;
    public void createUser(User u) {
    String hashedPw = hashPassword(u.getPassword());
    u.setPassword(hashedPw);
    em.persist(u);
    public void updateUser(User u) {
    String hashedPw = hashPassword(u.getPassword());
    u.setPassword(hashedPw);
    em.merge(u);
    public void deleteUser(User u) {
    em.remove(u);
    private String hashPassword(String password) {
    StringBuilder sb = new StringBuilder();
    try {
    MessageDigest messageDigest = MessageDigest.getInstance("SHA");
    byte[] bs;
    bs = messageDigest.digest(password.getBytes());
    for (int i = 0; i < bs.length; i++) {
    String hexVal = Integer.toHexString(0xFF & bs);
    if (hexVal.length() == 1) {
    sb.append("0");
    sb.append(hexVal);
    } catch (NoSuchAlgorithmException ex) {
    Logger.getLogger(UserDAOBean.class.getName()).log(Level.SEVERE, null, ex);
    return sb.toString();
    Step 6: Create a Deployment file in the Model and Deploy this to a JAR file
    Step 7: Now Right Click on View/Controller Node and create a Java File �
    UserController.java -
    package lux.controllers;
    import javax.ejb.EJB;
    import javax.faces.model.DataModel;
    import javax.faces.model.ListDataModel;
    import lux.domain.User;
    import lux.facade.UserDAO;
    public class UserController {
    @EJB UserDAO userDao;
    private User user;
    private DataModel model;
    public String createUser() {
    this.user = new User();
    return "create_new_user";
    public String saveUser() {
    String r = "success";
    try {
    userDao.createUser(user);
    } catch (Exception e) {
    e.printStackTrace();
    r = "failed";
    return r;
    public DataModel getUsers() {
    model = new ListDataModel(userDao.getAllUsers());
    return model;
    public User getUser() {
    return user;
    public void setUser(User user) {
    this.user = user;
    Step 8: Configure page flow in faces-config.xml
    1. Create the JSP file adduser.jsp by right-clicking View-Controller
    node and selecting New > JSP. Use the wizard to create JSF � JSP Page, fill in
    File Name adduser.jsp, click Finish. -
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>New user</title>
    </head>
    <body>
    <f:view>
    <h:form>
    <h:messages/>
    <h:panelGrid columns="2">
    <h:outputText value="Username"/>
    <h:inputText
    id="Username"
    value="#{user.user.username}"
    required="true"/>
    <h:outputText value="First name"/>
    <h:inputText
    id="FirstName"
    value="#{user.user.firstName}" />
    <h:outputText value="Last name"/>
    <h:inputText
    id="LastName"
    value="#{user.user.lastName}" />
    <h:outputText value="Password" />
    <h:inputSecret
    id="Password"
    value="#{user.user.password}"
    required="true" />
    <h:panelGroup/>
    <h:commandButton
    action="#{user.saveUser}"
    value="Save"/>
    </h:panelGrid>
    </h:form>
    </f:view>
    </body>
    </html>
    2. Repeat the previous step for another JSP file failed.jsp.
    3. On failed.jsp add the string <h2>Save failed</h2>.
    Next we configure the page flow.
    1. Open faces-config.xml.
    2. Create index.jsp -
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>User Listing</title>
    </head>
    <body>
    <f:view>
    <h:form>
    <h1><h:outputText value="User Listing"/></h1>
    <p><h:commandLink action="#{user.createUser}" value="Create a user"/></p>
    <h:dataTable value="#{user.user}"
    var="dataTableItem" border="1" cellpadding="2" cellspacing="2">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Username"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.username}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="First name"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.firstName}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Last name"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.lastName}" />
    </h:column>
    </h:dataTable>
    </h:form>
    </f:view>
    </body>
    </html>
    3. Drag an arrow from index.jsp to adduser.jsp and replace the arrow�s label to create_new_user.
    4. Repeat the previous step for failed, by dragging and arrow from adduser.jsp to failed.jsp renaming the label to f
    ailed
    5. Finally repeat the step for adduser.jsp, by dragging from adduser.jsp to index.jsp renaming the label to success.
    This creates the following faces-config.xml file �
    <?xml version='1.0' encoding='UTF-8'?>
    <faces-config>
    <managed-bean>
    <managed-bean-name>user</managed-bean-name>
    <managed-bean-class>lux.controllers.UserController</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>username</property-name>
    <value>#{username}</value>
    </managed-property>
    <managed-property>
    <property-name>firstName</property-name>
    <value>#{firstName}</value>
    </managed-property>
    <managed-property>
    <property-name>lastName</property-name>
    <value>#{lastName}</value>
    </managed-property>
    <managed-property>
    <property-name>password</property-name>
    <value>#{password}</value>
    </managed-property>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/index.jsp</from-view-id>
    <navigation-case>
    <from-outcome>create_new_user</from-outcome>
    <to-view-id>/adduser.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/adduser.jsp</from-view-id>
    <navigation-case>
    <from-outcome>failed</from-outcome>
    <to-view-id>/failed.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/index.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    Step 9: Create a Deployment file in the View-Controller and Deploy this to a WAR file
    Step 10: Create a Deployment file in the View-Controller and create an EAR file and add Model�s JAR and View-Controller�s
    WAR files to it.
    Step 11: Run the JSP Files
    ------------------------------------------------------- SCENARIO END
    Now, When I execute Index.jsp, it does not list values from database and when I click on Create User link, it takes me to adduser.jsp page. When I fill values in this page and click Save button, it takes me to Save Failed page and data does not persist to the database.
    WHAT IS WRONG OUT HERE ???

    PLZZZZZZZZZzzzzzzzzzzz HELP ! ! !

Maybe you are looking for

  • CommandLink in dataTable rendered method is called multiple times

    I have a dataTable in which one of the columns contains a commandLink. The commandLink has the "rendered" option bound to a backing bean method. When the page is submitted, the backing bean method gets called 8 times for each row in the table if the

  • OCI-21500 error

    OCI-21500: internal error code, arguments: [17099], [], [], [], [], [], [], [] which is causing a core dump Background: our application: Java VM: Java HotSpot(TM) Client VM (1.3.1_02-b02 mixed mode) using 9i drivers (oci), accessing 8i database. We s

  • Minimize word graph

    Spoiler (Highlight to read) i am updating a word template and inserting graphs using word update graph. i am updating a word template and inserting graphs using word update graph. Spoiler (Highlight to read) I update 6 graphs then end with word quit

  • F.81 Reverse Accural/ Deferred entries

    While reversing entries through f.81, i want to restrict one business area in which i dont want any entry to be reversed. In other words, there is a business area which is going to take a shape of a new company code itself, so i just want to restrict

  • Can I stop iPhoto's auto start?

    I don't use iPhoto to import pictures but whenever i plug in acamera or card reader it fires up looking for import duty. Can I turn this off somewhere?