UIImpersonator tests work in FlashBuilder, but not when run from Ant

I'm in the process of converting a Flex 3 project to use FlexUnit4 tests.
Everything compiles in Flashbuilder 4.5 and runs nicely. I've converted all the tests
to use flexunit 4, which highlighted a few issues, but nothing too major, and all the
tests now pass when run in Flashbuilder.
So... now, I'm trying to convert the CI build to use the 4.5 SDK and flexunit4. So far,
so good. Everything runs and I get a nicely formatted JUnit report. Unfortunately, though,
any test that uses the UIImpersonator fails with an async method timeout, suggesting that
the CreationComplete event hasn't fired.
Here's a typical example of one of my UI test cases:
          [Test(async, ui)]
          public function testAvailableProductsSetupAdminForSell() : void {
               var view:OrderBasketView = new OrderBasketView();
               var user:CfxUser = new CfxUser();
               user.admin = true;
               ModelLocator.instance.userDetails = user;
               view.buyOrSell = OrderType.SELL;
               helper.createComponentAndAddListener(view, this, availableProductSetupAdminForSellCreationComplete);
          private function availableProductSetupAdminForSellCreationComplete(event:Event, view:OrderBasketView) : void {
               Assert.assertTrue(view.availableProductTypes.contains(ProductType.PRODUCT_1));
               Assert.assertTrue(view.availableProductTypes.contains(ProductType.PRODUCT_2));
               Assert.assertTrue(view.availableProductTypes.contains(ProductType.PRODUCT_3));
and helper.createComponentAndAddListener looks like this:
        public function createComponentAndAddListener(view:UIComponent, testCase:Object, creationComplete:Function) : void {
               _view = view;
               _view.addEventListener(FlexEvent.CREATION_COMPLETE, Async.asyncHandler(testCase, creationComplete, 4000, _view));
               UIImpersonator.addChild(_view);
If I use FlexGlobals.topLevelApplication.parent.addChild(_view) in place of UIImpersonator.addChild(_view), all the tests pass.
I was wondering if it's a function of the fact that my helper class has no metadata that indicates it's a ui test, but that wouldn't explain why it works in FlashBuilder and not when run with ant.
I also wondered if it was a function of running with headless server set to true, but when I changed it to false the same thing happened.
My environment is:
ubuntu 11.04
ant 1.7.1
Sun jdk 1.6.0_26
Flex SDK 4.5.1.21328
FlexUnit 4.1.0-8-4.1.0.16076
I'm using the auto-generated TestRunner.mxml
Any thoughts, anyone? Now that I can get it to work by adding the UI components to the topLevelApplication, at least I can make progress, but I'd like to get to the bottom of the problem, because that shouldn't be necessary.
Thanks in advance,
-Chrisl

Changing to the topLevelApplication did not work. What's funny is that it then failed on a completely unrelated test by hanging and never returning... I'm thinking there must be something else that is going on here, but it's not clear what... :-/ Here is an example of my setup/teardown and a test that work great in the UI but not in CI...
[Before(async, ui)]
public function setUp():void
    _fromToList = new FromToList();
    _fromToList.setStyle('skinClass', FromToListSkin);
    Async.proceedOnEvent(this, _fromToList, FlexEvent.CREATION_COMPLETE, 1000);
    FlexGlobals.topLevelApplication.parent.addChild(_fromToList);
    // UIImpersonator.addChild(_fromToList);
[After(ui)]
public function tearDown():void
    FlexGlobals.topLevelApplication.parent.removeChild(_fromToList);
    // UIImpersonator.removeChild(_fromToList);
    _fromToList = null;
[Test(async)]
public function should_remove_selected_item_in_to_list_to_from_list():void
    _fromToList.fromArrayList = _dpArray;
    _fromToList.toArrayList = _toDpArray;
    var sequence:SequenceRunner = new SequenceRunner(this);
    sequence.addStep(new SequenceSetter(_fromToList.toList, { selectedItem: _toDpArray[1]}));
    sequence.addStep(new SequenceWaiter(_fromToList.toList, FlexEvent.VALUE_COMMIT, 100));
    sequence.addStep(new SequenceCaller(_fromToList, _fromToList.remove));
    sequence.addStep(new SequenceWaiter(_fromToList, FromToListChangeEvent.FROM_TO_LIST_CHANGE_EVENT, 100));
    sequence.addAssertHandler(handleListHasChangedThenRemoveEvent, {});
    sequence.run();
private function handleListHasChangedThenRemoveEvent(event:FromToListChangeEvent, passThruData:Object):void
    assertThat(_fromToList.toArrayList.length, equalTo(_toDpArray.length - 1));
    assertThat(_fromToList.fromArrayList.length, equalTo(_dpArray.length - _toDpArray.length + 1));
    assertTrue(_fromToList.fromArrayList.contains(_toDpArray[1]));
So you can see that I'm using Sequences to manage waiting for stuff to get updated in the background, and basically testing when I select an item in a list and act on it that it updates the model like I expect. Again, works GREAT in the UI Runner.
I'm open to suggestions...

Similar Messages

  • Wifi works at home but not when away from home

    My Wifi works at home but not when away from home, what is wrong?  I thought with a phone plan I didn't need to have a wifi connection.

    You either need WiFi or Cellular (or both). If you have neither, you can't connect to the internet.
    Most people use WiFi at home and Cellular while away from home, or connect to public WiFi networks where there are some.

  • Dynamic Parameter List works on desktop but not when run on Crystal Server

    Hi,
    I have a report, and the database command query takes one parameter ({?Year}. There is a second parameter used for a record select which is a dynamic paramenter list (multiple select, required). When running the report from Crystal Reports 2008 on my desktop, it first prompts for a year, and then once that is entered, it will come back with the list (of Companies) to select from. It works very smootly and as desired.
    But when I load this report to Crystal Reports 2008 Server, it will ask for the year (which is a static list), and this is good, but then it comes back with an empty dynamic select list on the next screen.
    Are there any special caveats that I need to be aware of in regards to dynamic lists when running from the CR server?
    Thanks!

    Hi Pat, 
    This should work but a couple of things to check: 
    1)  Are the two parameters linked to the same database?  If the parameters are linked to fields from different tables in different databases then you need to make sure you set the Database Configuration and have the report log on to both databases. 
    2)  Are Crystal Reports and Crystal Server the same version?  I had problems with parameters after we upgraded to 2008.  We had to install the latest service packs for both Crystal 2008 and the Enterprise Server.  Then we installed Crystal 2008 on the same machine the Enterprise Server was on.  Crystal Reports and the Enterprise Server share some common files.  Some of those files were updated for Crystal but not for the Enterprise Server yet.  Once we synched them our reports have run fine. 
    Good luck,
    Brian

  • Works in RSA3 but not when pulling from BI

    Hi,
      I created a generic dataSource(Function Module) for Bill Of Material. When testing in RSA3 it is working fine. But when pulling data from BI with particular material in the Data Selection, it is saying "No data available". If I am pulling the same with no data selection then it is giving an error message "Job terminated in source system --> Request set to red".
    When checked in SM37 I see the following error messages.
    No active nametab exists for /SAPAPO/MATKEY             DA 300
    Job cancelled after system exception ERROR_MESSAGE
    Can any body help me on this
    Thanks for your help
    Subra

    Every thing is fine in all these transactions SM58, BD87, & WE05. There is no problem with the connections at all. I replicated many times and the error is always the same.
    The error message below is the reason.
    No active nametab exists for /SAPAPO/MATKEY
    This messsage is not coming when testing in RSA3. Only when pulling the data from BI, this error is happening.
    We are not using SAPAPO but still this message is coming up.
    thanks
    Subra

  • CommandAction works through OnDeviceDebug, but not when installed from jar

    Hi everybody,
    I'm trying to run a HelloMIDlet example and if I run it on emulator it works fine, also when I run it on mobile through OnDeviceDebug from eclipse it works fine, but when I install a jar file and run the application it ends with Application Error message and it exits. I found out that the problem might be in the CommandAction method, because when I use this:
    public void commandAction(Command c, Displayable s) {
              notifyDestroyed();
    }then the application works also when installed from jar, but when I use this:
    public void commandAction(Command c, Displayable s) {
       String label = new String("Exit");   //just for test
       if (label.equals("Exit"))
         notifyDestroyed();
    }then it ends with Application Error right after I run the program (and it works when I use OnDeviceDebug). I'm using jdk1.5.0_06 and WTK from Sony Erricsson (my target device is W800i, which supports CLDC1.1 and MIDP2.0)
    My manifest file is
    Manifest-Version: 1.0
    MicroEdition-Configuration: CLDC-1.1
    MIDlet-Name: HelloMIDlet
    Created-By: Sun Microsystems Inc.
    MIDlet-Vendor: Sun Microsystems, Inc.
    MIDlet-1: HelloMIDlet, , HelloMIDlet
    MIDlet-Version: 1.0
    MicroEdition-Profile: MIDP-2.0
    MIDlet-Description: Hello Worldand I don't use the jad file when installing the application (seems to be unecessary when you have a manifest file inside the jar). And I'm unable to debug it because when debugging then it works normally. Also I tried to recompile the BluetoothDemo and the same error(and works through OnDeviceDebug). And when I installed the jar file, which is originally distributed with BluetoothDemo then it worked. When I compared original jar file and my jar file then the only difference was in the size the class files (class files compiled by me were bigger then the class files in original jar file (which work)).
    Any ideas guys and girls?

    I tried that approach but it doesn't work either. I think maybe my directory structure is wrong.
    C:\IRS\IRS.jar
    C:\IRS\irs.hs
    referenced: jar:file://C:/IRS/IRS.jar!/irs.hs
    Am I doing this right?

  • EncryptedLocalStore... works in debug, but not when compiled.

    Okay, so I looked around the forum and saw a couple of people with this same problem, but their solutions didn't seem to help me. I don't know if it's because I didn't understand them, or what.
    Here's my problem.
    I've written a nifty little AIR app (AIR 1.5), using Aptana, JavaScript (jQuery) and HTML. The app works perfectly when run from the debugger inside of Aptana.
    However, when I deploy the application (sign it with my self-signed certificate, etc.) and then install it, all of the ELS functionality ceases to work.
    I'm obviously not the first person this has happened to, but I don't know what it is that I'm doing wrong.
    If it helps, here is the code for my DataStoreManager:
    var DataStoreManager = function(){
         return{
              __insert: function(key, data){
                    * function to insert data into the local encrypted datastore
                    * @author: Chris Jordan
                    * @date: 03/22/2010
                    * @param: key - the key to save the data to in the encrypted store.
                    * NOTE:
                    *  This now relys on the global AppConfig object rather than any passed in values.
                   var my = {};
                   //serialize the AppConfig object
                   my.serializedAppConfig = jQuery.toJSON(data);
                   my.byteArray = new air.ByteArray();
                   my.byteArray.writeUTFBytes(my.serializedAppConfig);
                   air.EncryptedLocalStore.setItem(key, my.byteArray);
                   em.dispatchEvent("DataStorageComplete");
              __read: function(key){
                    * function to read data from the local encrypted datastore
                    * @author: Chris Jordan
                    * @date: 03/23/2010
                   var my = {};
                   //get the byteArray back out of the encrypted local store
                   my.byteArray = air.EncryptedLocalStore.getItem(key);
                   if(my.byteArray != null){
                        //if we got something back, then read it and return it.
                        return my.byteArray.readUTFBytes(my.byteArray.bytesAvailable);
                   else{
                        return "";
              __remove: function(key){
                    * function to remove data from the local encrypted datastore
                    * @author: Chris Jordan
                    * @date: 03/23/2010
                   air.EncryptedLocalStore.removeItem(key);
    BTW, is there a better way to insert code snippets into a forum post? I just manually edited the html to make it a bit nicer to look at. Anyway, that aside, I'm hoping that someone can help me with my real issue.
    Thanks!

    Okay, so I switched from using the ELS to just writing my serialized string out to a file. This didn't fix my problem though. The app still behaves the same way. Only now, I can monitor that file that I'm writing the serialized string to, for changes and I learned something by doing this.
    My app has a config screen that gathers three pieces of information and stores it. So the user opens this screen, adds the data, and clicks save to write the data to a file, and close the window. So the end result of clicking save is that the config window closes (after having written the data to file).
    When I export the app and run it, I add some data and click save, but the window doesn't close. I can, at that point look at the config file and see that the data has indeed been serialized and written to the file. It just appears that the screen hasn't closed. So, I click save again (what else am I going to do?). This time the window closes, but an empty string has been written out to the file replacing the config string I had out there to begin with!
    So when I saw this behavior I immediately thought that maybe I had a timing issue. I should probably explain that I'm using jQuery (.bind and .trigger) to implement the observer pattern in this app. So, when I click the "Save" button, an event gets dispatched telling the app to write the data down to the disk. When that's done the function that is doing the writing announces that it's done saving, and in response to that announcement I dispatch two other events. One to close the config window, and one that rebuilds a menu using the new config data. These last two events should be mutually exclusive. They don't depend on each other. But just in case, I have tried just dispatching the close window event, and commenting out the rebuild menu event. That didn't help at all.
    So, like I said, maybe I've got some kind of timing issue here. So I took my dispatchEvent function and wrapped it in a timer.
    //the way my dispatchEvent function used to look (without the timer)
    var em = function(){
        return {
            dispatchEvent: function(e, o){
                jQuery(document).trigger(e,[ o || null ]);
    //new and improved function with a timer...
    var em = function(){
        return {
            dispatchEvent: function(e,o){
                var my = {};
                my.timeout = setTimeout(function(){
                    jQuery(document).trigger(e,[ o || null ]);
                },100);
    However, for all this... the timer didn't change things at all. I tried 100 milliseconds and 500 milliseconds. No difference. So, maybe it's not a timing issue... I don't know.
    This is really bugging the crap out of me. I'm doing something wrong I guess, but I can't seem to figure out for the life of me, what the hell it is! Maybe I've just been staring at the code too much, but I could really use a hand. Has anyone else ever encountered this kind of thing before?
    I'm starting to wonder what sort of apps have been written for the AIR platform using JavaScript. Is this happening because of the way I'm implementing the observer pattern or what? I know that last one would be difficult to answer without having all my code to look at, but I'm not beyond thinking that I've just done something wrong on that front.
    BUT...
    It works PERFECTLY when being run from within the IDE (again, that's Aptana in this case).
    What gives?
    Thanks for reading. I hope someone out there can help me.

  • Applescript works in Automator, but not when app is opened - running all if statements at once?

    Good evening,
    I am new to applescript and have a newbie question regarding the following code. I am making a simple automator program to pull songs from iTunes to practice dancing to. I've started the program with a script that lets the user choose which dances (s)he wants to be played. Then I use applescript to run if statements for each dance, checking whether the dance was selected (and is therefore in "danceList"). If so, I call a separate app to handle finding and playing that dance. The whole thing runs perfectly once opened in automator.
    The problem is when I try to open the app for the first time, whether in finder or in automator -- it calls every single one of the if-statement applications, all at once, before anything else has happened, and thus crashes itself. I have no idea why. I have searched various help sites, tried multiple variations of the if statement code (waltz is an example, below) and making the sub-applications into workflows, but that didn't help.
    Any advice or pointers in the right direction/to appropriate resources would be greatly appreciated.
    Here is a snippet from the relevant code: (didn't include it all, it's the same thing with more if statements)
    on run {danceList}
              if danceList is not null then
                        if danceList contains "Waltz" then
                                       tell application "waltz"
                                                      run
                                       end tell
                                       delay 110
                        else
                                       tell application "waltz"
                                                      quit
                                       end tell
                        end if
                        if danceList contains "Tango" then
                                       tell application "tango"
                                                      run
                                       end tell
                                       delay 110
                        end if
                        if danceList contains "Viennese Waltz" then
                                       tell application "viennese"
                                                      run
                                       end tell
                                       delay 110
                        end if
    ... and so forth ...
        end if
        return danceList
    end run

    Ok, let me try to do a better job explaining.
    I am making this app to simulate the rounds used in competitive ballroom dancing. It lets the user select the dances they will participate in, and then, for each dance, the program reads out the dance title, chooses all songs in iTunes with that genre, selects one at random, starts playing it, waits ninety seconds, and then stops the music. Then a twenty second pause before the next dance. I have made eleven apps for this; one is the main app that calls the others; the others are identical and handle the individual dances.
    Here is all the code I have:
    1. Ask for confirmation - dialogue box explaining app
    2. Get specified text - list of all dances, passed to first section of applescript
    3. First section of script - found on internet, altered for multiple selection; lets user choose multiple dances from a list (code is below pic)
    on run {input, parameters}
    choose item(s) from text
    input: text - items are delimited by paragraphs (returns/newlines)
    output: a list of paragraphs selected
              set output to {}
              set NameList to {}
              set NameList to paragraphs of (input as text)
      activate me
              set TheChoice to (choose from list NameList with title "Choose Dances" with empty selection allowed and multiple selections allowed)
              if TheChoice is false then
                        error number -128 -- cancel
              else
                        set output to TheChoice
              end if
              return the output -- pass the result to the next action
    end run
    4. Store value of variable as "danceList" - probably unnecessary but gave it a name
    5. Second section of applescript - what's been discussed previously, here's the full code:
    on run {danceList}
              if danceList is not "" then
                        if danceList contains "Waltz" then
                                  tell application "waltz"
                                            run
                                  end tell
                                  delay 110
                        end if
                        if danceList contains "Tango" then
                                  tell application "tango"
                                            run
                                  end tell
                                  delay 110
                        end if
                        if danceList contains "Viennese Waltz" then
                                  tell application "viennese"
                                            run
                                  end tell
                                  delay 110
                        end if
                        if danceList contains "Foxtrot" then
                                  tell application "foxtrot"
                                            run
                                  end tell
                                  delay 110
                        end if
                        if danceList contains "Quickstep" then
                                  tell application "quickstep"
                                            run
                                  end tell
                                  delay 110
                        end if
                        if danceList contains "Samba" then
                                  tell application "samba"
                                            run
                                  end tell
                                  delay 110
                        end if
                        if danceList contains "Cha cha" then
                                  tell application "chacha"
                                            run
                                  end tell
                                  delay 110
                        end if
                        if danceList contains "Rumba" then
                                  tell application "rumba"
                                            run
                                  end tell
                                  delay 110
                        end if
                        if danceList contains "Paso Doble" then
                                  tell application "paso"
                                            run
                                  end tell
                                  delay 110
                        end if
                        if danceList contains "Jive" then
                                  tell application "jive"
                                            run
                                  end tell
                                  delay 110
                        end if
              end if
              return danceList
    end run
    Here is the code for the waltz app. All the other dance apps are identical; they just search for different terms and have a different introduction spoken.
    1. Get specified text - "Next Round is the Waltz, etc."
    2. Speak text - reads text out loud so people know what's next
    3. Find iTunes tracks where genre is "Waltz" or "waltz"
    4. select these tracks
    5. store all these in variable "tracks"
    6. applescript to pick a random track from "tracks":
    on run {tracks}
              set maxNumber to count of tracks
              set randy to random number from 1 to maxNumber
              set chosenTrack to item randy of tracks
              return chosenTrack
    end run
    7. 3 second pause between speech and music
    8. Start playing the chosen track
    9. 90 second wait while track plays
    10. pause itunes (stop music)
    11. end app
    Again, my concern here is why the program runs fine once it has already been opened in automator (say second or third time running it there) but when run from finder, or first opened in automator, it calls all the dance apps at once. Then they give error messages because the speech section is first, and this can't be done simultaneously:
    Also, not sure if this is relevant, but I have a spinning gear in the corner of my mac that I believe is automator launcher, and it's showing all the apps as running even after I've ok'd their error messages and they have disappeared from the dock. I can exit waltz and danceApp, which are the two actually running, but the others won't stop until I've ended automator launcher in activity monitor.
    Hopefully this is more helpful. Thanks again.

  • Vi works in LabVIEW, but not when executed by TestStand.

    Hi everybody.  I'm using LabVIEW 8 with the Sound and Vibration
    Toolkit, and TestStand2.  I am planning on using TestStand to
    execute a series of performance tests on an audio processing
    board.  When run independently, the vi (which I have attached
    here) runs correctly, and returns a value for the parameter being
    tested.  In this case it is SNR.
    However, when executed by TestStand, the vi seems to run correctly, but
    returns a value of "NaN".  This causes TestStand to fail the test.
    Does anybody know what is going on here?  I've checked FAQs and
    help files, etc...  Why would the vi work on its own but not in
    TestStand?
    Thanks.
    Brett Gildersleeve
    Attachments:
    SingleChannelSNR.vi ‏173 KB
    Test Sequence.seq ‏15 KB

    Hi Ray,  Thanks for the reply.
    Basically, when I run the VI on its own, I see the SNR value appearing
    both in the SNR indicator and in the Test Data Out cluster under
    Numeric Measurement.  The rest of the indicators are empty
    (string, report text, status, code, source).  My waveform graph
    shows an FFT of the signal.
    However, when running the exact same VI through TestStand, I get NaN as
    the output.  The FFT of the signal is NOT displayed in the
    waveform graph...  strange.  No errors are received.
    In order to make it easier to debug, I replaced all of the analysis functions
    with functions included in LabVIEW 8.  Now everybody should be
    able to run it.  I do a simple THD test this time around.  With the VI running
    on its own, I get a value of 1.8 as the THD and the Numeric Measurement of Test Data
    Out.  However, whenever running the test with TestStand, I get a
    value of NaN.
    Same problem.
    Any suggestions?
    By the way, what exactly do you mean by "wiring
    up the Error cluster and feed in to the Error Out."?  I'd
    like to try it out, but I'm not sure exactly what you mean.  I
    already have the Error out cluster wired up, I think.
    Message Edited by TheSleeve on 05-22-2006 12:12 PM
    Attachments:
    SingleChannelTHD.vi ‏159 KB
    Test Sequence2.seq ‏15 KB

  • Url links in swf work in standalone, but not when opened in browser

    I am currently using flash to create an electronic press kit.
    In that, i have 2 links to youtube (since embedding the videos was
    not an option, making the file too large), and one link to
    yousendit for the viewer to be able to download a pdf file.
    Now when i open the swf by double clicking on it (which i can
    do, but when on another computer, that has flash player installed,
    the swf will not open unless opened through a browser....not sure
    if that is just something where you can open an swf strictly by
    itself only if you actually have flash or what....that is another
    issue), but anyways, when i open the swf by itself, the links work
    correctly. once opened through a browser, the links do not work.
    Safari error:
    Adobe flash player has stopped a potentially unsafe
    operation.
    The following local application of your computer or network:
    (location of swf on harddisk)
    is trying to communicate with this internet-enabled location:
    youtube.com
    To let this application communicate with the internet, click
    SETTINGS.
    You must restart this application after changing your
    settings.
    Of course i did that, and it didnt happen.
    My question is however, even if this is a simple security
    issue/setting within the browser, is there any way to get around
    this? Because when sending this press kit out, the last thing i
    want is for the viewer to have to take the time to change their
    browser settings and try to get this to work and all that stuff.
    Any help would be appreciated.
    You can also download this swf at the following link:
    http://www.yousendit.com/transfer.ph...661F585ACE0521

    The reason the swf doesn't open up by itself on other
    computers is that it needs a Stand Alone Flash Player to do so.
    Most people have the Flash plug-in for their browsers, but not the
    stand alone player. If you are sending it out as a self contained
    file you need to make a Projector file. It contains the SA + swf in
    one file, which adds weight. Also, you need to make a Windows one
    and and a Mac one. If you are using CS3, I think you can make a
    Abobe AIR app that is universal, granted you install the free AIR
    plug-in controlls for Flash ( I THINK. My knowlege is not totally
    up to date) .
    As for the links not working in the browser, its seems like
    they should work. Your posted link for the file is broken, so
    couldn't see. What is your code for the buttons? Are you calling
    JavaScript in your html page? I've had problem with that usually a
    syntax error or IE.
    AS2 button

  • Applet works in JDeveloper, but not when deployed to OC4J

    I am working on an applet version of the BI Beans java client application. It works fine when running in JDeveloper (applet viewer), but fails when deployed to OC4J. The applet shows a red X, with a message in the status bar saying "Loading Java Applet Failed...". Contents of java console are as follows:
    java.lang.NoClassDefFoundError: oracle/dss/selection/step/Step
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
         at java.lang.Class.getConstructor0(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Any one have any ideas how to chase this one down?
    Here is the message that JDeveloper shows when it runs the applet. I have gone thru this and ensured that all these references are selected in my .deploy settings:
    C:\JDeveloper\jdk\bin\javaw.exe -ojvm -Xbootclasspath/a:C:\dev\jdev\Workspace1\TestClientApp\classes;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\biaddinsrt.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\biamlocal.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\bicmn.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\bidataclt.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\bidatacmn.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\bidatasvr.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\biext.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\bipres.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\bidata-nls.zip;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\bipres-nls.zip;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\bicmn-nls.zip;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\biaddins-nls.zip;
    C:\JDeveloper\jdev\lib\ext\..\..\..\jlib\LW_PfjBean.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\jlib\share.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\jlib\jewt4.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\jlib\jewt4-nls.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\infobus\lib\infobus.jar;
    C:\JDeveloper\BC4J\lib\bc4jmt.jar;C:\JDeveloper\BC4J\lib\collections.jar;
    C:\JDeveloper\BC4J\lib\bc4jct.jar;
    C:\JDeveloper\lib\xmlparserv2.jar;
    C:\JDeveloper\jlib\jdev-cm.jar;
    C:\JDeveloper\j2ee\home\lib\jndi.jar;
    C:\JDeveloper\jlib\regexp.jar;
    C:\JDeveloper\jlib\share.jar;
    C:\JDeveloper\jlib\uix2.jar;
    C:\JDeveloper\jdbc\lib\classes12.jar;
    C:\JDeveloper\jdbc\lib\nls_charset12.jar;
    C:\JDeveloper\j2ee\home\lib\ojsp.jar;
    C:\JDeveloper\j2ee\home\jsp\lib\taglib\ojsputil.jar;
    C:\JDeveloper\j2ee\home\oc4j.jar;
    C:\JDeveloper\j2ee\home\lib\servlet.jar;
    C:\JDeveloper\jdev\lib\ojc.jar;
    C:\JDeveloper\jdev\lib\ext\..\..\..\bibeans\lib\olap_api_92.jar;
    C:\JDeveloper\jdev\lib\jdev-rt.jar;
    C:\JDeveloper\BC4J\lib\bc4jhtml.jar;
    C:\JDeveloper\BC4J\lib\datatags.jar;
    C:\JDeveloper\BC4J\lib\bc4juixtags.jar;
    C:\JDeveloper\BC4J\lib\bc4j_jclient_common.jar
    Any assistance would be appreciated.
    s.l.

    i have the same problem
    i cant load my applet on OC4J , i am wondering know how Oracle canot solve this problem

  • Unit test runs perfectly fine with NUnit but fails when run from TestExplorer

    Hello all,
    I have a TestProject, Harmony.Tests. In there, I have a method AddApplicationEvent()
    which calls another method Send(InvokeRequestMessage requestMessage) which calls a webservice (OperationHandlerBrokerWebService). 
    The code snippet looks like this. This is not the complete code but a part where we are calling the web service. It fails on the underlined Italic line of code.
    OperationHandlerBrokerWebService brokerService = new OperationHandlerBrokerWebService();
    brokerService.UseDefaultCredentials = true;
    brokerService.Url = address;
    brokerService.Timeout = timeoutInMilliseconds;
    byte[] serializedResponseMessage = brokerService.InvokeOperationHandler(serializedRequestMessage);
    The same test works and passed fine when I ran it with NUnit, but failed with following exception when I tried to run it from TestExplorer. 
    Test Name: AddApplicationEvent
    Test FullName: N4S.Harmony.Tests.CaseManagement.HarmonyFacadeTests.AddApplicationEvent
    Test Source: d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\CaseManagement\HarmonyFacadeTests.cs : line 665
    Test Outcome: Failed
    Test Duration: 0:00:00.296
    Result Message:
    SetUp : Message returned System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Invalid token for impersonation - it cannot be duplicated.
    at System.Security.Principal.WindowsIdentity.CreateFromToken(IntPtr userToken)
    at System.Security.Principal.WindowsIdentity..ctor(SerializationInfo info)
    at System.Security.Principal.WindowsIdentity..ctor(SerializationInfo info, StreamingContext context)
    --- End of inner exception stack trace ---
    at System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
    at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
    at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
    at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
    at System.Runtime.Serialization.ObjectManager.DoFixups()
    at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
    at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
    at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
    at N4S.Forms.OperationHandlerBroker.AMessage.DeserializeMessage(Byte[] serializedMessage)
    at N4S.Forms.OperationHandlerBroker.WebServiceServer.BrokerService.InvokeOperationHandler(Byte[] serializedInvokeRequestMessage)
    --- End of inner exception stack trace ---
    expected: <0>
    but was: <1>
    Result StackTrace:
    at N4S.Harmony.Tests.TestHelper.InvokeOperation(OperationHandler handler, OperationHandlerInput input, Boolean expectedToWork) in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\TestHelper.cs:line 136
    at N4S.Harmony.Tests.TestHelper.LoginAsUser(String username, String password) in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\TestHelper.cs:line 394
    at N4S.Harmony.Tests.TestHelper.Login(TestUserName requestedUser) in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\TestHelper.cs:line 377
    at N4S.Harmony.Tests.TestHelper.LoginAsAdvisor() in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\TestHelper.cs:line 230
    at N4S.Harmony.Tests.CaseManagement.HarmonyFacadeTests.Login() in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\CaseManagement\HarmonyFacadeTests.cs:line 76
    at N4S.Harmony.Tests.CaseManagement.HarmonyFacadeTests.SetupTest() in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\CaseManagement\HarmonyFacadeTests.cs:line 67
    I am not sure what causing the issue. I checked the Credentials, Windows Identity during both the test run and there is no difference. Please advise !!
    Thanks,
    Deepak

    Hi Tina,
    Thanks for your reply. 
    I do have NUnit adapter installed. I even noticed that the test runs fine with NUnit GUI and also if I run it through Resharper Test Explorer window. 
    As you can see in the image above the same test is passed when I ran it from Resharper Unit Test Explorer window but fails when I ran it from Test Explorer window. I also captured the information on fiddler. 
    There was a significant difference in the Header Content length. Also under the User-Agent property the protocol versions are different. 
    Not sure why VSTest ExecutionEngine is picking a different version.
    The UnitTest in question is calling a webservice method which in turn calls a method from another referenced project. 
    Web Service class
    using System;
    using System.Web.Services;
    using N4S.Forms.OperationHandlerBroker.Server;
    using NLog;
    namespace N4S.Forms.OperationHandlerBroker.WebServiceServer
    /// <summary>
    /// The operaton-handler broker service.
    /// </summary>
    [WebService(Description = "The N4S Forms Operation-Handler Broker Web-Service.", Name = "OperationHandlerBrokerWebService",
    Namespace = "N4S.Forms.OperationHandlerBroker.WebServiceServer")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class BrokerService : WebService
    { /// <summary>
    /// Calls <see cref="HandleRequest"/>. Updates performance-counters.
    /// </summary>
    /// <param name="serializedInvokeRequestMessage">the binary-serialized <see cref="InvokeRequestMessage"/></param>
    /// <returns>the binary-serialized response message</returns>
    [WebMethod(BufferResponse = true, CacheDuration = 0, Description = "Invokes the requested operation-handler and returns a binary-serialized response-message.", EnableSession = false)]
    public byte[] InvokeOperationHandler(byte[] serializedInvokeRequestMessage)
    logger.Trace(Strings.TraceMethodEntered);
    PerformanceMonitor.RecordRequestStarted();
    InvokeRequestMessage requestMessage = (InvokeRequestMessage) AMessage.DeserializeMessage(serializedInvokeRequestMessage);
    InvokeResponseMessage responseMessage;
    try
    responseMessage = HandleRequest(requestMessage);
    PerformanceMonitor.RecordSuccessfulRequest();
    catch (Exception)
    PerformanceMonitor.RecordFailedRequest();
    throw;
    finally
    PerformanceMonitor.RecordRequestEnded();
    logger.Trace(Strings.TraceMethodExiting);
    return AMessage.SerializeMessage(responseMessage);
    UnitTest snippet
    OperationHandlerBrokerWebService brokerService = new OperationHandlerBrokerWebService();
    brokerService.UseDefaultCredentials = true;
    byte[] serializedResponseMessage = brokerService.InvokeOperationHandler(serializedRequestMessage);
    Please advise.
    Thanks,
    Deepak

  • Text caption visible on slide but not when running project

    I am using Captivate v4.
    I have one slide of 64 where the text cpation is seen on the slide and runs correctly when using F3 - but when I run the project / F10 the text caption does not appear.
    I have copied the slide with this error onto a blank project as i assumed the project might be corrupt - but the same happens on the blank project.
    Help please...anyone ?
    Noel

    Thanks Rod and Rick,
    Not sure what was the cause of the problem - but have fixed it now.
    After trying many things, including copying the project onto a new blank Captivate project - none of which worked, I did the following and the problem was fixed.
    Working on the original project and the slide with the error - I removed the text caption that was not working (for the nth time) and thought I would try one more time to put the text caption back using a different font.....
    When I opened the text caption option I noticed there are "two" options for the transparent text caption one above the line and one below, see below;
    I selected the transparent option below the line...and it worked OK.
    Have to assume that the ones above the line are the most recently used, and I must have been using this one without noticing which one I was selecting - and there was something wrong with the one above the line.
    Staring to think I need to upgrade to v5.5 - but not convinced it is the right thing to do.
    Thanks again guys,
    Noel

  • Report data shows up in Builder but not when run on web

    I have a report that pulls up the data just fine when run in Builder but when I run it on the web, it shows up, no errors, with no data...just blank.
    I am using a global temp table to do this.
    Any ideas on what might cause this to happen?
    Thank you for ANY suggestions!!
    --KWien                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    Are you sure you are using all the parameters (that work in Builder) in the URL?
    Gicu

  • Java works stand alone does not when called from PL/SQL

    I have this piece of code, which works as a standalone program: It takes in the en_var and returns a path.
    But it wont work when called from a store procedure the line of code p = rt.exec("echo "+envar); returns a path as a standalone program returns null when called from a Oracle store procedure.
    Thanks for any help just going around and round in circles.
    import java.util.*;
    class translate
    public static String translatePath(String envar)
    Runtime rt = Runtime.getRuntime();
    int bufSize = 4096;
    byte buffer[] = new byte[bufSize];
    String path = null;
    Process p = null;
    String os = null;
    String name = null;
    String home = null;
    String dir = null;
    SecurityManager sm = null;
    int len = 0;
    try
    System.out.println("Calling echo "+envar);
    os = System.getProperty("os.name");
    name = System.getProperty("user.name");
    home = System.getProperty("user.home");
    dir = System.getProperty("user.dir");
    sm = System.getSecurityManager();
    p = rt.exec("echo "+envar);
    BufferedInputStream bis = new BufferedInputStream(p.getInputStream());
    while ((len = bis.read(buffer, 0, bufSize)) != -1)
    System.out.write(buffer, 0, len);
    path = new String(buffer);
    //p.waitFor();
    bis.close();
    return path;
    catch(Exception e)
    System.out.println("Exception "+e);
    return "ProcessProblem";
    //path = "/rims/live/log";

    Still cant get it to work, it doesnt fall over anymore, but when I input $PATH, it will output $PATH instead of the path for $PATH i.e /rims/live: What does your program output please:
    Here is my code:
    import java.io.*;
    import java.util.*;
    class translate
         public static String translatePath(String envar)
              Runtime rt = Runtime.getRuntime();
              Process p = null;
              String echoOutput = null;
              int len = 0;
              try
                   System.out.println("Calling echo "+envar);
                   p = rt.exec(new String[]{"/bin/echo",envar});
                   InputStreamReader isr = new InputStreamReader(p.getInputStream());
                   BufferedReader br = new BufferedReader(isr);
                   echoOutput = br.readLine();
                   br.close();
                   isr.close();
                   return echoOutput;
              catch(Exception e)
                   System.out.println("Exception "+e);
                   return "ProcessProblem";
              //path = "/rims/live/log";
    Thanks for all your help so far.
    Tony

  • JNI Works for application, but not when used over Tomcat...

    I am having problems getting JNI to work when I try to run a Servlet that invokes native calls.
    I have a small, simple java program, just to test the waters, that simple calls a small shared library. It works like magic when I run the program as a simple application.
    However, when I turn it into a Servlet, I get the following runtime errors:
    The first time I call the Servlet:
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.native)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
         at java.security.AccessController.checkPermission(AccessController.java:399)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
         at java.lang.SecurityManager.checkLink(SecurityManager.java:837)
         at java.lang.Runtime.loadLibrary0(Runtime.java:743)
         at java.lang.System.loadLibrary(System.java:820)
         at Native.(NativeApp.java:24)
         at NativeApp.service(NativeApp.java:15)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
         at org.apache.tomcat.core.Handler.service(Handler.java:286)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
         at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
         at java.lang.Thread.run(Thread.java:484)
    On hitting reload (F5), I get this:
    java.lang.NoClassDefFoundError
         at NativeApp.service(NativeApp.java:15)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
         at org.apache.tomcat.core.Handler.service(Handler.java:286)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
         at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
         at java.lang.Thread.run(Thread.java:484)
    Before going and farther, here is the server specs:
    Linux (cobalt, basically red hat)
    java 1.3
    recent version of tomcat
    Now, just to be sure, I removed the native call from the servlet, and ran it again...no problem this time. So I know that it has to be the native call that is causing this.
    I have to say that I am still a bit new to JNI (book is in the mail form amazon still, hehe)...any ideas would really be appreciated.
    I have a feeling that this may have little or nothing to do with JNI...but it seems to be related in some way.
    -Zach

    Well, I have came to the same conclusion, that the problem that I am having is directly related to the security policy that Tomcat runs under.
    However, I have not been able to figure out exactly what I need to change....
    I have altered the tomcat.policy file in a number of ways, including (for testing purposes) allowing full permission on the site that has the JNI servlet on it.
    I have also done the same for the folder containing the shared library, I don't know if mattered, but I tried to be sure.
    At this point, I have ordered a number of books from Amazon that should (hopefully) have some answers, but it is still a bit confusing that after allowing all permissions (and rebooting) that it still failed to work.
    Dose anyone know how that you would allow native methods to be called in a policy file?
    Thanks again for any suggestions!
    -Zach

Maybe you are looking for

  • New computer and setting up itunes and sych iphone new to new computer

    hi guys, Just formatted my hard drive i did backup the iTunes folder inthe c:\users\name\my music\c folder e.g. apps music etc and i did also backup the apple computer folder in the c:\users\name\ app data\roaming\applecomputer folder(which has the i

  • How install drivers for vista 32bits on iMac ?

    i need to install drivers for vista 32 pro bits on my bootcamp partition on my imac 27". bootcamp assistant fifd only windows seven drivers could you help me .? regards

  • Selecting only one row from a query

    Hi, I am using database version 10.2.0.4.0 I have 2 tables: artist(artistid, artistname, titleid) trans(transid, datesold, salesprice, titleid, artistid) This is what i used and got the below results. SELECT max(worksold) AS mostworksold FROM ( SELEC

  • Why do inserted PIX disappear when sent, but appear when returned by receiver?

    When a number of PIX are cut and pasted from one e-mail to another e-mail the pix disappear at the receiver end or a blank box or space appears. The reply from the receiver shows the embedded PIX. This problem has existed for quite sometime and appea

  • J2IUN Query

    Hi All, I am utilizing 'CENVAT' by giving 'EXCISE INVOICE NUMBER' in selection screen but after posting document system is not updating 'UTILIZATION' transaction Type or Transaction detail in 'Initial Excise Document' & nor in 'Tables'. How i can ach