Anyone created an apex session in a plsql procedure in 4.1

Hi all,
Was wondering if anyone has been able to create a procedure that creates an apex session that allows using collections after upgrading to 4.1
Our procedure which we used for nightly processing worked fine in 4.0.1 is no longer working after upgrading.
Thanks for any suggestions or help
Wayne
We were using:
htp.init;
l_cgivar_name(1) := 'REQUEST_PROTOCOL';
l_cgivar_val(1) := 'HTTP';
owa.init_cgi_env(
num_params => 1,
param_name => l_cgivar_name,
param_val => l_cgivar_val );
for c1 in (select workspace_id from apex_applications where application_id = l_application_id) loop
l_workspace_id := c1.workspace_id;
dbms_output.put_line('l_workspace_id:'||l_workspace_id);
end loop;
wwv_flow_api.set_security_group_id(l_workspace_id);
apex_application.g_instance := 1;
apex_application.g_flow_id := l_application_id;
apex_application.g_flow_step_id := 999;
wwv_flow_custom_auth_std.post_login(
p_uname => l_user,
p_session_id => null,
p_flow_page => apex_application.g_flow_id||':'||999);
wwv_flow.show (
p_flow_id => apex_application.g_flow_id,
p_flow_step_id => apex_application.g_flow_step_id,
p_instance => apex_application.g_instance,
p_request => 'FSP_SHOW_POPUPLOV'
execute procedure_XXXX (this procedure contains the code to create an apex collection)

Not for sure how I did it, but the user handle should have been wcoleku.
Wayne

Similar Messages

  • How to create an apex session in e.g. SQL*Plus?

    I would like to establish an apex session using a tool different from SQL Workshop.
    How can I achieve this using e.g. SQL*Plus or SQL Developer?
    Is there some document on the internet which addresses this question? I couldn't find it yet.

    First and foremost you need to set the Security Group ID (SGID)
    begin
    APEX_UTIL.SET_SECURITY_GROUP_ID(APEX_UTIL.FIND_SECURITY_GROUP_ID('MY_WORKSPACE'));  -- replace MY_WORKSPACE with yours
    end;
    then you might need to set an application_id for certain features to work:
    select application_id
        into apex_application.g_flow_id
        from apex_applications
       where application_name = 'my_app_name';  -- replace my_app_name with yours
    If you need to create a session id, you can get a fresh one with
    DECLARE
      VAL NUMBER;
    BEGIN
      VAL := APEX_CUSTOM_AUTH.GET_NEXT_SESSION_ID;
    END;
    Flavio
    http://oraclequirks.blogspot.com
    http://www.yocoya.com

  • How to create an APEX 4.1 session?

    Hi,
    I've successfully used the mechanism described by [this thread|https://forums.oracle.com/forums/thread.jspa?threadID=663227] to create an APEX session in release 3.1.
    We've recently been forced to move onto Oracle 11g and APEX 4.1. The session routine no longer appears to work:
    - after setting up the session a call to the create_collection_from_query results in an error stating 'Invalid parsing schema for current workspace Id';
    - the apex_application.g_instance value is changing - post_login changes the value and show loses the value;
    Any ideas?

    Hi Scott
    Bad news. I read several time this thread, but I have not found error in my program ... .
    And I can not see what are really doing APIs of APEX.
    Time is going - so we have make a decision now.
    Probably (as I have no more answers at this forum) - we can not use APEX (as nobody using APEX sessions as I asked),
    as we can not manage its sessions programmatically (too risky).
    Thanks for your answer.
    Andres

  • How to create an Apex 3.1 a session context programmatically?

    Hi
    I want to do some unit testing on some pl/sql procedures that use apex collections. As I am using PL/SQL Developer and I am not connected to the database via Apex, inevitably they fail with the error "invalid parsing schema for the current workspace ID".
    How can I create programmatically a session in Apex so I can unit test my code? I am sure I have seen code to do it, but cannot find it anywhere.
    Thanks
    Luis

    Scott
    Thanks for the help!
    You say "uncomment the last line if you need to". How do I know if I need to? If the connected user is different from the application parsing schema?
    In any case, the connect user is the same as the app parsing schema, and when I ran it without uncommenting that last line I got the error:
    ORA-20104: create_collection_from_query_b Error:ORA-20001: Invalid parsing schema for current workspace ID
    ORA-06512: at "FLOWS_030100.WWV_FLOW_COLLECTION", line 1223
    Then I uncommented it (I granted execute to the package beforehand) but got the same error.
    As I said, I am connected as the same database user as the application parsing schema, and the application does not require authentication. Where did it go wrong?
    Please see below the code I am using.
    Thanks
    Luis
    declare
      l_workspace_id   number;
      l_application_id number;
      l_user           varchar2(30);
      l_owner          varchar2(30);
      l_cgivar_name    owa.vc_arr;
      l_cgivar_val     owa.vc_arr;
    BEGIN
      htp.init;
      l_cgivar_name(1) := 'REQUEST_PROTOCOL';
      l_cgivar_val(1) := 'HTTP';
      owa.init_cgi_env(num_params => 1, param_name => l_cgivar_name, param_val => l_cgivar_val);
      l_user           := 'ADMIN'; -- authenticated username
      l_application_id := 999; -- application ID
      l_owner          := 'PS'; -- application owner (parsing schema)
      for c1 in (select workspace_id
                 from   apex_applications
                 where  application_id = l_application_id)
      loop
        l_workspace_id := c1.workspace_id;
        dbms_output.put_line('l_workspace_id:' || l_workspace_id);
      end loop;
      wwv_flow_api.set_security_group_id(l_workspace_id);
      apex_application.g_instance     := 1;
      apex_application.g_flow_id      := l_application_id;
      apex_application.g_flow_step_id := 1;
      wwv_flow_custom_auth_std.post_login(p_uname      => l_user,
                                          p_session_id => null,
                                          p_flow_page  => apex_application.g_flow_id || ':' || 1);
      flows_030100.wwv_flow_security.g_parse_as_schema := l_owner;
      -- Call the procedure
      my_pkg.my_proc;    --- ERROR HERE
    end;

  • APEX sessions at 2008 Oracle Open World 9/21 - 9/25?

    I looked for but could not find a public posting of APEX sessions scheduled at Open World next week to pass along to an associate who will be attending - something like [this resource from http://dgielis.blogspot.com|http://apex.oracle.com/pls/otn/f?p=39802] would be great. Thanks in advance for any direction on this anyone may be able to provide, GR

    Hello,
    David Peake posted something on his blog a while back when he created an Apex app listing the Apex sessions -
    http://dpeake.blogspot.com/2008/08/oracle-openworld-2008-apex-update.html
    http://apex.oracle.com/pls/otn/f?p=338:1:0
    Hope this helps,
    John.
    http://jes.blogs.shellprompt.net
    http://www.apex-evangelists.com

  • Httprequest.getSession(false) creating a NEW Session

    I am working on a web application which uses STRUTS. All the client requests are directed to loginaction class.
    Any resource in the application, is accessed thru the action class.
    Overview: In the action class, i am checking if there is any session associated with the new user using
    session = request.getSession(false);
                      if (session != null) {
          if (session.isNew()) {
          logger.info("New Session Created [" + session.getId() + "]");
          } else {
          logger.info("Session EXIST'S ["+ session.getId()
         + "], Retreiving user from session");
                       }According to the Servlets 2.2 API:
    public HttpSession getSession(boolean create) Returns the current HttpSession associated with this request or, if if there is no current session and create is true, returns a new session.
    If create is false and the request has no valid HttpSession, this method returns null.
    if (session.isNew()) ,
    this if statement should return false and be skipped, as session = request.getSession(false);wont create a new session. When i parse the logs, I see the log statement, "New Session Created ". Which makes me wonder, that a new session is being created
    Problem: When i debug, i see that container is creating a new session if the session doesnt exist. According to API mentioned above, it should not create a new session. It should return null.
    Did anyone had a similar issue? While researching i found this article that using struts, the container creates a default session.
    I found this article: http://www.theserverside.com/discussions/thread.tss?thread_id=21643
    Environment: IDE:WSAD5.1, Appserver:Websphere, Browser:IE 6.0, Struts, JSP, JSTL

    Hi,
    We have two appliactions. Our application say B is uses authentication mechanism provided by say A.
    So the user, is presented a login page by application A. Once they are authenticated, without the knowledge of user, its being forwarded to our application say B.
    Once he is in our application, he can navigate in our application, say,
    he goes from page1 to page2. page1 is the main page. Now browser caching is enabled. When he hits the back button to access page1, browser is sending a new request to our applicaiton insted of furnising form local cache( this is another issue). Even though a new request is sent, all the requests are routed thru a struts controller action class. Now in the action class, we check if its a new session or not.
    request.getSession(false). Since the user is an old user, it shouldnt create any new session.
    As per your suggestion, where should i put the directive in the jsp to not to create a default session?. In page1 which is the main page?.
    How should i implemnt the session listener interface. Do u have any templates or code snippets?.
    Any suggestions?

  • Create New Service Session at Solution Manager = Product System missing

    We have installed SAP EHP 1 for SAP Solution Manager 7.0 last year but not really use it.
    We have setup in the system landscape:
    Server (ecc6sbx)
    Databases (MCD)
    Product System (MCD) => SAP ERP
    Assigned them to logical component (eg ZECC6DEV)
    RFC destination for MCD was generated
    SDCCN Administration at solutions manager display MCD with SDCCN status in green color.
    At the satellite system MCD, SDCCN Maintenance job was created and scheduled. Initial single run was also done.
    There were no issue. Connection to SDCC_OSS was fine.
    Back to the SOLUTION_MANAGER transaction, we created a new solution ECC ERP - Development.
    In the Solution Landscape => Solution Settings, we have assigned the Logical Component into the System Group.
    However when we expand the tree, and click on the Servers folder it did not display anything.
    Click on the Product Systems also did not display anything.
    We have another Solution Manager which display information on those Servers and Product Systems folder for satellite system.
    Going back to the Solution Manager for the Solution ECC ERP - Development, I tried to Create New Service Session for EarlyWatch Alert. When  I click on the Create button, I could only see SAP EarlyWatch Alert for Solutions, there is no SAP EarlyWatch Alert for the Reference Object MCD (<installation number). I could not create a session for MCD.
    Does anyone have ideas what I am missing here? I am trying to attached a document which have print screen for reference while creating this message, but there is no such function here.
    Adding to link to the document file contain print screen
    [Wihtout System and EarlyWatch Selectable.doc|http://www.easy-share.com/1915633524/Wihtout System and EarlyWatch Selectable.doc]
    [With System and EarlyWatch.doc|http://www.easy-share.com/1915633514/With System and EarlyWatch.doc]
    Edited by: Steven Foo on May 24, 2011 8:00 AM
    Edited by: Steven Foo on May 24, 2011 8:18 AM

    Anyway, in the solution manger  how to we setup earlywatch alert for the SM SID host itself (source system)?
    I have the information on the below from our solution manger
    The data for this session is overdue. Data has not yet been transferred from the associated satellite system.
    Go to the Service Data Control Center (transaction SDCCN) in the satellite system and check why the data has not been sent.
    Typical sources of errors are:
    The RFC connection for the SAP Solution Manager system is not working.
    The 'Task Processor' background job, which collects the session data, has been changed.
    Problems arose while data was being collected (see the detail log for the task that collects the session data).
    A periodic 'SDCC Maintenance Package' task has not been scheduled to check whether your SAP Solution Manager system requests session data.
    I tried to go SDCCN on the solution manager itself and look at the Maintenance Service Definitions:
    I get the information:
    No suitable RFC Destination found in SDCCN settings.
    When I click ok I get the following
    No RFC destionation to source system of service definitions available
    Delete Service Definitions (radio button selected).
    I did not continue and cancel it as I did not want to delete anything.
    I check the Task Processor background job is running at SM host itself.
    I managed to get the Maintenance Package job running. However it failed with the following
    Error refreshing service definitions from destination SM_SSMCLNT001_BACK
    Source and target system may not be identical SSM
    The source and target system is the same ==> SSM, will this be an issue?

  • Kdebase4-svn: How to create an X-Session?

    I've successfully built kdebase4-svn from AUR in the meantime, but now I'm wondering how to create an X-Session for it. Normally you create a kde4.desktop file which runs /opt/kde4/bin/startkde... But this file (startkde) does not exist in kdebase4-svn.. Can anyone help?
    Thanks

    Maybe something is broken with that kdebase4-svn. If I'm not mistaken, there are 3 individual KDE4 4.1 Beta 1 distributions available for Arch (kdemod's, tanis' and devs'), try one of them.

  • Whats the solution to this "avconvert failed to create an export session"

    I try to convert some mpg clips from my camera so i can use in imovies and i get this ...avconvert failed to create an export session.
    Anyone knows how to fix this?

    This may seem like brute force/overkill but here's what worked for me:
    1) Boot into Recovery disk.  Hold down Option key while booting and all bootable volumes will be shown.  Choose Recovery.
    2) From the options presented, choose Re-install MacOS X.  Be aware that this takes a loooong time.  I let it run overnight. 
    Optional:  Run Disk Utility > Repair dis and repair permissins first.  Probably not necessary but I wanted to be very cautious.

  • What is an APEX session?  Where is it documented?

    Exactly what defines an Oracle APEX session? Is it documented somewhere? (I can't see blogs because they filter them out here.)
    I ask because I find global variables persisting when I've logged out of APEX and logged back in again. Connectivity is "hit and miss" here. So I often duplicate browers tabs (sessions?) which are timing out. I'm wondering if that's not leaving disconnected session(s) that I log back into. I noticed that the initialization process ("on new session") is not executing, so I presume when I log back in I'm not starting a new session.
    Thanks -- Howard

    Hi,
    This might help
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/concept_ses.htm#sthref103
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/concept_ses_val.htm#sthref124
    I ask because I find global variables persisting when I've logged out of APEX and logged back in again. Connectivity is "hit and miss" here. So I often duplicate browers tabs (sessions?) which are timing out. I'm wondering if that's not leaving disconnected session(s) that I log back into. I noticed that the initialization process ("on new session") is not executing, so I presume when I log back in I'm not starting a new session. Can you create some example to apex.oracle.com to demonstrate what you mean?
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • [SOLVED] Is It Possible to Create a Telnet Session in URXVT?

    Greetings-
    Just curious if anyone can tell me how to create a telnet session via rxvt. I saw a thread on here where someone said that it's possible, but I can't find any documentation on it. Just wanted to try it out to connect to my switch which I normally connect to from a tera term emulator.
    Thanks guys!
    Last edited by w201 (2013-10-03 23:57:02)

    ewaller wrote:
    Just run:
    telnet the_address_of_your_switch
    Or I missing something profound?
    Well it was profound to me until you just showed how easy it is. The magic of learning eh?
    Thanks.

  • LSMW Routing Standard Batch Input Create Batch Input Session

    Hello All,
    I am using LSMW for routing upload, using standard batch input method. Program RCPTRA01.
    I am facing this quite peculiar problem.
    I have tried first with separate text file for every source structure. Everything works fine till convert data step.
    But when I go for 'Create Batch Input Session' it creates session for tables MAPL, PLKO, PLPO, PLMZ, PLMK. Other tables remain balnk (EAPL, PLFL, PLAB, PLFH, PLPH, PLFT, PLFV, PLWP). Because of this while running the session only the header and material assignment to task list get uploaded. Rest data, operation, MIC, component allocation do not get uploaded.
    I have also tried for one text file for multiple structure. In that I face porblem for BDC creation. While debugging I faced th same thing in this also.
    Could anyone please explain me the soution for this? Do I need to amend any progrm fior this?
    Expecting lightning fast replies from Gurus....
    Mimiri

    Hello All,
    I am awaiting your reply on this.......
    Mimiri

  • Apex Sessions on database

    Hi I have a database with 150 users.. but it is creating 200-300 sessions.. of which only 5-20 are used at peak..
    is teh number of sessions create an automatic function of APEX.. or is there a parameter somewhere?
    Deam

    Hi Deam,
    are all those session for user APEX_PUBLIC_USER?
    Which web server are you using OHS with mod_plsql, APEX Listener, EPG?
    If you use OHS with mod_plsql, which version are you using?
    If you use OHS you should check http://joelkallman.blogspot.co.uk/2008/01/oracle-http-server-apache-20-and.html and http://docs.oracle.com/cd/E14571_01/portal.1111/e12041/concept.htm (search for session) to understand how the database connection pooling of mod_plsql works.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • What is killing my Apex Session?

    Hi,
    as far as I understand it, the Session lasts 24 hours after the last submit? I can shut down the DB or the Apache and after I have them up again my session is still valid. I can also work on the next day with my session. But at least once a day suddenly my sessions are gone and I have to reconnect.
    Can anyone explain this behaviour?
    Thanks, Juergen

    Also, there is nothing magic about 24 hours, feel free to modify that DBMS_JOB to increase or decrease this frequency as appropriate for your environment.
    Remember that in most cases, the Apex session is tied back to a specific (browser-session) cookie, chances are that your client machine and/or browser is likely to be rebooted/restarted long before 24 hours so this issue is moot anyway.

  • Logic X Crashes every time I create a blank session after closing

    hey everyone.
    I've had this issue happen every single time I've used Logic X so far.
    When I close a session, not the program... and then choose File -> New.... to create a new session.... logic crashes.  Every single time.  Doesn't matter what session I was working on prior.
    Anyone else having this problem?

    looked at the crash report and figured out it's an Arturia plugin that's causing it.
    just thought i'd share this with you all.

Maybe you are looking for

  • How can i unlink my iTunes Account and my IPhone.?

    i want to unlink my account. bcoz i registered my crediet card inf. to my account. and i dont want to buy app now. now i want to log off my account in my IPhone in case i buy some app. what should i do.? thanks very much.!

  • DVD drive will not recognize blank DVDs after upgrade to Lion.

    It finds burned DVD/CDs but not blank ones. Disk utility partially sees blank dvd, gives option to eject it, but will not allow eject it. Finder does not see it at all. have to restart to have it eject. Tried different DVD's (Manufactures and -R / +R

  • Is there a fix for the wifi connectivity issue after ios6 update?

    Is there a fix for the wifi connectivity issue after ios6 update? Cannot connect to any wifi since update to 6.0.1 How do I get update to 6.0.2? Will that even help?

  • Iphone 4 and new music

    I have an iPhone 4. A lot of the new music I recently purchased that fades in and out in volume. I have push turned off. Notifications off. All apps off. music fades, brand new earbuds, apple earbuds, plugged all the way in. Hard restart. What else. 

  • IPhoto Slideshow Export Question

    How do you export an iphoto slideshow so that it will play on a normal DVD?