Access variables in Package.

Hi I have a apackage called share.server , in which I have defined
Hashtable hash;
i have another file in share package as Impl, here i want to call the "hash"
how can i access the same "hash" in Impl.java from FilServer which is in share.server package.
Please respond urgent, assignment is due soon.
Thanks for any response.

what?!
variables belong to classes, not packages. If you want to access variables between classes you need to define some kind of public interface for them (getters and setters... ring any bells?). This is basic basic OOP, and is called encapsulation. First thing you need to do is get a basic 'OOP with java' type book and read it fully. We can't help you if you can't help yourself/

Similar Messages

  • 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

  • How do I use bin variable in package without asking a user?

    hi,
    I would like to write an SQL but I want to use bind variable in package as a static without asking user? Like below?
    I would like to ask you, below there is a emp_id variable? Is this BIND variable?
    DECLARE
    bonus NUMBER(8,2);
    emp_id NUMBER(6) := 100;
    BEGIN
    SELECT salary * 0.10 INTO bonus FROM employees
    WHERE employee_id = emp_id;
    END;
    If not, like this SQL how can define a BIND variable as static inside a code? not asking a user?
    db version. 9.2.0.8
    regards and thanks

    OracleADay wrote:
    I would like to ask you, below there is a emp_id variable? Is this BIND variable?
    DECLARE
    bonus NUMBER(8,2);
    emp_id NUMBER(6) := 100;
    BEGIN
    SELECT salary * 0.10 INTO bonus FROM employees
    WHERE employee_id = emp_id;
    END;
    /In the query "SELECT salary * 0.10 INTO bonus FROM employees WHERE employee_id = emp_id" emp_id is turned into a bind variable because
    if you are coding static SQL in PL/SQL then PL/SQL wil automatically use bind variables: please read http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/overview.htm#sthref145.
    This can also be proved with SQL trace. The following code:
    alter session set sql_trace=true;
    declare
    v number;
    c number;
    begin
    select count(*) into c
    from t
    where x=v;
    end;
    show errors
    alter session set sql_trace=false;generates following raw trace file section with 10G XE:
    =====================
    PARSING IN CURSOR #2 len=79 dep=0 uid=69 oct=47 lid=69 tim=33338762257 hv=2860574766 ad='3c10120c'
    declare
    v number;
    c number;
    begin
    select count(*) into c
    from t
    where x=v;
    end;
    END OF STMT
    PARSE #2:c=46800,e=329811,p=0,cr=9,cu=0,mis=1,r=0,dep=0,og=1,tim=33338762253
    =====================
    PARSING IN CURSOR #1 len=35 dep=1 uid=69 oct=3 lid=69 tim=33338788761 hv=3539261652 ad='3c10053c'
    SELECT COUNT(*) FROM T WHERE X=:B1
    END OF STMT
    PARSE #1:c=0,e=216,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=1,tim=33338788755
    =====================Edited by: P. Forstmann on 17 mai 2011 17:47
    Edited by: P. Forstmann on 17 mai 2011 17:55

  • How to access variables outside user exit

    Hi,
    I'm working with a user exit and my problem is that in a particular moment I have to access variables located outside the scope of the user exit (they are in a standard program)
    How can I reach these variables?
    thanks in advance

    Hi,
    If they are global variables then you can access them using Global assign technique,
    For example,
    FIELD-SYMBOLS: <fs_value> TYPE ANY.
    ASSIGN ('(SAPMV45A)XVBAK') TO <fs_value>.
    It is basically,
    ASSIGN ('(<Std. Program Name>)<Variable name>') TO <field symbol>.
    NOTE: To make sure they are accessible in your user exit, just put a break-point in the user exit and once you are there in debugging, type in,
    (<Std. Program Name>)<Variable name> in the Field names section and if it does not show it in RED then it is accessible..
    Hope this helps.. 
    Sri
    Message was edited by: Srikanth Pinnamaneni

  • How to Access Variables defined in the PopUpWindow

    Hi Friends
    I am building a flex site using flex builder 2.....
    Here I need your help.....
    My Problem is how to store a variable from a popup window
    I have this problem while in the login window comes as popup
    while clicking login button in the page a popup where user
    can enter username and password...
    after submitting if the login is successufl the popup
    vanish...
    After a successful login I need to store the logged user name
    in the main index page but I am not able to store
    At first I created a variable 'loggedUsername' in the popup
    panel and after success log i assigned the username to it ... after
    it i am not able to get the loggedUsername..
    doubting I defined the variable in the main index.mxml page
    but this variable is not accessible from the loginwidow.mxml page
    where the popup will function...
    Heip me
    how to store the name if the user login is success..
    thanks
    Chintu...

    Lets say you have a public property in your application like
    public var name:String = "John Smith";
    to access this using an inline item renderer:
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox>
    <mx:TextInput text={outerDocument.name} />
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    To access variables of the applicaton you can use
    Application.application.name (for example) to reference "global"
    variables, so you might also use this technique. With an inline
    item renderer, the outerDocument property will refer to the
    component which contains the renderer.

  • How to access variables declared in main mxml in itemrenderer files

    Hi,
    I have a main mxml which has a cutomRenderer that defines two
    mxml components
    namely raidobutton and textinput.
    Now in this TextInput.as i need to access variable defined in
    main mxml.
    Please suggest a way.
    Thanks,
    Lucky

    Lets say you have a public property in your application like
    public var name:String = "John Smith";
    to access this using an inline item renderer:
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox>
    <mx:TextInput text={outerDocument.name} />
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    To access variables of the applicaton you can use
    Application.application.name (for example) to reference "global"
    variables, so you might also use this technique. With an inline
    item renderer, the outerDocument property will refer to the
    component which contains the renderer.

  • Global Variable in Package Specification

    Hello,
    I created global variable in package specification,
    Is it valid for the current session or it will work for all the session.
    Thanks,Kannan.K

    Package varaibles are session bound, to demonstrate, a simple test:
    --session 1:
    SQL> select dt_test_pack.get_global from dual;
    GET_GLOBAL
    SQL> exec dt_test_pack.set_global(50);
    PL/SQL procedure successfully completed.
    SQL> select dt_test_pack.get_global from dual;
    GET_GLOBAL
            50
    --Session 2 at the same time
    SQL> select dt_test_pack.get_global from dual;
    GET_GLOBAL
    SQL> exec dt_test_pack.set_global(100);
    PL/SQL procedure successfully completed.
    SQL> select dt_test_pack.get_global from dual;
    GET_GLOBAL
           100
    --Back to session 1:
    SQL> exec dt_test_pack.set_global(null);
    PL/SQL procedure successfully completed.
    SQL> select dt_test_pack.get_global from dual;
    GET_GLOBAL
    --Back to session 2:
    SQL> select dt_test_pack.get_global from dual;
    GET_GLOBAL
           100HTH
    David

  • Can't access variables in specific S7-1200 DB's in LabVIEW project

    Hi all,
    I'm trying to establish a connection between LabVIEW and a Siemens S7-1200 though Ethernet and SIemens OPC Server.
    The physical connection is OK (I can ping S7-1200 with no problem).
    When I needed to access variables from specifics DB's inside S7-1200 ( I want to access variable DB190,X0.4), I called Siemens support and they said I had to modify the variable's definition when using OPC Scout, from "MX0.4" to "DB190,X0.4", and then it was possible to access this variable.
    Same solution (renaming the path) applies to NI OPC Client, I can read and write variables properly.
    My problem is that when I try to add variables in LabVIEW Project, I can't find those variables whose address were modified, so I can't access the correct variable in my program.
    I tried to change the variable path in Multiple Variable Editor, but it doesn't work either.
    Any suggestions on what I can try??

    First: Avoid the ODBC/JDBC Bridge if at all possible.
    It's the worst JDBC driver I've ever seen. It's buggy
    and a great hindrance both to learning and to
    producing usefull code.I agree that there might be problems with M$ Access, but there are problems with all databases, including MySQL (e.g., no referential integrity in free download version). It's capable enough for the query the OP is trying to execute.
    The problem is with his code, not Access or the bridge driver. He'll go through a lot of effort to switch databases and still have this problem. Better to understand what HE'S done wrong and fix it so he'll do it correctly for all databases, including Access.
    You just need to be more careful with your query, I'm sure.
    %

  • Reuse Variable In Packages

    I have a scenario where I need to reuse the variable in several packages without refreshing it. For example I have package 1, 2 and 3. I have defined a variable var_timestamp with latest value and declare this variable in package 3, I have generated scenario of package 1 and 2 and insert it in package 3. I refresh the variable as first step and reuse the variable in package 1 and 2 without refreshing it but var_timestamp value is not recognized in package 1 and 2.I didn't declare these variable in package 1 and 2 as I dont want it to be refresh again. I have tried Not Persistant variable as well but it didn't work. Any clue how can we reuse the variable without refreshing it in different packages.
    Thanks
    Kash

    When you use a variable in a package it is important to declare it
    Use the variable as Latest Value
    Dont use the Historize or Persistent
    If you have declared and refreshed it in package 3.......there might be 2 steps right?
    1st step as declare and another step as refresh
    In your packages 1 & 2, you should make a step as declare variable only, where you should drag your variable in the package and make it a declare variable step
    And re-generate the scenario to be able to get the effect of this change in your scenario
    Let me know in case you face any difficulties

  • What are the Advantages & Disadvantages of Global Variable at Package Level

    Dear Expprts
    Please tell me,
    What is mean by Global Variable?
    What are the Advantages and Disadvantages of Global Variable at Package Level against Private Variable?

    HI
    GLOBAL VARIABLE UR USE ANY BLOCK IN PLSQL
    BUT LOCAL VARIABLE USED ONLY THERE THEY DECLARE.
    REGARDS
    MOHAMMADI

  • Problems importing/accessing javafx.* packages in JS FXML script

    I cannot figure out how to import access javafx.* packages in FXML JS-scripts. Currently trying the following, example code provided below:
    FXML
    <fx:script source="myscript.js"/>
    <HBox fx:id="myBox" onDragDetected="featureDragDetected(event)" />
    JS-script (myscript.js)
    function featureDragDetected(event) {
      event.getSource().startDragAndDrop(javafx.scene.input.TransferMode.ANY);
    I get the following error message:
    javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "javafx" is not defined. (<Unknown source>#6) in <Unknown source> at line number 6
      at com.sun.script.javascript.RhinoScriptEngine.eval(Unknown Source)
      at javax.script.AbstractScriptEngine.eval(Unknown Source)
      at javafx.fxml.FXMLLoader$ScriptElement.processStartElement(FXMLLoader.java:1323)
    What am I doing wrong?

    It works on my system.
    MyClass.java
    package com.foo.java;
    public class MyClass {
        @Override
        public String toString() {
            return "My Class";
    MyFXScript.fx
    package com.foo.javafx;
    import com.foo.java.*;
    var myClass = new MyClass();
    println(myClass);standard-run:
    My Class
    browser-run:
    jws-run:
    midp-run:
    run:
    BUILD SUCCESSFUL (total time: 3 seconds)

  • Access variables within a timer

    How can I access variables within a timer?
    I mean variables, that I can use in another class that extends applet i.e.?

    The Code can be compiled now with the Java Compiler.
    But the image won't move on the screen.
    import java.applet.*;
    import java.awt.*;
    import java.util.*;
    public class ChangingApplet extends Applet {
      private Image EricsBild;
      private int x,y;
      private TimerTask update;
      public void start() {
      EricsBild = getImage(getCodeBase(), "heuschrecke.gif");
      x=5;y=5;
        update = new TimerTask() {
          public void run() {
            if (x<300) x++;
            if (y<200) y++;
            if (x>3) x--;
            if (y>2) y--;
            repaint();
        Timer t = new Timer(false);
        t.schedule(update, 1000, 1000);
      public void stop() {
        update.cancel();
      public void paint(Graphics g) {
        g.drawImage(EricsBild,x,y,this);
    }

  • Accessing variable in main mxml from component

    I have the following problem, i have a main mxml and
    component mxml which i import in my main file. I need to access
    variable in main mxml file from that component but i don't know how
    to reference my main mxml from component? Can someone please help
    me with this?
    thanks in advance

    Try this
    this.parentApplication.main_mxml.variableID = 34;
    Rgds
    JFB
    "msabljic" <[email protected]> wrote in
    message
    news:fd2u5k$a17$[email protected]..
    >I have the following problem, i have a main mxml and
    component mxml which i
    > import in my main file. I need to access variable in
    main mxml file from
    > that
    > component but i don't know how to reference my main mxml
    from component?
    > Can
    > someone please help me with this?
    >
    > thanks in advance
    >

  • Passing Record Variable through Packages

    I have a question and hope that someone can help me to find the solution.
    I'm developing an application and I need to pass values form one procedure PR in package B to a function FN in package A. The why I try to go is passing the values by using a variable of record type.
    I have defined in both packages the same record structure that I also use in the declarations of procedure and function. I first compiled successfully the package A but when I try to compile the package B I get a compilation error:
    PLS-00306: wrong number or types of arguments in call to 'B.FN'
    It looks like the parameter definition or reference gets lost.
    Here below a very schematic example of my application:
    create or replace package A is
    type Rec1 is record
    ( rf1 T.f1%type,
    rf2 T.f2%type,
    rf3 T.f3%type)
    function FN ( Par in Rec1 ) return boolean;
    end;
    create or replace package A is
    function FN ( Par in Rec1 ) return boolean is
    V_ret boolean;
    begin
    whatever it does
    return V_ret ;
    end;
    end;
    create or replace package B is
    type Rec1 is record
    ( rf1 T.f1%type,
    rf2 T.f2%type,
    rf3 T.f3%type)
    procedure PR ( Par in Rec1 ) return boolean;
    end;
    create or replace package B is
    procedure PR ( Par in Rec1 ) is
    VP Rec1;
    V_go boolean;
    begin
    VP.rf1:= something_1;
    VP.rf2:= something;
    VP.rf3:= something;
    V_go:=FN ( VP ); <= here the compiler complaints
    whatever it does
    end;
    end;
    Many thanks for a quick answer.

    Okay I didn't notice the error message text in the body of the paragraph above.
    PS. If I specify singularly the fields in the parameter list I pass the compilation
    but I would like to use a record variable as one.Did you see my post where I always reference the record variable in package A?
    create or replace package B is
    procedure PR ( Par in A.Rec1 ) return boolean;
    end;
    create or replace package B is
    procedure PR ( Par in A.Rec1 ) is
    VP A.Rec1;
    V_go boolean;
    begin
    VP.rf1:= something_1;
    VP.rf2:= something;
    VP.rf3:= something;
    V_go:=A.FN ( VP ); <= here the compiler complaintsIt should work.

  • SSIS accessing a dts package properties with C#

    Hello there, 
    Please, Could anyone help me and let know how i can access the "DTS package" Proeperties eg. PackageName?
    And which namespace does DTS belong to: (as in "using Microsoft.SqlServer. ....")
    In C# please!

    Hi,
    This is a sample code for reading the package transformation info
    static void Main(string[] args)
    String location = @"DTS.Old\SomeDTSPackage.dts";
    DTS.Package pkg = new DTS.Package();
    DTS.Task task;
    DTS.DataPumpTask2 dataPumpTask;
    DTS.Transformation transform;
    DTS.Column source;
    DTS.Column destination;
    pkg.LoadFromStorageFile(location, null, null, null, null, null);
    Console.WriteLine("{0}", pkg.Name);
    Console.WriteLine(" TASKS");
    for (Int32 tsk = 1; tsk <= pkg.Tasks.Count; tsk++)
    if (pkg.Tasks.Item(tsk).CustomTaskID == "DTSDataPumpTask")
    dataPumpTask = (DTS.DataPumpTask2)pkg.Tasks.Item(tsk).CustomTask;
    Console.WriteLine(" TRANSFORMS");
    for (Int32 trans = 1; trans <= dataPumpTask.Transformations.Count; trans++)
    transform = dataPumpTask.Transformations.Item(trans);
    for (Int32 col = 1; col <= transform.SourceColumns.Count && col <= transform.DestinationColumns.Count; col++)
    source = transform.SourceColumns.Item(col);
    destination = transform.DestinationColumns.Item(col);
    Console.WriteLine(" {0} -> {1}", source.Name.PadRight(15, ' '), destination.Name);
    Console.ReadKey(true);
    Joe

Maybe you are looking for

  • BAPI_SAG_CHANGE to modify scheduling agreement

    Hi, I need to change item condition values on a scheduling agreement, i'd like to use the bapi BAPI_SAG_CHANGE. Does anyone know how to do it? I'm using sap ecc 6.0 Thanks!

  • Hi been trying to  connect my xbox 360 online  and i am h...

     Hi been trying to  connect my xbox 360 online  and i am having major problems  my router is a WRT54GS v.6 i have the newest firmware also i also use a  linksys  wireless adapter for my pc  i am connecting my 360 to my pc and doing internet connectio

  • Load balancing Client problem

    Hi , This is my environment two 5508 in HA with release 7.4.121, ap 2600 and  ap 3600, in flex-connect wan up local switching. I put client windows size field to 1 and maximum denial count to 1. i connect many client and when i sniff autentication re

  • Perspective effect with Smart Objects (SO)

    Hi, i would like to create a perspective efect on smart objects.everything i read so far was that perspective effect doesn't work (distort) on SO. everybody place the SO almost as they want but to create the perspective effect, they rasterize layer a

  • HRMD_ABA, Infotype 0006

    Hi, I am trying to distribute HR organisational structure to a different system (ECC 5.0). I have selected the HRMD_ABA infotypes 0000, 0001, 0002, 0006 (sub type 1) as filters in the distribution model. I have seen that the employees assigned to one