Package variable g_security_group_id must be set

Hi all,
i have the following problem.
I have a form based on an interactive report.
all standard made out of the apex possibilities.
i have a number of validations, all automatically created by apex, in the form because of the not possible being null of certain columns in my database.
when i press the insert button or save button when i didn't fill in all the necessary fields, i get the following error:
ORA-20001: Package variable g_security_group_id must be set.
     Error      ERR-1023 Unable perform validations.
OK      
i allready checked my validations and i can't find something wrong with it.
they haven't been modified neither after being automatically created by apex
anyone any clue?
thanks in advance,
Mr. T

Desmedt,
Can you please demonstrate this on apex.oracle.com?
Scott

Similar Messages

  • Package variable g_security_group_id must be set and Collections

    we have an app that works fine under an individual user schema/workspace. I exported/imported the app into a new workspace/schema and all is well except for the page that is using a collection. when I call this page, it is throwing a 404 error. when I look in the apache error log I see:
    mod_plsql: ORA-20001 Execute ORA-20001: Package variable g_security_group_id must be set.\nORA-06512: at "APEX_030200.F", line 279\nORA-06512: at line 33
    Is there some security setting that needs to be set for the schema/workspace where the app was imported into? This appears to be only a collection issue as the new pages in the imported app work fine except for this one. Any ideas about fixing this g_security_group_id or is there a workaround?
    Thanks.

    Another follow up from me. Mine started with a HTTP 404, so in SQL*Plus:
    exec dbms_epg.set_dad_attribute('APEX','error-style','DebugStyle');I refreshed the page and "ORA-20001: Package variable g_security_group_id must be set" appeared with all the debug info.
    It turned out to be a varchar definition in a package function that was too small for the text I was assigning to it.
    Fixed that, then
    exec dbms_epg.delete_dad_attribute('APEX','error-style');to turn debug off.

  • Error trying to run SSIS Package via SQL Server Agent: DTExec: Could not set \Package.Variables[User::VarObjectDataSet].Properties[Value] value to System.Object

    Situation:
    SSIS Package designed in SQL Server 2012 - SQL Server Data Tools
    Windows 7 - 64 bit.
    The package (32 bit) extracts data from a SQL Server db to an Excel Output file, via an OLE DB connection.
    It uses 3 package variables:
    *) SQLCommand (String) to specify the SQL Statement to be executed by the package
    Property path: \Package.Variables[User::ExcelOutputFile].Properties[Value]
    Value: f:\Output Data.xls
    *) EXCELOutputFIle (String) to specify path and filename of the Excel output file
    Property path: \Package.Variables[User::SQLCommand].Properties[Value]
    Value: select * from CartOrder
    *) VarObjectDataSet (Object) to hold the data returned by SQL Server)
    Property path: \Package.Variables[User::VarObjectDataSet].Properties[Value]
    Value: System.Object
    It consists out of 2 components:
    *) Execute SQL Task: executes the SQL Statement passed on via a package variable. The resultng rows are stored in the package variable VarObjectDataSet
    *) Script Task: creates the physical output file and iterates VarObjectDataSet to populate the Excel file.
    Outcome and issue:The package runs perfectly fine both in SQL Server Data Tools itself and in DTEXECUI.
    However, whenever I run it via SQL Server Agent (with 32 bit runtime option set), it returns the errror message below.
    This package contains 3 package variables but the error stating that a package variable can not be set, pops up for the VarObjectDataSet only.  This makes me wonder if it is uberhaupt possible to set the value of a package variable
    of type Object.
    Can anybody help me on this please ?
    Message
    Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 32-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  6:40:20 PM  DTExec: Could
    not set \Package.Variables[User::VarObjectDataSet].Properties[Value] value to System.Object.  Started:  6:40:20 PM  Finished: 6:40:21 PM  Elapsed:  0.281 seconds.  The package execution failed.  The step failed.
    Thank you very much in advance
    Jurgen

    Hi Visakh,
    thank you for your reply.
    So, judging by your reply, not all package variables used inside a package need to be set a value for when run in DTEXEC ?
    I already tried that but my package ended up in error (something to do with "... invocation ...." and that error is anything but clearly documented. Judging by the error message itself, it looks like it could be just about anything. that is why I asked my
    first question about the object type package variable.
    Now, I will remove it from the 'set values' list and try another go cracking the unclear error-message " ... invocation ...". Does an error message about " ... invocation ..." ring any bells, now that we are talking about it here ?
    Thx in advance
    Jurgen
    Yes exactly
    You need to set values only forthem which needs to be controlled from outside the package
    Any variable which gets its value through expression set inside package or through a query inside execute sql task/script task can be ignored from DTExec
    Ok I've seen the invocation error mostly inside script task. This may be because some error inside script written in script task. If it appeared after you removed the variable then it may because some reference of variable existing within script task.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • The Expanded package flag must be set if ShareName is specified

    Hi.
    I am trying to migrate packages from SCCM 2007 R2 to 2012 R2, but almost all packages fail with "The Expanded package flag must be set if ShareName is specified".
    I don't see any difference between the few packages that migrate successfully and the ones that fail.
    What am I missing?
    Thanks in advance.
    /Michael

    Actually, I see that all the packages, that report the error have a greyed out folder name. The ones, that work, do not.
    If I click 'Share the distribution folder' -> Apply and then delete the folder name, click 'Access the distri...' -> Apply, I am able to migrate the package.
    I don't want to do that for 100+ packages - is there an easier way?
    Thanks in advance.

  • ORA-20001: Unauthorized access (security group package variable not set).

    I'm creating an app that uses APEX authentication and features self-registration (working) and forgot password (not working) forms.
    My forgot password is public (requires no authentication). The user provides username and secret answer, which are validated, then provides the new password. I attempt to use htmldb_util.reset_pw to reset the user's password, but it's not working.
    I have a process on the new password page calling a PL/SQL anonymous block that looks like this (see below), where P16_ITEM1 = username and P18_ITEM1 = new password.
    BEGIN
    apex_040000.htmldb_util.reset_pw( V('P16_ITEM1'), V('P18_ITEM1') );
    END;
    I also don't know how to send accurate success/failure messages from such PL/SQL block back to APEX, but that's a separate issue I guess.
    Anyway, when testing via SQL Developer as the user with APEX_ADMINISTRATOR_ROLE, I get the following error:
    ORA-20001: Unauthorized access (security group package variable not set).
    ORA-06512: at "APEX_040000.WWV_FLOW_FND_USER_API", line 22
    ORA-06512: at "APEX_040000.WWV_FLOW_FND_USER_API", line 1220
    ORA-06512: at "APEX_040000.HTMLDB_UTIL", line 1253
    ORA-06512: at line 8
    I've searched previous threads and tried different suggestions with no luck.
    I'm on Oracle DB XE 11g and APEX 4.x.
    Any help will be appreciated. Thanks,
    Alex.

    Anyway, when testing via SQL Developer as the user with APEX_ADMINISTRATOR_ROLE, I get the following error:
    ORA-20001: Unauthorized access (security group package variable not set).When running code outside Apex that depends on the Apex security group being set, run the following before your own code:
    wwv_flow_api.set_security_group_id(apex_util.find_security_group_id('YOUR_SCHEMA_NAME'));Google "wwv_flow_api.set_security_group_id" for more details, such as this blog post:
    http://www.easyapex.com/index.php?p=502
    - Morten
    http://ora-00001.blogspot.com

  • Help needed for loss of package variables!

    Seem to have an annoying problem which may just be a misundertanding about libraries.
    I have two forms. Initially form 1 created initialised two package variables (of type ora_java.jobject) using the ora_java.new_global_ref function and these persisted across multiple user interactions and existed when form 2 was called (as new form / sharing libraries. Form 2 could call form 1 and the package variables still had values OK.
    These package variables were placed in library which only contained this package and was attached to both forms.
    I needed more functionality on form 2 so I created a menu module which had to run some code from form 2. I put most of the code (actually imported as it's mostly java classes) into the same library as the package containing the variables and attached the expanded pll to both forms and the menu module. Now when I run form 1 values for the package variables exist for the life of form 1 and form 2, but when I try to reference them after the initial display of form 2 they have disappeared!
    Also if form 1 is called again then it behaves differently in that references to the variable are lost after the form is first displayed.
    All forms and menus have shared libraries.
    I have spent some time playing with different variables and it's the same regardless of the variable type.
    Must be something to do with the library I think but don't know what - please help before I tear all my hair out!

    Ian,
    Ensure you have set the SHARE_LIBRARY_DATA parameter in your CALL_FORM statement.
    Also deleting the .fmx files, disconnecting from the database and re-building the form usually helps when everything else fails and you have not made any other changes you can think of that may have caused it to break.
    Also check that the forms are pointing to the right version of your .pll. Removing the attached library, adding it back and recompiling should do the trick.
    Hope this helps, before you lose your hair!

  • Using a variable as the comparison set with the IN clause

    I am attempting to use a variable as the comparison set in an IN clause:
    if <var> is not null and <var> in (<variable>) then ...
    if <var> = 'X' and <variable> = 'X','Y' this statement evaluates to FALSE. If, however, I write
    if <var> is not null and <var> in ('X','Y') then ...
    the statement evaluates to TRUE. Is there a way to force evaluation of a variable prior to executing the statement?

    Kumar
    That is neat trick and an good example of lateral thinking. However, there is a slight problem with it in that this is true:
    instr('1APC2', 'APC')
    whereas this is false
    'APC' IN ('1APC2')
    However, it did inspire me to produce an even neater trick:
    create or replace function my_in
    (in_value IN varchar2, in_string_list IN varchar2)
    RETURN boolean
    AS
    larray_string DBMS_UTILITY.uncl_array;
    ln_count INTEGER;
    return_value BOOLEAN := FALSE;
    lv_comparator VARCHAR2(4000);
    BEGIN
    DBMS_UTILITY.comma_to_table(in_string_list, ln_count, larray_string);
    FOR rownum IN 1..ln_count
    LOOP
    IF larray_string(rownum) = in_value
    THEN
    return_value := TRUE;
    EXIT;
    END IF;
    END LOOP;
    RETURN return_value;
    END;
    Note that the in_string list parameter must be COMMA separated, and spaces will be treated as values. Hence
    declare
    lb boolean;
    begin
    lb := my_in('APC', 'DEF,APC,ABC');
    if lb = TRUE
    THEN
    dbms_output.put_line('FOUND');
    else
    dbms_output.put_line('NOT FOUND');
    end if;
    lb := my_in('APC', 'DEF, APC, ABC');
    if lb = TRUE
    THEN
    dbms_output.put_line('FOUND');
    else
    dbms_output.put_line('NOT FOUND');
    end if;
    end;
    produces the following output:
    SQL> @tstrun
    FOUND
    NOT FOUND
    PL/SQL procedure successfully completed.
    SQL>
    Kindest regards, APC

  • Passing Script variable to Package variable, ultimately used as fileName

    Following an excellent post by Geplaatst door Joost, I put together a script which SHOULD populate a package variable, then use that variable as a file name.
    The Script code is as follows:
    public class ScriptMain : UserComponent
    string iScriptVar;
    public override void PreExecute()
    base.PreExecute();
    public override void PostExecute()
    base.PostExecute();
    Variables.ExtractName = iScriptVar.ToString();
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    if (!Row.CUSIP_IsNull)
    iScriptVar = Row.CUSIP.ToString();
    A Windows message box (put in as debug, but removed for brevity here) shows the correct value is being set to iScriptVar at all points it was inserted.
    The "ExtractName" variable is checked as a ReadWriteVariables for the Script properties.
    But, the "ExtractName" package variable is not being passed to the Expressions for the FlatFile Connection properties, which is set to:  @[User::ExtractName].
    Where have I gone wrong?

    Why not to provide the link to the post already?
    iScriptVar
    is a local to script variable this explains why it did not you need the full wiring
    e.g.
    Dts.Variables["User::iScriptVar"].Value = iScriptVar
    Arthur
    MyBlog
    Twitter

  • BC4J ApplicationModule Pooling and persitent package variables

    Scenario:
    HttpRequest
    starts=> - use SessionCookie API to get an Application Module
    - call pck.set_id (packaged procedure which sets i++ )
    - call pck.get_id (packaged function returning value of i)
    finish=> release application Module (***)
    What I've seen:
    (***) When release statelessly
    Two browser sessions (could) get the same Application Module, in which case the 'i' value is incremented 'by' both browser sessions.
    (***) When release statefully
    Two browser sessions get their 'own' Application Module and manipulate their own 'i' value (even) between consequitive HTTP Requests.
    If both situations are explained and viewed correctly, does BC4J application module pooling guarantee that whenever I want to use an AM statefully I get persistent package variable state reproduced in that AM???
    If I understand correctly this doesn't mean I get the 'same' AM instance each time, but the BC4J Application Module pooling makes sure that whichever AM I get has state reproduced?
    Thx for explaining/affirming?
    -J.

    Scenario:
    HttpRequest
    starts=> - use SessionCookie API to get an Application Module
    - call pck.set_id (packaged procedure which sets i++ )
    - call pck.get_id (packaged function returning value of i)
    finish=> release application Module (***)
    What I've seen:
    (***) When release statelessly
    Two browser sessions (could) get the same Application Module, in which case the 'i' value is incremented 'by' both
    browser sessions.
    (***) When release statefully
    Two browser sessions get their 'own' Application Module and manipulate their own 'i' value (even) between
    consequitive HTTP Requests.
    If both situations are explained and viewed correctly, does BC4J application module pooling guarantee that whenever
    I want to use an AM statefully I get persistent package variable state reproduced in that AM???In scenario2 above the reason that two different ApplicationModule instances are returned for each
    respective session is that the pool has not yet hit its recycle threshold. Once this threshold is hit then the pool will
    begin "recycling" the state managed instances and you will observe the same behaviour as in scenario 1.
    If I understand correctly this doesn't mean I get the 'same' AM instance each time, but the BC4J Application Module
    pooling makes sure that whichever AM I get has state reproduced?This is true for the state that BC4J is aware of (i.e. iterator state, pending transactional changes, etc).
    However, BC4J cannot reproduce user state, like the PL/SQL session state that you have defined above. In order
    to maintain "user" state it is necessary to:
    1. passivate/activate the user state when BC4J passivates/activates its own state. BC4J currently provides a hook for
    this via ApplicationModuleImpl.passivateState(Document, Element) and ApplicationModuleImpl.activateState(Element).
    2. reset user state when BC4J recycles an ApplicationModule. 9.0.2 does not define a great mechanism for
    resetting user state. However, the upcoming maintenance release will provide an ApplicationModuleImpl.reset
    hook to clean up session state properly when an ApplicationModule is recycled.
    Hope this helps.

  • Running SSIS Package from SQL Job - with Set Values, a string containing";"

    Can anybody help with this problem please?
    I’m using “set value” in SQL agent to pass in an email address to my SSIS package, if I put in a value of:
    [email protected]
    It works fine, but if I attempt to input multiple email addresses it fails
    [email protected];[email protected]
    It doesn’t appear to like the “;”.
    Any ideas anyone???
    BoroFC

    Hi Jamie, many thanks for the response.
    If I look at my command line table when Email = [email protected], it looks like:
    /SET "\package.Variables[EmailAddress].Value";"[email protected]" /REPORTING E
    If I change the value to “[email protected];[email protected]”, it looks like:
    /SET "\package.Variables[EmailAddress].Value";"\""" [email protected];"" [email protected] ""\"" /REPORTING E
    But the weird thing is, if I close the job properties window and re-open it again, I lose this line from my set values screen all together!!!
    Help ???
    BoroFC

  • Forms 10 and PL/SQL: Using a server package variable

    Hi,
    I have a variable created at package level in the server,
    When I try to assign its value to a Forms item, I get an error.
    "Unable to access distant package variable".
    What should I do to access this variable?
    Many thanks

    Hello,
    Add to the package a procedure to set this variable, and also a function that returns the variable content.
    Francois

  • Global Variables Vs Form Library Package Variables Vs DB Package Variables

    I realise this question has been asked a few times with varying degrees of answers, but I am still seeking comment/advice from others.
    I am aware of following options for retaining persistent data to share between forms.
    1. Package variables in a library that you share in a session.
    This requires usage of SHARE_LIBRARY_DATA, there is risk that this not set, then does not share data.
    2. Package variables in a database package.
    Requires round trip to DB. Is this expensive for performance?
    What about risk of DB package becoming invalid and losing state?
    3. Use global variables
    Can be tricky to manage.
    4. Use parameters
    Only one way, ie called form cannot alter value that caller can see.
    Packages are closest to OO approach in using get and set modules. Allows all variables to be managed in one location. This appears best practice.
    Forms library packages appear risky if caller does not include SHARE_LIBRARY_DATA.
    DB packages have cost of round trip to DB. Does this become expensive is have to reference many times. Also topic of DB package becoming invalid and losing state?
    Forms global variables have regular disadvantages of globals, ie not sure who may modify. Need to manage carefully. Text only
    As a second related question, for value such as current user, for performance (and maintainability) is it better to obtain this from oracle user function each time, or save somewhere (in one of options above) and use that saved value each time.

    My personal opinion:
    I like the "packaged" version with getters and setters. In general, i create a client-side package in a pll which has methods to access the value by getters and setters. With that, the "implementation" is encapsulated and doesn't really matter to the rest of your system. All modules have to access the value using the getter and setter.
    Inside the procedure i use two approaches:
    1. If its for communication purposes between different forms i use globals, which are filled or extracted in the getter and setter (see this http://andreas.weiden.orcl.over-blog.de/article-28180655.html )
    2. If its for someother purpose where the value should be "session persistent" i use a database package with getters and setters, which are called from the client-side package getter and setter. If the value is quite "constant" throughout the session, i read the value once at initialization code of the client-side package and the getter just returns that "cached" value
    Hope this helps.

  • Globals vs package variables

    We want to get rid of the Globals we currently use in forms. Thought of creating a package with package variables and setting these from the form. We do not really want to have to create a set and get function for each variable we create.
    I wanted to be able to pass the variable name to a function to set it or get it. This would be ok using a library in forms and using the COPY and NAME_IN built ins but we want to use a pl/sql package and these are not supported there .
    Any suggestions please.

    If you want an abstractable variable mechanism then you can do something like:
    1) Create a Record type which has two columns - key and value
    2) Create a PL/SQL Table of records of this type
    3) Write routines to get and put into this table based on the Key value.
    So you have a single array of global values which can be referenced using string keys (which of course can themselves be variables or constructed at runtime)

  • Referencing Package Variables

    Running Forms 6i and Oracle 8.1.6
    Can you reference server side package variables directly from Forms, or do you still have to write a wrapper procedures to "set" and "get" them.
    CREATE OR REPLACE package test_pkg as
    v_pkgvar varchar2(10) := 'TEST';
    TYPE r_emp_rec IS RECORD
    (empno emp.empno%TYPE,
         ename emp.ename%TYPE,
         mgr emp.mgr%TYPE,
         deptno emp.deptno%TYPE,
         dname dept.dname%TYPE,
         loc dept.loc%TYPE
    TYPE t_emp_rec IS TABLE OF r_emp_rec INDEX BY BINARY_INTEGER;
    end;
    DECLARE
    data_blk test_pkg.t_emp_rec;
    v_test varchar2(100) := test_pkg.v_pkg_var;
    BEGIN
    null;
    END;
    It seems funny that i can reference test_pkg.t_emp_rec;
    but not test_pkg.v_pkg_var;
    Thanks for your help

    You have to use wrapper setters and getters to reference package variables on Server side PL/SQL from client side PL/SQL (Forms) this will not change no matter what the versions concerned

  • Global package variable for the current rendering item

    I like to define a generic plsql function which handles all the page 0 item conditions. I will place this function call in all page 0 item conditions.
    Now I need a global (htmldb_application) package variable which I can use to identify for which item condition the function is executed.
    Which global variable can I use for this purpose or is there an other way to do this.
    I dont't want to give the the item names hardcode as argument of the function.

    Scott,
    I will try to clarify my question.
    I have lot of page 0 items.
    I like to give every item the same plsql condition such as htmldb_pck.show_item or
    htmldb_pck.show_item('#CURRENT_ITEM#').
    In my own htmldb_pck.show_item function I have all the display coding of the generic items.
    My problem is that I have to know from which item the function is called.
    Thanks,
    Fred.
    May be this is something for an enhancement. Not only for the items, but also for the buttons, tabs, tab sets and report columns. So you know in generic pl/sql from which object the pl/sql is called.

Maybe you are looking for

  • Itunes wont open after being reinstalled

    I uninstalled Bonjour and my itunes told me that I needed to reinstall itunes; So I did but it wont open at all now. I have tried a lot of the methods mentioned on this site to get it working again but it still wont. My Quicktime is up to date as wel

  • BI 4.1 Upgrade from BI 4.0 - MOBIServer web application is missing on AIX platform

    Hello BI Technical Experts, Recently, I have upgraded our BI environment from BI 4.0 SP05 Patch 06 to BI 4.1 SP03 Patch02 successfully. As per the BI 4.1 technical documentation the BI Mobile Server on the web application server (Tomcat 7) should hav

  • Any Mac Equivalent to "Pictures to EXE"?

    Apologies for this weird question but I was given a rather garbled message that had been passed on from person to person! Apparently a friend of a friend of a friend is wanting to do A/V with a Mac and wonders whether there is a similar program to th

  • Network Connection Refused

    I have looked and have not found an answer that fits my issue. I am using itunes 7.4.2 My podcasts wont download .. "network connection was refused" I cannot play itunes radio .. "check your internet connection" no itunes store .. "network connection

  • Disable Firewall for Windows 8.1 in Domain Location Network Settings via GPO

    I have Clients OS XP, 7, 8 and 8.1 Now I want disable only 8.1 firewall automatic via GPO. It's possible to apply only Windows version purpose with out any group and OU. Md. Ramin Hossain