Session PK "null Reset".

Hi all
I have a form that has four elements that are able to save a search/filter data. Once the button search is selected according to the four values of selected point, record data are met. Can also select the Previous and Next buttons to scroll through the Records data populated search/filter.
My problem is that the Session for the primary key is 'Reset to Null' when search is selected. So I'm not able to transmit values of element using a button that performs a redirection to another page in "Put on these items with these values" or by using the "URL target". The search button calls a function JavaScript, no 'submit '.
But once I have add
javascript:doSubmit('SEARCH')
for the search button. The Session is the current value of the primary key. The form is rendered/subject but this makes my form lose features such as scrolling the records by using the buttons next and previous. The 4 elements of the research/Filterable also lost the focus to here 'view Null value'. Can someone help me to find another way to capture the value of my primary key? So I can pass values of Item to another page to create child table data based on the foreign key, thanks.

Hello

The process is what I've been suggests - in other words, we have only one button (which I renamed to SAVE2 to avoid a conflict with the existing button SAVE) which is displayed continuously. If the user clicks on this, the new process (which is configured to run before all other processes) will search for a value in the P2_PK_CLASS_ID element. If this element is null, we create a new record, then we change the value request to 'CREATE', otherwise we have to "SAVE". After this, all processes is displayed this new value for demand so act accordingly. The next immeidate process is the standard process of "process line..", so this will understand to CREATE or SAVE and run the right SQL.

For the Info Session Add button question... This button has been using standard features of Apex redirection that specifies some 'set these values' / 'with these values"elements. It's fine IF the page was submitted and the values are in page numbers, that you have demonstrated. However, the items are updated using Ajax, so Apex does not know these when the redirect URL is under construction. To work around this problem, I created a new function of javascript (called doRedirect) in your header HTML box. He built the URL based on javascript understanding rather point values. The normal method redirect() is then called using this place. I created a new button (so that you can keep the existing one for comparison) which simply calls doRedirect(). This moment passes the values on page 9.

Andy

Tags: Database

Similar Questions

  • EBS SDK for ADF - info Session is null

    Hello

    I'm trying to create a simple class in an ADF Application to get the content of the EBS (USER_ID, FUNCTION_ID, etc.), but my session is always returned as Null. If I use the true option during the creation of the session (getAppsSession (true)) I get the default user.

    What I am doing wrong? Missing something?

    WebLogic Server Version: 10.3.5.0

    JDeveloper Version: 11.1.1.7.0

    EBS: R12 1.3

    Here is my code:

    public void beforePhase(PhaseEvent phaseEvent) throws Exception{  
      
            //System.out.println(new AppsDataSource() instanceof Referenceable);  
            //testConnection(dbcFile);    
    
    
            FacesContext fctx = FacesContext.getCurrentInstance();  
            HttpServletRequest request = (HttpServletRequest)fctx.getExternalContext().getRequest();  
            HttpServletResponse response = (HttpServletResponse)fctx.getExternalContext().getResponse();  
            
            FacesMessage message = new FacesMessage("request : " + request);  
            fctx.addMessage(null, message);  
            
            message = new FacesMessage("response : " + response);  
            fctx.addMessage(null, message);  
            
            try {  
                Connection EBSconn = ConnectionProvider.getConnection();  
                message = new FacesMessage("EBSconn : " + EBSconn);  
                fctx.addMessage(null, message);  
                
                EBiz instance = EBizUtil.getEBizInstance();  
                
                message = new FacesMessage("instance.getDbId() : " + instance.getDbId());  
                fctx.addMessage(null, message);  
                
                message = new FacesMessage("instance : " + instance);  
                fctx.addMessage(null, message);  
                
                AppsRequestWrapper wrappedRequest = new AppsRequestWrapper(request,  
                                                                           response,  
                                                                           EBSconn,  
                                                                           instance);  
    
    
                message = new FacesMessage("wrappedRequest : " + wrappedRequest);  
                fctx.addMessage(null, message);  
                
                Session session = wrappedRequest.getAppsSession();  
                //Session session = wrappedRequest.getAppsSession(true);  
    
    
                message = new FacesMessage("session : " + session);  
                fctx.addMessage(null, message);  
                
                Map columns = session.getInfo();  
                
                StringBuffer temp = new StringBuffer();  
                
                temp.append("<table>");  
                
                for (Object key : columns.keySet()) {  
                    temp.append("<tr>");  
                    temp.append("<td>");  
                    temp.append(key);  
                    temp.append("</td>");  
                    temp.append("<td>");  
                    temp.append(columns.get(key));  
                    temp.append("</td>");  
                    temp.append("</tr>");  
                }  
                
                temp.append("</table>");        
      
      
                setUserInfo(temp.toString());  
                    
            } catch (Exception e) {  
                e.printStackTrace();  
            }  
        }
    

    Thank you very much, Pier Paolo.

    Fixed a problem. Basically, we had two server on two different protocol (HTTP and HTTPS) once we moved them both on the same, I could get what I needed.

  • How to check whether or not a user session is null

    Hello

    I use Jdeveloper 11.1.2.2

    I have a some Junit test case execution use case, that's the problem I have:

    There's Junit tests that are written for some VO while tests of insert and update operation to Junit it is two General required columns Created by and updated by to engage in the database.
    These values are taken from the UserName of the current UserSession.

    So to get these values for each user, I thought to display a JPanel before the test is run, where the user enters the user name and password which is validated and the user is verified.

    First of all, I need to check if there is a session presents or not. To check this, I wrote a createUserSession() and liked on the inside:
    if(fixture.getApplicationModule().getSession().getUserData().isEmpty())
    Would that be to show the Jpanel and the details of the user and verify the user.

    But when executing the test itself, I found that the session is already present, now I just at the entry values based on who is the user.

    But Junit run the tests in the order in which the tests are written. I therefore call this in all the test cases.

    The Question is:
    How can I check if the session is already present or not, so that I don't have to ask the user every time of each test runs to enter the user name and password?

    Thank you
    Nigel.

    Edited by: Nigel Thomas July 30, 2012 10:26

    Hello

    ask yourself why you create test users and then automatically connect them as Jan Vervecken made in the net, I told him you. This way your test cases run without user intervention. To test if a session exists for a user, I would put a custom property in the user data. If this property exists, the user session is an existing one. However, make sure that the information you save user data survives passivation, because otherwise the information you get out of it is not accurate. See: http://tompeez.wordpress.com/2011/07/08/jdev-always-test-your-app-with-applicationmodule-pooling-turned-off/

    Frank

  • NULL session streams returned when you use MediaPlayer

    Hey people,

    When you try to play sound on blackberry os 6 on 9780 I get the error "session flow null returned" after 2 or 3 times of the sound during playback. The error is thrown in the prefatch statement:

    InputStream inputStream = this.getClass().getResourceAsStream(jarPath);
    
                if (inputStream != null)
                {
                    m_SoundPlayer = javax.microedition.media.Manager.createPlayer
                            (inputStream, "audio/mpeg");
    
                    m_SoundPlayer.realize();
    
                    m_SoundPlayer.prefetch();
    
                    inputStream.close();
                }
            }
            catch (IOException e)
            {
    
            }
            catch (MediaException e)
            {
                //#debug
                if (e.getMessage() != null)
                    DebugText.Instance().Write(e.getMessage());
            }
    

    I tried Googling the error with no luck. Anyone got any ideas?

    EDIT: I meant, the code works on os<>

    Hey,.

    Thank you much for the help. Impossible to get your solution work, maybe because I won't read SD card. My solution if it helps anyoneL

    public class CDSoundPlayer {
    
        boolean keepPlaying = false;
        Player m_Player = null;
    
        public void playSound(String file, boolean continuous)
        {
            try {
                if (m_Player != null) {
                    stopSound();
                }
                InputStream is = getClass().getResourceAsStream(file);
                if (is == null) {
                    //#debug
                    DebugText.Instance().Write("Error loading file");
                }
                m_Player = javax.microedition.media.Manager.createPlayer(is, "audio/mp3");
                m_Player.realize();
                m_Player.prefetch();
    
                VolumeControl vc = (VolumeControl) m_Player.getControl("VolumeControl");
    
                m_Player.setMediaTime(-1);
                m_Player.setLoopCount(-1);
                m_Player.addPlayerListener(new extendedPlayerListener(file, continuous, this));
    
                m_Player.start();
            } catch (IOException ex) {
                ex.printStackTrace();
            } catch (MediaException ex) {
                ex.printStackTrace();
            }
        }
    
        public void stopSound()
        {
            if (m_Player == null)
                return;
            try {
                m_Player.stop();
                try
                {
                    if(m_Player.getState() == Player.PREFETCHED) {
                        m_Player.deallocate();
                    }
                    if(m_Player.getState() == Player.REALIZED || m_Player.getState() == Player.UNREALIZED) {
                        m_Player.close();
                        m_Player = null;
                    }
                } catch (Exception e)
                {
                }
    
            } catch (MediaException ex) {
                ex.printStackTrace();
            }
        }
    }
    
        class extendedPlayerListener implements PlayerListener
        {
            String file;
            boolean playContinuous;
            CDSoundPlayer player;
    
        public extendedPlayerListener(String file, boolean b, CDSoundPlayer player) {
            this.file = file;
            this.player = player;
            playContinuous = b;
        }
    
        public void playerUpdate(Player player, String event, Object eventData) {
            if (event.equals( PlayerListener.END_OF_MEDIA))
            {
                this.player.stopSound();
                if (playContinuous)
                    this.player.playSound(file, playContinuous);
            }
        }
    
  • How to set null article Page in Session Via JavaScript

    Request Express 4.2.6.00.03

    We set a value in a control SELECTION, 'P5_DATASET_NAME ', in the session with a dynamic Action on the change of this control.

    We do this with the following JavaScript code snippet:

    Apex. Server.Process ("dummy"

    , {pageItems: '#P5_DATASET_NAME'}

    , {dataType: "text"}

    Async: false,

    complete: function (ajaxResponse)

    {

    var ignoredReturn = ajaxResponse.responseText;

    }

    });

    It works perfectly, as long as the user selects a value not zero in the drop-down list SELECT down. In other words, we can make any selection (other than NULL), pop up the session in the developer toolbar and immediately see the new value it. In addition, if we then refresh an interactive report on the page that uses the value of this element in the SELECT source, he correctly extraction based on the new value.

    * HOWEVER * if the user selects the NULL option (only if they choose this option), value in the session remains unchanged and continues to be set to the previous value. The $v function correctly reports the null value. If the is updated interactive report it is based on the previous value.

    So, the question is, what is special about NULL? How can I position "unplugged", the value of a session (or null) article page via JavaScript?

    Thank you

    -Joe

    Joe Upshaw wrote:

    Request Express 4.2.6.00.03

    We set a value in a SELECTION control, "P5_DATASET_NAME", at the session with dynamic Action on the change of this control.

    We do this with the following JavaScript code snippet:

    Apex. Server.Process ("dummy"

    , {pageItems: '#P5_DATASET_NAME'}

    , {dataType: "text"}

    Async: false,

    complete: function (ajaxResponse)

    {

    var ignoredReturn = ajaxResponse.responseText;

    }

    });

    It works perfectly, as long as the user selects a value not zero in the drop-down list SELECT down. In other words, we can make any selection (other than NULL), pop up the session in the developer toolbar and immediately see the new value it. In addition, if we then refresh an interactive report on the page that uses the value of this element in the SELECT source, he correctly extraction based on the new value.

    * HOWEVER * if the user selects the NULL option (only if they choose this option), value in the session remains unchanged and continues to be set to the previous value. The $v function correctly reports the null value. If the interactive report is updated it is based on the previous value.

    So, the question is, what is special about NULL? How can I position "unplugged", the value of a session (or null) article page via JavaScript?

    Another question is: why are you going to this length instead of just using the source attribute Page to go on IR region, which will be automatically put in the session state until the IR is updated?

  • Change multiple sessions appear in the debug log

    When running applications in my environment, I noticed in the debug log, which seems to be a duplication of calls "alter session". We use a database link to request information, so I expect the first batch of calls, but I don't remember if the second batch is normal.

    Details of the environment:

    Apex 4.2.2.00.11

    Apex listener Version 2.0.3.221.10.13

    Tomcat 6

    Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production

    ()Doc ID 1950408.1 previously applied recommendation)

    Thank you

    Joshua

    debug_example.jpg

    Hi Joshua,.

    What is expected in 4.2.x. Among the many improvements to performance in 5.0 is that we run only a single ALTER SESSION statement to reset the multiple NLS settings.

    Kind regards

    Christian

  • Session variable

    Hello

    I want to know is a way of the set/get on oracle sqlplus or vb.net session variable? How?

    Thank you!

    Francis SZE

    Devotee wrote:
    Could you please give me more detail (s) how do I set and get the session on the oracle sqlplus or vb.net database variable?

    Why do you want a session variable and what is the purpose?

    A PL/SQL, once loaded, package remains loaded for the duration of the session (except manual reset). This allows to use a package for the encapsulation of global session variables. For example

    create or replace package SessionVariable as
      sessionID number;
      sessionState varchar2(20) := 'INIT';
      --// etc.
    end;
    

    From an external client, you simply use an anonymous PL/SQL block to set and read these variables via bind variable:

    --// set a state variable
    begin
      SessionVariable.sessionID := :1;
    end;
    
    --// read state variables
    begin
      :1 := SessionVariable.sessionID;
      :2 := SessionVariable.sessionState;
    end;
    

    Another method, as illustrated by Alex, uses an Oracle context aka Namespace. There are 2 types of namespaces. Approved and unapproved.

    Alex shows no reliable context. The customer can create and set session variables.

    A context of trust is one where the procedure that is assigned to acts of context as an autoexec.bat or + .bash_profile script - where this script creates and sets session variables. For example, the procedure could connect to an LDAP server using the existing user identification information, read an additional security and role of the LDAP attribute values and create session for these variables.

    This context confidence means that variables of session (for this context) is reliable because she was not defined by the client (running wild). This customer ran on the contrary this procedure and this procedure containing a code of confidence created the required session variables and assign values (which cannot trust) to these variables.

    A context of trust is often used to implement VPDB (virtual private databases) in Oracle.

    One last comment. The PL/SQL package approach works very well (as a namespace not approved), but does not support the use of SQL. You cannot use static package from SQL variables (unless SQL is inside PL/SQL).

    An appropriate context can be used in PL/SQL and SQL.

  • 11g and v$ session

    Hello

    I have 11g database. When I do the desc on session of v$ I can see table and select from this point of view.

    The question is when I write process I get an error. Pls see below.

    I must be missing something. Pls let me know.

    Thank you very much
    Laba

    SQL * more: version 8.0.6.0.0 - Production on Fri Jan 8 10:48:21 2010

    (c) Copyright 1999 Oracle Corporation. All rights reserved.


    Connected to:
    Oracle Database 11g Release 11.1.0.6.0 - Production

    SQL > CREATE PROCEDURE ABCD IS
    HOLD_NAME 2 VARCHAR2 (100);
    3 BEGIN
    4. SELECT USERNAME
    5 IN HOLD_NAME
    6 FROM V$ SESSION
    7. WHERE USERNAME = "EDUMET";
    8 END;
    9.

    CAUTION: Procedure created with compilation errors.

    SQL > SHOW ERRORS
    ABCD PROCEDURAL errors:

    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    4/1 PL/SQL: statement ignored
    6/6 PL/SQL: ORA-00942: table or view does not exist

    SQL > DESC V$ SESSION
    Name Null? Type
    ------------------------------- -------- ----
    SADDR RAW (4)
    SID NUMBER
    SERIAL NUMBER #.
    NUMBER OF AUDSID
    PADDR RAW (4)
    USER NUMBER #.
    NAME VARCHAR2 (30)
    ORDER NUMBER
    OWNERID NUMBER
    ........................
    .............


    SQL > SELECT name from USER OF V$ SESSION;

    USERNAME
    ------------------------------
    SYSMAN
    EDUMET
    SYSMAN
    EDUMET
    SYSMAN

    Emeric wrote:

    SQL * more: release of * 8.0.6 *.0.0 - Production on Fri Jan 8 10:48:21 2010

    You should really spend your client to connect to an 11g database, otherwise you could be facing several problems.

    That said, you should have the concession on this point of view given directly to your user, not by a role, to use it in a procedure.

    SQL> conn titi/titi
    SQL> CREATE PROCEDURE ABCD IS
      2   HOLD_NAME VARCHAR2(100);
      3  BEGIN
      4   SELECT USERNAME
      5   INTO HOLD_NAME
      6   FROM V$SESSION
      7   WHERE USERNAME = 'EDUMET';
      8  END;
      9  /
    
    Warning: Procedure created with compilation errors.
    
    SQL> show err
    Errors for PROCEDURE ABCD:
    
    LINE/COL ERROR
    -------- --------------------------------------------------
    4/2      PL/SQL: SQL Statement ignored
    6/7      PL/SQL: ORA-00942: table or view does not exist
    
    SQL> desc V$SESSION
     Name                                      Null?    Type
     ----------------------------------------- -------- -----------
     SADDR                                              RAW(8)
     SID                                                NUMBER
     SERIAL#                                            NUMBER
    ...
    
    SQL> conn / as sysdba
    SQL> grant select on sys.v_$session to titi;
    
    Grant succeeded.
    
    SQL> conn titi/titi
    
    Connected.
    
    SQL> CREATE or replace PROCEDURE ABCD IS
      2   HOLD_NAME VARCHAR2(100);
      3  BEGIN
      4   SELECT USERNAME
      5   INTO HOLD_NAME
      6   FROM V$SESSION
      7   WHERE USERNAME = 'EDUMET';
      8  END;
      9  /
    
    Procedure created.
    

    Nicolas.

    added example
    Published by: Gasparotto N on January 8, 2010 17:26

  • How to end the session of a web application?

    For the experienced:

    I use JDeveloper 10.1.3.4 and have a question about the end of the session to a web application.

    First of all, I would like to clarify that the session I'm talking about is the session that can be seen in the web.xml file, for example,
        <session-config>
            <session-timeout>35</session-timeout>
        </session-config>
    If I understand correctly, if there is no user activity, its session ends in 35 minutes.

    My questions are:

    1. If in the application I don't put the code anywhere to end the session and simply say to the user to close the browser, I tell myself that the session will persist on the server until it times out 35 minutes later. Is this correct?

    2. If this interpretation is correct, is there a way for the application to get this session object and terminate when the user clicks on a button (a button ' Quit') explicitly? I find that without end of the session, after the user has clicked on the "Quit" button he can still return to the session of the application by clicking the browser ' go back a page ' button. That is not desirable. Once the user clicks on the button leave, it may be that the user should not be able to come back in this new. This is why I'm looking for a way to explicitly end the session.

    3. the application also interacts with the Oracle database server. If in the application there is no code explicitly put an end to the session of the application, the user login on the database server also will persist until the application session expires 35 minutes later?

    Thank you very much for your help!


    Newman

    Newman,

    1. If in the application I don't put the code anywhere to end the session and simply say to the user to close the browser, I tell myself that the session will persist on the server until it times out 35 minutes later. Is this correct?

    Well Yes

    2. If this interpretation is correct, is there a way for the application to get this session object and terminate when the user clicks on a button (a button ' Quit') explicitly? I find that without end of the session, after the user has clicked on the "Quit" button he can still return to the session of the application by clicking the browser ' go back a page ' button. That is not desirable. Once the user clicks on the button leave, it may be that the user should not be able to come back in this new. This is why I'm looking for a way to explicitly end the session.

          ExternalContext ectx =
            FacesContext.getCurrentInstance().getExternalContext();
          HttpServletResponse response = null;
          HttpSession session;
    
          response = (HttpServletResponse) ectx.getResponse();
    
          session = (HttpSession) ectx.getSession(false);
    
          if (session != null) session.invalidate();
    

    3. the application also interacts with the Oracle database server. If in the application there is no code explicitly put an end to the session of the application, the user login on the database server also will persist until the application session expires 35 minutes later?

    Assuming you are using ADF business components - don't. Database sessions are, by default, not assigned to a single user (nor is an instance of the application module). Good read on AM pooling in the docs about the gory details. If you are not using ADF business components - the answer could, of course, be different.

    Best,

    John

  • kill session vs kill session immediate/post_transactional

    A DBA, I sometimes kill sessions in SQL * more by entering the command ' ALTER SYSTEM KILL SESSION ' xxx, xxxx '; The session ends quickly, sometimes it takes sometimes minutes for the killed session to go.

    When to use Enterprise Manager Grid Control to kill a session that I have to choose between a 'kill immediately' or 'transactional Message. When I kill a session by entering a command from SQL * more I do not use one of these options.

    I'm trying to understand the consequences of the use of the two options available via the grid control. Clause of some forum posts suggest you use IMMEDIATELY"as a last resort. According to them, he couldn't prevent a session from filling out a cancellation of the updates because the operating system process stops immediately. Read that a description of the clause POST_TRANSACTION makes me think of issueing what the command against a long query term will allow him continue to run and end the session only after the end of the SQL query. For now I avoid using one of the options of the grid control and stick to my original format in SQL * more.

    Could someone shed some light on the difference between killing a session with or without KILL it IMMEDIATELY or POST_TRANSACTIONAL' options?

    Thank you
    Bill

    Hello

    If I order, "the ALTER SYSTEM KILL SESSION ' xxx, xxxx ';

    allows you to mark a session as null and void, restore the ongoing transactions, releases all session locks and partially recovery of resources from the session. If the session is running an activity that must be completed, as the wait for a response from a remote database or rolling back a transaction, then Oracle Database expects this activity complete, mark the session as being finished and then returns control to you.

    If I order, "ALTER SYSTEM KILL SESSION ' xxx, xxxx" IMMEDIATE. "

    Specify IMMEDIATE to load the Oracle database to ongoing transactions, releases all session locks, recover session state full and immediately returns control to you. You wrote end immediately with no cancellation of updates?. This is not so, it will rollback all not updated.

    If I execute the command ' ALTER SYSTEM KILL SESSION ' xxx, xxxx "POST_TRANSACTION;"

    The POST_TRANSACTION parameter allows operations to be completed before the session is disconnected. If the session has no current transaction, then this clause has the same effect as to KILL SESSION.

    Reference:-[http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_2013.htm#SQLRF00902]

    HTH
    Anand

  • After session.invalidate () server during the PPR, #2 exception

    Guy:

    I use JDEV + ADF 11 g in my project.

    I have a link "log out" on my page, the link action method we called logout())
    When I click on the logout link, the methods of "disconnection" is running correctly

    It's the method

    public String logout()) {}

    System.out.println ("logout entry");

    HttpSession session =.
    (HttpSession) FacesContext.getCurrentInstance () .getExternalContext () .getSession (false);

    If (session! = null) {}
    System.out.println ("invalidate Session");
    session. Invalidate();
    }

    session = ((HttpServletRequest) FacesContext.getCurrentInstance () .getExternalContext () .getRequest () .getSession (true);

    return to "log out";
    }


    After the execution of the method, I get this exception

    [exec] Current console: [oracle.iam.consoles.faces.backing.BackingObject@723c0b]
    [exec] 8 January 2009 13:39:25 oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator handleError
    [exec] GRAVE: Server during the PPR, #2 Exception
    [exec] javax.el.ELException: java.lang.NullPointerException
    [exec] to javax.el.BeanELResolver.getValue(BeanELResolver.java:266)
    [exec] to javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
    [exec] to com.sun.el.parser.AstValue.getValue(AstValue.java:118)
    [exec] to com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
    [exec] to org.apache.taglibs.standard.tag.common.core.ForEachSupport.prepare(ForEachSupport.java:165)
    [exec] to javax.servlet.jsp.jstl.core.LoopTagSupport.doStartTag(LoopTagSupport.java:256)
    [exec] to jsp_servlet._pages.__self_jspx._jspx___tag107(__self_jspx.java:4840)
    [exec] to jsp_servlet._pages.__self_jspx._jspx___tag106(__self_jspx.java:4801)
    [exec] to jsp_servlet._pages.__self_jspx._jspx___tag105(__self_jspx.java:4755)
    [exec] to jsp_servlet._pages.__self_jspx._jspx___tag75(__self_jspx.java:3524)
    [exec] to jsp_servlet._pages.__self_jspx._jspx___tag6(__self_jspx.java:361)
    [exec] to jsp_servlet._pages.__self_jspx._jspService(__self_jspx.java:199)
    [exec] to weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    [exec] to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
    [exec] to weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    [exec] to weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    [exec] to weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    [exec] to weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:502)
    [exec] to weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:251)
    [exec] to com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:415)
    [exec] to org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
    [exec] to org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
    [exec] to org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
    [exec] to org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$ OverrideDispatch.dispatch (FacesContextFactoryImpl.java:267)
    [exec] to com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:475)
    [exec] to com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:143)
    [exec] to javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    [exec] to org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:188)
    [exec] to oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:650)
    [exec] to oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:233)
    [exec] to oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:193)
    [exec] to javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    [exec] to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
    [exec] to weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    [exec] to weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    [exec] to weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    [exec] to weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    [exec] to oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
    [exec] to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:289)
    [exec] to oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:54)
    [exec] to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:289)
    [exec] to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:249)
    [exec] to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:206)
    [exec] to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:149)
    [exec] to org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    [exec] to weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    [exec] to oracle.iam.platform.auth.web.ExceptionalRolesHandler.doFilter(ExceptionalRolesHandler.java:107)
    [exec] to weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    [exec] to oracle.iam.platform.auth.web.AuthenticationFilter.doFilter(AuthenticationFilter.java:90)
    [exec] to weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    [exec] to oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:162)
    [exec] to weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    [exec] to weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    [exec] to weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    [exec] to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3559)
    [exec] to weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    [exec] to weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    [exec] to weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2195)
    [exec] to weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2101)
    [exec] to weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
    [exec] to weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    [exec] to weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    [exec] Caused by: java.lang.NullPointerException
    [exec] to oracle.iam.consoles.faces.mvc.self.Model.getInlineForms(Model.java:273)
    [exec] at sun.reflect.GeneratedMethodAccessor354.invoke (unknown Source)
    [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [exec] to java.lang.reflect.Method.invoke(Method.java:597)
    [exec] to javax.el.BeanELResolver.getValue(BeanELResolver.java:261)
    [exec]... more than 61


    DO YOU HAVE AN IDEA WHAT THIS IS GOING ON?

    In addition, I was told that I have to do

    ADFContext.getCurrent () .removeScope (ADFContext.SESSION_SCOPE);

    just before, invalidate, I did it and still get the same exception.


    Did I miss something?

    Thank you

    Rafael.

    Hello

    you deleted the session already, it is not necessary to call

    ADFContext.getCurrent () .removeScope (ADFContext.SESSION_SCOPE);

    because its no longer exist.

    Try

    facesContext.getExternalContext().redirect(faces/someViewId);

    After the invalidation of the session

    Frank

  • Need help with refreshment/item of session state

    I have an application that allows users to record information for productivity for our employees. There are different types of work they have to do this, the form takes the form of header/multiple / detail and use collections to manage the entire treatment. In the header are the fields that record the time of work. If it is stored in the database as a single field for start of shift and one field for end of quarter, inside it is divided into 9 areas: 3 day, month, year and three more each for departure times, start end of minutes, hours, hours, minutes from the end and AM/PM, which I then concatenate to get to store dates. The update part works fine. When I go in to see each other, I use a SQL query to retrieve only that article at that time.

    The problem I have is that if the user pulls several sheets to change, it keeps these values of time card earlier score and because of the way that the collections update, I can't seem to get each session state setting point (only when Null/always from Source) to achieve the desired result. If I use the option only when Null, I retain the values of the previous score card. If I use the always Source, the user cannot update the time entry.

    Can anyone suggest a solution? I tried a process of session state that fires upon entry to clear these items and ran into the same problem that you use the option always the Source. There must be a way to handle this, but it has left me speechless and my users are calling for a fix.

    Initial loading of the page
    A. before the header process fills jobs and other collection (not the header information), which comes directly from the DB table.
    B. data displays for header (from table) and two sections of details (collections)
    The user presses Submit to save changes
    1. on submit before treatment: updates of work and other collections (to keep the changes in case of validation failure)
    2. check validation codes of safe work are valid, the date is valid, used is valid, etc.
    3. on submit after treatment: writing the changes in the header of the entry form, writes the changes to employment and others from collections of paintings appropriate DB

    I have also two processes on submit after treatment to add white lines - one for each collection. They are triggered through buttons.

    Blair:

    Creating a process "before head" to fill these fields make a difference? The sql could be something like

    select TO_CHAR(TC_START_TIME,'HH') into :P1115_TIME_IN_HH from TC where TC_ID = :P1115_TC_ID;
    

    You must set the "Source" back to "Only when the current value in the session is null" and the «Source Type"to «Assignment (...)» static"and clear the"Source value or expression.

    CITY

  • What is the problem with this URL

    Can someone tell me what is the problem with this url
    owa_util.redirect_url(apex_util.prepare_url('f?p='||:APP_ID||':25:'||:APP_SESSION||'::'||:DEBUG||':25,28'||':P25_JOBID,P25_PG:&P3_JOBID.,3, null,||:APP_SESSION'));
    It gives me a value for P25_PG, that is to say 3 but always sets P25_JOBID to 0

    Gus

    Hello Gus,

    It looks like point P3_JOBID has no value for the rendering of the page.
    If the value is set subsequently, you can try the following change

    owa_util.redirect_url(apex_util.prepare_url('f?p='||:APP_ID||':25:'||:APP_SESSION||'::'||:DEBUG||':25,28'||':P25_JOBID,P25_PG:'||:P3_JOBID||',3, null,||:APP_SESSION'));
    

    But the part at the end

    ||',3, null,||:APP_SESSION'
    

    Wil do nothing because you give only 2 items in the list separated by commas of the page elements you want to submit. Everything after the second comma in the comma separated value list is of no use for the url of the apex.

    As additional info, the URL of the Apex is built like this:
    >
    1 - application ID or alias
    2 - page ID or Alias
    3 - session & SESSION. : APP_SESSION
    4. application (for example, PRINT_REPORT = REPORT_1) & ASK. : REQUEST
    5 - debug (YES or NO) & DEBUG. : DEBUG
    6 - cache framework

    APP - clear the cache for the entire application
    SESSION - clear the current user session cache
    PR - Reset pagination
    x - clear the page cache x
    -empty the cache for the element y

    7 - separated by a comma list of items on the page
    8 - the list of values separated by commas
    9 - mode printer friendly (YES or blank)

    f? p = & APP_ID.: 1010: & APP_SESSION. : & DEBUG. : RP, 1010:P1010_ITEM1, P1010_ITEM2, P1010_ITEM3:A, B, C
    >

    Kind regards
    Kees Vlek
    -----
    Company: http://www.orcado.nl
    Blog: http://www.orcado.nl/blog/blogger/listings/69-kvlek
    Twitter: http://www.twitter.com/skier66
    If the answer to question please change replied and mark the appropriate post as correct / helpful.

  • Servlet not showing do not image BLOB Oracle in JSF

    Hi forum.

    I have a table in oracle in which i m storage photos in a BLOB on the field and extension (mime type) of the file in a field of varchar2. I can store image successfully. but I want the stored image to display in a graphicimage BLOB tag. I searched the net and found it must be done using servlet. the code I used is as follows. but I get a null pointer exception. I know I should get these exceptions but I don't know how to deal with since there is little vague rest in each site, I searched. so I opted to ask the forum.

    Here is the code for my jsp page
                                         .
                                         .
                                         .
         <h:graphicImage value="/DisplayImage"/> 
                                        .
                                        .
     
    Web.XML is amended as follows
                  <servlet>
      <servlet-name>DisplayImage</servlet-name>
      <servlet-class>imageDisplay.DisplayImage</servlet-class>
    </servlet>
    <servlet-mapping>
      <servlet-name>DisplayImage</servlet-name>
      <url-pattern>/DisplayImage</url-pattern>
    </servlet-mapping>
              
    the servlet itself...
       package imageDisplay;
    
    import java.sql.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import org.pa.utils.HibernateUtils;
    import org.hibernate.Session;
    public class DisplayImage extends  HttpServlet{
      
      public void doGet(HttpServletRequest request,HttpServletResponse response)  throws ServletException, IOException 
      {
     
                Session hibernateSession = null;
              hibernateSession = HibernateUtils.currentSession();
              Connection connection;
              connection = hibernateSession.connection();
              
              Statement st1;
      try{  
            Class.forName("oracle.jdbc.driver.OracleDriver");
             st1=connection.createStatement();
             ResultSet rs1 = st1.executeQuery("select APP_FILE from EMPLOYEE_DETAILS where EMP_ID = 2");  //APP_FILE IS THE BLOB FIELD
             System.out.println("----------------#@$#@$$%^$%^%&^*^&*(&(*&^%$#$%@#%^%^%&*&^*$^&#%^$%@#$%@#$--------------------");
           String imgLen="";
           
           while(rs1.next())
                     {
           imgLen = rs1.getString(1);
        
      
                      int len = imgLen.length();   //THIS IS LINE 35 WHERE ERROR IS EMERGED...............
                     byte [] rb = new byte[len];
                     InputStream readImg = rs1.getBinaryStream(1);
                     int index= readImg.read(rb, 0, len);  
      
                System.out.println("index----#@$#@$$%^$%^%&^*^&*(&(*&^%$#$%@#%^%^%&*&^*$^&#%^$%@#$%@#$------------"+index);
                response.reset();
                response.setContentType("image/jpg");
                response.getOutputStream().write(rb,0,len);
                response.getOutputStream().flush();
           }
      
      st1.close();
      response.getOutputStream().close();
     } catch (Exception e){
      e.printStackTrace();
      }
      }
    }     
    
    
      
    the error I get is
     index----#@$#@$$%^$%^%&^*^&*(&(*&^%$#$%@#%^%^%&*&^*$^&#%^$%@#$%@#$------------
    java.lang.NullPointerException
         at imageDisplay.DisplayImage.doGet(DisplayImage.java:35)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
         at java.lang.Thread.run(Unknown Source)
    Bundle of thanks in advance for reading my problem waterproofed and your help I'm looking desperately for

    Published by: jaykio77 on January 11, 2012 04:09

    Published by: jaykio77 on January 11, 2012 04:12

    Instead of copying and pasting code, take the time to read on the works of JDBC. Yes it will take a long time, but when you acquire the knowledge you prevent you having to dump your problems on other people, in this case a lot of foreign friends.

    Copy the following code:

    imgLen = rs1.getString(1);
    
                      int len = imgLen.length();   //THIS IS LINE 35 WHERE ERROR IS EMERGED...............
                     byte [] rb = new byte[len];
                     InputStream readImg = rs1.getBinaryStream(1);
    

    Does really not much sense. This assumes that the first position in the result set is a string and a BLOB.

    Meanwhile, break your problem. What you want to do is to read a blob of a result set. Right? That's it, who cares that a servlet is involved, which is not what you are having problems with. You can not read the blob.

    It is essential to realize that you can refine your google search for «blob of resultset» java Guess what appeared to be the first time for me:

    http://www.java2s.com/code/Java/database-SQL-JDBC/GetBLOBdatafromresultset.htm

  • Get jsessionid ADF form

    KIM

    I have the ADF form with two text - first and last name fields? and with a single button.
    BPEL process call button. In the message, I have three parameter - name, lastname and jsessionid (jsessionid page that call BPEL process)
    Name and Lastaname get binding, but with jsessionid I have a problem.

    Where can I get jsessionid to BPEL?

    Help, please.

    Hello

    Here is a code to access the session ID

            FacesContext fctx = FacesContext.getCurrentInstance();
            ExternalContext ectx = fctx.getExternalContext();
            HttpSession session = (HttpSession) ectx.getSession(false);
    
            String sessionId = session.getId();
            System.out.println("Session Id = "+ sessionId);
    
            Cookie[] cookies = ((HttpServletRequest)ectx.getRequest()).getCookies();
    
            //reset session
            sessionId = null;
    
            if (cookies != null) {
                for (Cookie brezel : cookies) {
                    if (brezel.getName().equalsIgnoreCase("JSESSIONID")) {
                        sessionId = brezel.getValue();
                        break;
                    }
    
                }
            }
            System.out.println("JSESSIONID cookie = "+sessionId);
    

    The getID method returns a slightly different string (it is longer) should not ask questions in your use case. Go for the cookies get JSessionID fails for cases in which the jsessionId is added to the URL (you can configure an application to prohibit the use of cookies. GetID therefore seems to be the best choice

    Frank

Maybe you are looking for