RMI: problem with static context

I'm trying to do my first RMI application. I have a strange problem. That is I get an error says:
"non-static method authenticate(String userid, String password) cannot be referenced from a static context". The problem is that the context that I call the method is not static. here is the code that I've implementet (or lets say: trying to implement).
     public Session getSession(String userid, String password) {
          Session     session = null;;
          boolean authenticated     = UserManager.authenticate(userid, password);
          if( authenticated ){
               try{
                    session = new Session();
                    session.setSessionId(s_next_session_id);
               }catch(java.rmi.RemoteException e){
                    e.printStackTrace();
                    System.err.println(e.toString());
          } else {
               // throw Exception();
          return (session);
What am I missing here. The context (getSession()) is not static, neither is my method in UserManager. What is wrong? Can anybody help me.
Thanks in advance.

ignore this. I solve the problem

Similar Messages

  • Help ! Problem with static context"

    What does it means ? "non-static variable this cannot be referenced from a static context"
    Error on NEW...
    import java.util.*;
    public class Test {
    public static void main (String[] args) {
    Reponse r = new Reponse ();
    r.demander ();
    System.out.println (r.getBP () + " " + r.getMP ());
    class Reponse {
    public void demander () {
    public int getBP () {
    return (nbBP);
    public int getMP () {
    return (nbMP);
    private int nbBP, nbMP;
    }

    georgemc wrote:
    phdk wrote:
    tsith wrote:
    phdk wrote:
    Why is your Reponse class not public?Because that would cause a compiler error?Thanks tsith!
    Maybe I misunderstand your reply.
    I am sure you had no idea what I meant. I'll try to make it clear.
    Is there any reason why it is defined as an inner class?It's not an inner class, it's a top-level class, hence tsith's responseActually, it is defined as an inner class, but the lack of code formatting makes this hard to see:
    import java.util.*;
    public class Test {
        public static void main (String[] args) {
            Reponse r = new Reponse ();
            r.demander ();
            System.out.println (r.getBP () + " " + r.getMP ());
        class Reponse {
            public void demander () {
            public int getBP () {
                return (nbBP);
            public int getMP () {
                return (nbMP);
            private int nbBP, nbMP;
    }Why an inner class? My guess is that the OP doesn't know what he is doing.

  • Problems with external context mapping

    Hi ,
    I am having the following problems with external context mapping from one WD component to another.
    Problem description:
    In the <i>Component Interfaces</i> I have defined a WD interface "InfA".
    In the <i>interface controller</i> of this compoenent,I have ContextA and attributeA(cardinality 1..1).The contextA is marked as an "Input Element".
    Now my webdynpro componentB adds InfA as used component.In componentB I decalre a contextB with attributeB and map it to contextA to set up the external context mapping.
    Now I expect that if any webdynpro component implements this WD interface InfA ,he has access to contextA with the data getting filled from contextB.
    After i have created the component for the used component I try to fill values in the source node contextB thru this code:
    wdContext.currentContextB.setB(value);
    But in the runtime I keep getting error nullPointerException for nodeContextB,suggesting that the mapping has not been completed.
    Can anyone suggest due to what the error can come ,and, if its a webdynpro bug ,is there a workaround??
    Thanks in advance for your help.
    Best regards
    Sourav

    HI,
    Valery : I personally checked  by doing the example, if the names of value attribute are different in the child's interface and parents component controller then it throws the exception.
    Sourav: NullPointer Exception is thrown when something is not properly initialised, if in the main component the cardinality of mapped origin is 1.1 then you need to access it element directly like:
    wdContext.currentParentNodeElement().setFname("Abhijeet");
        wdContext.currentParentNodeElement().setLname("M");
    i will suggest just check out if you are declaring some element of value node and without initialising taking its use or what?
    if this doesnt solve your problem, please post the expanded exception.
    hope it helps
    let me know if you face nay problem
    regards

  • Problems with Static and non-static stuff

    Right now I am trying to work on a RPG and trying to make it all using classes instead of having a Applet run everything and want to call Methods to make / remove the buttons here is the Method I'm dealing with
        public void placeButtons()
            attackBtn.setBounds(200,700,75,25);
            defendBtn.setBounds(200,725,75,25);
            magicBtn.setBounds(275,700,75,25);
            itemBtn.setBounds(275,725,75,25);
            game.add(attackBtn);   // Here is where I am having the problem (non-static method add(java.awt.Component) cannot be referenced from a static context)
            attackBtn.addActionListener(this);
        }Normally I would be making all my buttons in my main class but I want to know if I can make them in a separate class and load them in my main class so I can shorten my code by a ton.

    Generally speaking: Yes: you are only limited by your ingenuity and knowledge.
    //call from other class
    MyButtonClass mbc = new MyButtonClass();
    MyPanel p = new MyPanel();
    p.add(mbc.getMyMainButton());
    //what everAlthough I would think that it may be better to get your entire Frame back for display or a panel... It just seems like it's going to be awkward to work with unless you're making some kind of button generator or something, but then it's your app and from your description, the code given should illustrate a way of getting to the answer you seek.

  • Problem with static and nonstatic objects in same code?

    Hi everyone, I am working on a project and I kept running into an odd problem where my code would compile but when I went to run the code I would get an exception. I finally narrowed my problem down to a small fragment. Here is an example.
    class Mut{
    static Mut Fido = new Mut();
    Mut Sammy = new Mut();
    public static void main(String args[]){
    This piece of code will compile but when I run it on an WindowsXP machine the JRE tells me there is an exception at line 3. If I change the code to this:
    class Mut{
    static Mut Fido = new Mut();
    static Mut Sammy = new Mut();
    public static void main(String args[]){
    The code runs fine without any problems. My question is: why can't I create a static object and a nonstatic object in the same class? Is this a certain feature of JAVA I don't understand or is this a blackbox problem with XP? Any help is appreciated. Thanks
    Vance

    Is the exception stack trace what is displayed in the command-line window? If it is here is what is displayed(This is a lot):
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    at Mut.<init>(Mut.java:3)
    C:\>
    I don't know if this is everything because the winow won't let me scroll back up to where I enterd "java Mut"
    Hope this helps.
    Message was edited by: Vance
    cell@tech

  • Problem with static display...

    Hi All,
    I have a problem with my computer displaying a static screen... See model and OS below.
    Sometimes when I am booting up, the screen will display a static-like display. This happens only once in a great while. Sometimes it will happen when waking from sleep. Recently however, it has happened while using the computer right in the middle of doing something...! So I unplugged the monitor connection and plugged it back in... voila! The computer screen comes back! One thing I do know is that the computer is operating behind the static. Just that the image is not displaying what it is supposed to display.
    I've run AHT and it finds nothing. Would this be a graphics card problem (my guess)? Or other? I just read this thread...
    http://discussions.apple.com/thread.jspa?threadID=1947029&tstart=0
    ... and they have found no solution either. Not sure if it's the same problem over several versions of OSX and graphic cards, which makes me think it could be a software problem.
    An image of my screen with all the static can be found here:
    http://i276.photobucket.com/albums/kk19/wanoyee/DSCF2445.jpg
    This is on a 27" Dell display.
    Does anyone know if this is a software issue or hardware issue? Fixes? Anyone else with this problem?
    Thanks for any help.

    Display card is stock Radeon ATI 5770. I'm using a single DVI cable connected directly to the graphics card using the DVI port. No other adapters/converters. Snowy display seems to happen more often lately.
    *This from my Mac...*
    ATI Radeon HD 5770:
    Chipset Model: ATI Radeon HD 5770
    Type: GPU
    Bus: PCIe
    Slot: Slot-1
    PCIe Lane Width: x16
    VRAM (Total): 1024 MB
    Vendor: ATI (0x1002)
    Device ID: 0x68b8
    Revision ID: 0x0000
    ROM Revision: 113-C0160C-155
    EFI Driver Version: 01.00.436
    Displays:
    DELL 2709W:
    Resolution: 1920 x 1200 @ 60 Hz
    Pixel Depth: 32-Bit Color (ARGB8888)
    Main Display: Yes
    Mirror: Off
    Online: Yes
    Rotation: Supported
    Display Connector:
    Status: No Display Connected
    Display Connector:
    Status: No Display Connected
    Also:
    ATI Radeon HD 5770:
    Name: ATY,Hoolock
    Type: display
    Driver Installed: Yes
    Bus: PCI
    Slot: Slot-1
    Vendor ID: 0x1002
    Device ID: 0x68b8
    Subsystem Vendor ID: 0x106b
    Subsystem ID: 0x00cf
    Revision ID: 0x0000
    Link Width: x16
    Link Speed: 5.0 GT/s

  • Problem with total context score in COMPARISSION VIEW in SSM

    Dear friends,
    We have scorecard  with 4 contexts (region).Every context has 3 level: perspective ,objective KPIs. Every level get score and all the context get total score .We have requirement to compare between  region context scores. For it we use comparison view. BUT AT comparison  view  we can compare the score of perspective ,objective KPIs but not total score of the context .Total score is disappear.  I don’t know if there is bug or it's a problem of implementation. I very glad to get help from us.
    Best regard,
    Benyamin Orit.

    Hi Orit,
    I do not believe its an implementation problem, I have checked our implementation which is currently running SSM 10.1 sp03  and the context score doesn't appear neither in the comparison view.
    Probably this feature is simply not included yet in this sp. Maybe another colleague can confirm if this feature is included in further sps... but I didn't find any release note mentioning it, and according to a screenshot I just saw (posted by Colin Cooper on the ideas place), it doesn't seem to be included in sp06 (see Colin's screenshot of comparison view without context scores showing).
    In the main time try to work around it, maybe creating a new level (perspective) thats called "context xxx score" and put the rest of the scorecard one level under it, even though it doesn't sound very purist, you should be able to compare all context scores on the comparison view tab.
    Regards,

  • Problems with static and this

    Hello i am implementing a listener and i try to invoke the listener=this as planned. I am having problems because my method is static and it is so because i need to call that method in my main!
    <code>
         public static void add2hash(String url,ComObject com)
              com= new ComObject(urlPool);
              i++;
              cl = Hashtest;// what to do with this?<-- PROBLEM!!!!
              //new ComObject(); this?
              co.addComListener(cl);
              System.out.println("Let's start!\n ComObject Listening to itself: ");
              String host=str2host(url);
              ht.put(host,co);
              //co.checkStatus();
              //return co.getIs();
    </code>

    RE: tschodt
    I'll start with a comment of agreement :)
    You are having problems because you have yet to grasp the concept of OO.An insightful comment, this seems apparent. :)
    BTW, this has nothing to do with native methods, snip
    Well... just a minor point... but it would appear his code is dealing with some Win32 natives, either from JacobGen or J-Integra, since he is using a ComObject object (I could be way off base as I don't see any import statements.) Maybe follow-up questions in this thread could be relating to the API functionality of some of the classes he's using? :)
    RE: original poster
    If you do want to call this directly from main, take note of the name of the class in which this is defined. Then import the package and class into the class containing your main method (if your main isn't in the same package as the class containing add2hash). Then call OtherClass.add2hash(); from main.
    On another note, in order for us to understand your comment indicating a problem with the ComObject assignment, we'd need to know where you got that object -- maybe show us your import statements? :)
    Regards,
    Sean
    /watchlists topic

  • IOS 8 + landscape mode + AIR SDK 16 & 17 = problem with lost context

    It's seems that the "landscape" orientation make a 100% reproductible beug on my apps when I return to it after calling the camera or "picture explorer" (with a native extension or with AS3, this is the same problem).
    The problem is huge !! : no more texture present on the app, the photo taked with cam is partially visible, sometime a black square blink, no more interaction seems possible.
    I only reproduce this beug in landscape orientation, with ios8 and Air Sdk 17.0.0.124 or Air Sdk 16 on iphone 6.
    No problem with portrait orientation or Air Sdk = 15 or with a different version of ios.
    I've modified the last "Demo_Mobile" example include in starling, put the app in landscape mode and added a simple call to CameraUI, I still have the same problem.
    Any idea ?
    P.S :
    I'm also interested to know if someone else can or can't reproduce the beug on iphone6 with the starling example in landscape mode or
    can simply call the camera in landscape mode without problem on iphone 6 with the SDK 16 or 17.

    Hi,
    I faced the same problem using iAd iOS Extension (Adobe and Milkman Games ANEs).
    When a user clicks on one of the banner ads, a fullscreen pop-up ad is shown, and after closing this screen, the size of my app (a Starling app) is reduced by one third, I get a blinking rectangle on the top of the screen and a white rectangle on the vacuum remaining third to right.
    AIRSDK 16.x.x
    AIRSDK 17.0.0.123
    iOS 8.1
    Best regards,

  • RMI Problem with rebind()

    created files as below. All compiled successfully.
    ran <rmic -v1.1 -d %cp% -classpath %cp% server.TempServerImpl> from command window.
    this generated a stub file called TempServerImpl_Stub.class
    I launched the rmiRegistry
    To make the remote object available to recieve mathod calls from clients I run TempServerImpl.class
    But ..... when I run TempServerImpl I get the exception "java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: "
    AND..... my stub class is deleted without any warning!!!
    if I comment out the line "Naming.rebind( serverObjectName, tempServer );" after I generate the stub class then TempServerImpl runs without throwing any exception but this must be included to bind my remote server object to the RMI registry.
    Any ideas what Im missing?
    import java.rmi.RemoteException;
    import java.rmi.server.UnicastRemoteObject;
    import java.net.URL;
    import java.rmi.Remote;
    import java.rmi.Naming;
    public class TempServerImpl extends UnicastRemoteObject implements TempServer{
       public TempServerImpl() throws RemoteException {
          super();
       public Info getInfo() throws RemoteException{
          return new Info("some temperature data returned");
       public static void main( String args [] ) throws Exception{
          TempServerImpl tempServer = new TempServerImpl();
          String serverObjectName = "//localhost/TempServer";
          Naming.rebind( serverObjectName, tempServer );
    //************ Remote Interface
    import java.rmi.*;
    import java.rmi.RemoteException;
    public interface TempServer extends Remote {
      public Info getInfo() throws RemoteException;
    import java.io.Serializable;
    public class Info implements Serializable{
       private String data;
       public Info(String data){
          this.data = data;
       public String toString(){
          return this.data;
    [\code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Are you sure that the stub is being deleted, or is it just that the exception message says it can't be found. If it's the latter it might be that the stub is not in the class path of either the commandline running the rmi registry or the commandline running the TempServerImpl. However as you are running this i assume it ok.
    The code looks fine, The problem is something to do with classpaths ect.

  • Problems with static IP from TP-Link Access Point

    Hello Guys!
    I'm new with Apple - i got a Macbook Pro Mid 2012 since 2 weeks.
    Everythings running fine and im really happy with the Macbook - except of the Wifi.
    I have the problem that the internet connection is just working temporarily, sometimes its just working for 1 minute, then its just stopping. im still connected to the wifi, no connection abortion. websites are just not getting loaded or just half.
    i cant find a solution for it, so please help me
    I connected a TP-Link tl-wa801nd with a ethernet cable to our companys network - creating a wifi network access point with which i can connect to with my devices (Macbook Pro, iphone and Win7 PC)
    I have to give my devices a static ip, when i want to connect with it:
    IP: 192.168.0.151 - 192.168.0.199
    Subnet mask: 255.255.255.0
    Router and DNS: 192.168.0.1
    These preferences are working perfect with the iphone, Win 7-PCs and some friends Android or BB phones. No problems.
    Except of the Macbook pro:
    I got the newest Mavericks on it and the same network preferences (except of a ascending ip address and the search domain 192.168.0.1)
    But like i said above - network is just working temporarily, sometimes for 1 minute, then stopping for 10 minutes... The problem must be the macbook, because every other devices is working fine.
    Thank for your helping answers
    banana-benjiro

    Hello banana-benjiro,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    Safari 5.0.1 or later: Slow or partial webpage loading, or webpage cannot be found
    http://support.apple.com/kb/ts3408
    Best of luck,
    Mario

  • Any help with this program (a bit of a problem with static references)

    Can anyone give me any suggestions for fixing this code:
    package vivarium;
    import javax.swing.JApplet;
    import javax.swing.JFrame;
    import java.awt.*;
    import java.applet.*;
    import java.net.*;
    public class Render extends java.applet.Applet {
         static Animal[] animal_array_world;
         public static void main(String s[])  {
              JFrame frame = null;
              Graphics g = null;
              int[][] grassarray = new int[16][16];
              createapplet(frame);
              Render r = new Render();
              r.rendergrass(g, grassarray);
              frame.paint(g);
              //createcreatures(20);
              //live();
         public void rendergrass(Graphics g, int[][] array) {
              URL codebase = getCodeBase();
              java.awt.Image grass =  getImage(codebase, "grass.JPG");
              java.awt.Image deadgrass =  getImage(codebase, "deadgrass.JPG");
              for(int i = 0; i < 16; i++)
                   for(int j = 0; j < 16; j++) {
                        int y = (i * 16);
                        int x = (j * 16);
                   if(array[i][j] == 0) {
                        drawimage(g, grass, y, x);
                   else
                        drawimage(g, deadgrass, y, x);
         public  void drawimage(Graphics g, java.awt.Image img, int y, int x) {
              g.drawImage(img, y, x, this);
         public static void createapplet(JFrame frame) {
              frame = new JFrame();
              frame.setTitle("Kirby's Vivarium Demo");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JApplet applet = new RenderApplet();
              applet.init();
              frame.getContentPane().add(applet);
              frame.pack();
              frame.setVisible(true);
         //this creates an array of creatures
         public static void createcreatures(int x) {
              animal_array_world = new Animal[x*2];
         //this will than act on that
         public static void live() {
              while(true) {
              int i = 0;
              while(i != animal_array_world.length - 1) {
                   animal_array_world.live(animal_array_world);
    The problem seems to be with
    URL codebase = getCodeBase();
    java.awt.Image grass =  getImage(codebase, "grass.JPG");
    java.awt.Image deadgrass =  getImage(codebase, but I do not get how. This is a non-static field, but no matter what I do it seems to complain in some manner. Does anyone have any suggestions? Thanks!

    Exception in thread "main" java.lang.NullPointerException
         at java.applet.Applet.getCodeBase(Unknown Source)
         at vivarium.Render.rendergrass(Render.java:29)
         at vivarium.Render.main(Render.java:20)I get this despite whether I put the getCodeBase part in a method, the main or the initialization block.
    Heres line 29: URL codebase = getCodeBase();This is called within my nonstatic method rendergrass.
    And heres line 20: r.rendergrass(g, grassarray);(Where r is a new Render class object)

  • Problem with CrossComponent Context Mapping with PopupWindow (web dynpro ab

    The situation:
    I have four views (View V1, V2, V2_popup, V3) in three Components C1, C2,C3.
    View V1 is embeded in Component C1. View V2 is embeded in C2 with view V2_popup as Popup-Window.
    View V3 is embeded in Component-C3. And at last the View of Component C2 and C3 are embeded in View V1.
    The Problem is the CrossOver Context Mapping between the view V2 and V3.
    My first way is the "direct context mapping":
    I define a node in the ComponenteControllen from Component-C2 as interface and use it over the ComponentenController
    from Component-C3 in view-V3. Now I bind an attribute of the mapped node to an ui-element (e.g: inputfield),
    but the output of the Field is empty.
    The second way is, that I define an external Mapping for this situtation.
    I define a node in the componente-controllen from Component-C2 (an Component-C3)as interface with the attribute "Input Element (Ext)".
    Than I map the two nodes with a node from Component-C1. That's works fine.
    BUT, if I execute an action (e.g. action_save)in the popup for view-v2 (V2_popup) the changings from the inputfields don't write (show)in the context of the
    popup-view. I check this with the debugger. And if I close the popup and open it again, the changings are visible.
    Short: If I define a node with attribute "Input Element (Ext)", I don't can read changings from
    the screen in a popup-window.
    How I can solve this problem???
    Message was edited by:
            Maik Sturm

    Hi Maik,
    try this:
    at first you have to instantiate all! used components in the wddoinit method of the componentcontroller in your main (c1) component.
    e.g. instance of c2 Component
      lr_usage_c2_comp =   wd_this->wd_cpuse_c2_comp( ).
      IF lr_usage_c2_comp->has_active_component( ) IS INITIAL.
        lr_usage_c2_comp->create_component( ).
      ENDIF.
    and at the end set the reference:
      l_ref_interfacecontroller =  wd_this->wd_cpifc_c3_comp( ).
      l_ref_interfacecontroller->set_usage(
        ir_usage_c2_comp = lr_usage_c2_comp ).
    set_usage is a method in the c3 component controller,
    METHOD set_usage .
      DATA: lr_usage TYPE REF TO if_wd_component_usage.
      lr_usage = wd_this->wd_cpuse_c2_comp( ).
      lr_usage->enter_referencing_mode( ir_usage_c2_comp ).
    After doing this the components are using the same instance and you can simply use direct mapping between the components.
    Hope it helps.
    regards
    Christian

  • Problem with Multiple Context Creation

    Hi,
    We are facing a java.lang.SecurityException Invalid Subject
    We need to create multiple Initial Contexts for a single thread.
    Following is the Scenario
    1) The user will access Servlet/Struts Action class which performs database call and EJB(one, two) calls with different Initial Contexts ( Credentials are different)
    2) At the same time the Timer Task runs in back ground which is invoked from servlet load-on-startup and runs for every 1 min.
    3) The Timer Task invoke an MDB this MBD will make an external EJB (three) call for business logic.
    {color:#ff0000}Please Suggest me the Sequence of step I am expecting are correct or not{color}
    1) The Timer Task will run in the same JVM where the Servlet/Action classes are loaded (WEB-CONTAINER)
    2) The Thread created for Servlet/Action class will not be shared by Timer Task.
    3) The Thread created for Timer Task and the MDB are different.
    4) So the Servlet - Thread, Timer Task Thread and MDB Thread are different.
    The Behavior of the Context is as follows according to Bea Document.
    [http://e-docs.bea.com/wls/docs81/jndi/jndi.html#476864]
    JNDI Contexts and Threads
    How to Avoid Potential JNDI Context Problems (Please Refer this Paragraph)
    I am closing the entire Context's immediately after lookup
    Still we are facing this java.lang.SecurityException Invalid Subject Exception Problem
    The Context of EJB which we are calling from MDB is sharing the Servlet/Action Class Context -- Credentials
    Example_
    {color:#ff0000}Servlet/Action Class Context Credentials -- are user1/pass1{color}
    {color:#ff0000}EJB (three) Context Credentials -- are user3/pass3{color}
    When EJB (Three) lookup is invoked it&rsquo;s throwing the following Exception
    *java.lang.SecurityException: [Security: 090398] Invalid Subject: user1*
    Please advise to solve this problem
    Thank You.

    Solved By myself
    There is problem while passing data to internal table for item level

  • Problems with static member variables WAS: Why is the static initializer instantiating my class?!

    Hi,
    I have been hunting down a NullPointerException for half a day to come to
    the following conclusion.
    My constructor calls a method which uses static variables. Since an intance
    of my class is created in the static block when the class is loaded, those
    statics are probably not fully initialized yet and the constructor called
    from the static block has those null pointer problems.
    I've considered moving the initialization of the static variables from the
    declaration to the static block. But your code is inserted BEFORE any other
    code. Therefore not solving my problem.
    Two questions:
    1) what would be a solution to my problem? How can I make sure my static
    variables are initialized before the enhancer generated code in the static
    block calls my constructor? Short of decompiling, changing the code and
    recompiling.
    2) Why is the enhancing code inserted at the beginning of the static block
    and not at the end? The enhancements would be more transparent that way if
    the static variables are initialized in the static block.
    Thanks,
    Eric

    Hi Eric,
    JDO calls the no-args constructor. Your application should regard this constructor as belonging
    primarily to JDO. For example, you would not want to initialize persistent fields to nondefault
    values since that effort is wasted by JDO's later initilization to persistent values. Typically all
    you want to initialize in the no-args constructor are the transactional and unmanaged fields. This
    rule means that you need initialization after construction if your application uses the no-args
    constructor and wants persistent fields initialized. On the other hand, if your application really
    uses constructors with arguments, and you're initializing persistent fields in the no-args
    constructor either unintentionally through field initializers or intentionally as a matter of
    consistency, you will find treating the no-args constructor differently helpful.
    On the other hand, if Kodo puts its static initializer code first as you report, then it is a bug.
    Spec Section 20.16: "The generated static initialization code is placed after any user-defined
    static initialization code."
    David Ezzio
    Eric Borremans wrote:
    >
    Hi,
    I have been hunting down a NullPointerException for half a day to come to
    the following conclusion.
    My constructor calls a method which uses static variables. Since an intance
    of my class is created in the static block when the class is loaded, those
    statics are probably not fully initialized yet and the constructor called
    from the static block has those null pointer problems.
    I've considered moving the initialization of the static variables from the
    declaration to the static block. But your code is inserted BEFORE any other
    code. Therefore not solving my problem.
    Two questions:
    1) what would be a solution to my problem? How can I make sure my static
    variables are initialized before the enhancer generated code in the static
    block calls my constructor? Short of decompiling, changing the code and
    recompiling.
    2) Why is the enhancing code inserted at the beginning of the static block
    and not at the end? The enhancements would be more transparent that way if
    the static variables are initialized in the static block.
    Thanks,
    Eric

Maybe you are looking for

  • Transport Request Number - Object Status is LOCKED. What does it mean?

    Hi Friends, When checking in SE09 transaction my TR number "Object Status" is showing as LOCKED. What does it mean Whether I can transport objects under this TR Number to Quality System? Will it give any problem while transporting? Regards, Viji.

  • I got some serious problems installing flash player on windows, please help?

    i got windows 7 but using a safari browser cause none of the other browsers work on my computer, and i have flash player 11 installed but thats just way to outdatet since most of the websites i use require a newer version. so i was wondering if anyon

  • Problem applying clean up diagram

    Hi, Applying Clean up diagram, so that it ordered the scheme, some letters of variables in "Formula Node" are outside the box (some completely), but does not affect operation, anyone know how to fix it and did not write the variable back? . Attached

  • Longer Boot Times correspond to low Cache Hit % in Readyboost log.

    Hi, my boot times vary regardless of any change. The Windows Readyboost log, event id 1015, shows the value for Cache Hit Percentage. When this is low, for example 0.4, the boot time is almost double that of a 0.9 Cache Hit Percentage. Does anyone kn

  • Link to Netwaver Installation Guide ??

    Dear all, I going to install NetWaver in other computer than SAP server. (I want to config Netwaver to use ADS for Interactive form). Could you please send me link to Netwaver Installation Guide? Thanks a lot.