Flash.sampler.getSamples() not working in flex app

flash.sampler.getSamples() is returning undefined when called in flex application.
I tried it by deploying this application to a local tomcat and called the flash.sampler.getSamples() which returned undefined.
The same code works fine when run in a standalone mode. Can someone please help me why it is not working when deployed in a server.

This is the sample code which I have written in my application's button click handler
flash.sampler.startSampling();
for(var i:int=0;i<1000;i++)
new Object()
trace(getSampleCount() > 0);
Alert.show("  "+getSampleCount());
When I run this locally, the alert always shows some number greater than 1000. When I run this from my tomcat server, the alert always shows zero.

Similar Messages

  • LCDS Samples Do Not Work

    I just installed LCDS to perform an evaluation.  I installed using the embedded Tomcat which they have configured to run on port 8400.  I launch Tomcat and point my browser to http://localhost:8400/lcds-samples/testdrive.htm, all is fine so far.<br /><br />I then click the link to run the first sample app (using HTTPService), when I click the Get Data button I get the following error:<br /><br />[RPC Fault faultString="HTTP/1.1 500 Internal Server Error" faultCode="Server.Proxy.Request.Failed" faultDetail="HTTP/1.1 500 Internal Server Error"]<br />     at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()<br />     at mx.rpc::Responder/fault()<br />     at mx.rpc::AsyncRequest/fault()<br />     at HTTPMessageResponder/resultHandler()<br />     at HTTPMessageResponder/completeHandler()<br />     at ChannelRequestLoader/callEventCallback()<br />     at ChannelRequestLoader/completeHandler()<br />     at flash.events::EventDispatcher/dispatchEventFunction()<br />     at flash.events::EventDispatcher/dispatchEvent()<br />     at flash.net::URLLoader/onComplete()<br /><br />And the log file contains:<br /><br />Feb 17, 2009 8:04:19 AM org.apache.catalina.core.StandardWrapperValve invoke<br />SEVERE: Servlet.service() for servlet jsp threw exception<br />java.sql.SQLException: socket creation error<br />     at org.hsqldb.jdbc.Util.sqlException(Unknown Source)<br />     at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)<br />     at org.hsqldb.jdbcDriver.getConnection(Unknown Source)<br />     at org.hsqldb.jdbcDriver.connect(Unknown Source)<br />     at java.sql.DriverManager.getConnection(Unknown Source)<br />     at java.sql.DriverManager.getConnection(Unknown Source)<br />     at flex.samples.ConnectionHelper.getConnection(ConnectionHelper.java:27)<br />     at flex.samples.product.ProductService.getProducts(ProductService.java:18)<br />     at org.apache.jsp.testdrive_002dhttpservice.catalog_jsp._jspService(catalog_jsp.java:62)<br />     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)<br />     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)<br />     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)<br />     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)<br />     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)<br />     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)<br />     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:290)<br />     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) <br />     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)<br />     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)<br />     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)<br />     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)<br />     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)<br />     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)<br />     at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:852)<br />     at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProto col.java:584)<br />     at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)<br />     at java.lang.Thread.run(Unknown Source)<br /><br />I can't even begin to evaluate as the samples do not work.  Any ideas?

    I figured out what is wrong. The instructions leave out an important
    step...got to start the sampledb, i.e. \lcds\sampledb\startdb.bat
    -Dave

  • [svn] 4377: Bug: BLZ-292 - Data Push sample does not work in BlazeDS Turnkey

    Revision: 4377<br />Author:   [email protected]<br />Date:     2008-12-22 16:16:25 -0800 (Mon, 22 Dec 2008)<br /><br />Log Message:<br />-----------<br />Bug: BLZ-292 - Data Push sample does not work in BlazeDS Turnkey<br />QA: Yes<br />Doc: No<br />Checkintests Pass: Yes<br /><br />Details:<br />* Regression due to some refactoring of user-agent handling that was failing to set up defaults if no explicit <properties> were defined for the <channel-definition>. This meant that for IE, no kick-start bytes were being pushed down the streaming connection at setup time...<br /><br />Ticket Links:<br />------------<br />    http://bugs.adobe.com/jira/browse/BLZ-292<br /><br />Modified Paths:<br />--------------<br />    blazeds/trunk/modules/core/src/flex/messaging/endpoints/BasePollingHTTPEndpoint.java<br />    blazeds/trunk/modules/core/src/flex/messaging/endpoints/BaseStreamingHTTPEndpoint.java<br />    blazeds/trunk/modules/core/src/flex/messaging/util/UserAgentManager.java

    Hi,
    Thanks for your feedback!
    This feature has been going through a lot of changes with the BlazeDS and Flash Builder builds.
    We request you to pick up the BETA2 build of Flash Builder and BlazeDS 4.0.0.10654, hopefully you should see things working fine.
    Kindly let us know if you still encounter problems.
    Thanks,
    Balaji
    http://balajisridhar.wordpress.com

  • Flash player does not work with new ICS Android 4.0.4 OS. Has this problem been addressed?

    Flash player does not work with new ICS Android 4.0.4 OS. Has this problem been addressed? I am using Firefox Beta for android and I also tried just Firefox.

    Please check the Play Store app for any Flash updates and install them if present.

  • "Flash Player" will not work on Android 4.0.3!

    I recently purchased  new Samsung tablet 2 (10.1) which operates on Android 4.0.3 (Ice Cream Sandwich)
    I have since found out that “Flash Player” will not work on Android 4.0.3
    (Ice Cream Sandwich) as adobe is no longer supporting android OS above 4.0
    This means I now have many “apps” that I can not us because they require
    “Flash” to operate!
    Can you assist with this problem?
    Is there a patch I can buy to allow flash to work on Android 4.0.3?

    Moving this discussion to the Installing Flash Player forum.

  • Ipad i have load swf file but swf  is not working proper(flex 4.6) but android is fine to work how

    ipad i have load swf file but swf  is not working proper(flex 4.6) but android is fine to work how

    On the MBP, in iTunes, switch to Song view and enable the iCloud Status column by pulling down View > View options and selecting the option for "iCloud Status." Close the small window. Look for any tracks that have a status of "waiting." If you see several of them disable iTunes Match while holding down the Option key. Quit iTunes, wait a few seconds, then open it again and turn iTM back on. Let it compelete the scan. Wait until all tracks that are "waiting" have a status of either "matched" or "uploaded."
    On the iPad, turn off iTunes Match then launch the Music app and let the contents clear out. Power cycle the iPad for good measure, then re-enable the service once all the tracks in iTunes have been processed.

  • Menu.createMenu is not working in flex 4.1.

    Hi,
    I have created a menu bar with menu item using flex 4. My problem is that the meubar is not clickable on left and right side. How to make it clickableon both sides? For this problem i have found a solution by clicking a button using Menu.createMenu but it is not working in flex 4.1. can anyione help me with this?
    Thanks,
    Karthick K.

    find my code below,
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx">
        <fx:Script>
            <![CDATA[
                import mx.controls.Menu;
                import mx.events.FlexEvent;
                import mx.events.MenuEvent;
                protected var menu1:Menu;
                protected function showMenu():void
                   menu1 = Menu.createMenu(null, menuItem, false);
                    menu1.labelField="@label";
                    menu1.iconField="@icon";
                    menu1.show(0, 35);
            ]]>
        </fx:Script>
        <fx:Declarations>
            <fx:XML format="e4x" id="menuItem">
                <root>
                    <menuitem label="MenuItem A">
                        <menuitem label="File" icon="topIcon">
                            <menuitem label="New"/>
                            <menuitem label="Open"/>
                            <menuitem label="Save" icon="top2Icon"/>
                            <menuitem label="Save as..."/>
                            <menuitem label="Close"/>
                            <menuitem label="Print"/>
                            <menuitem type="separator"/>
                            <menuitem label="Quit"/>
                        </menuitem>
                        <menuitem label="Edit">
                            <menuitem label="Undo"/>
                            <menuitem label="Redo"/>
                            <menuitem type="separator"/>
                            <menuitem label="Cut"/>
                            <menuitem label="Copy"/>
                            <menuitem label="Paste"/>
                        </menuitem>
                        <menuitem label="View"/>
                        <menuitem label="Document" icon="top1Icon"/>
                        <menuitem label="Tools">
                            <menuitem label="BasicToolsSubToolBar">
                                <menuitem label="SelectMenuItem"/>
                                <menuitem label="HandMenuItem"/>
                                <menuitem label="ZoominMenuItem"/>
                                <menuitem label="ZoomDragMenuItem"/>
                            </menuitem>
                            <menuitem label="AnalysisToolsItem"/>
                        </menuitem>
                        <menuitem label="Window"/>
                        <menuitem label="Help"/>
                    </menuitem>
                    <menuitem label="MenuItem B"/>
                    <menuitem label="MenuItem C"/>
                    <menuitem label="MenuItem D"/>
                </root>
            </fx:XML>
        </fx:Declarations>
        <s:Panel title="Menu Control Example" width="553" height="238">
            <s:Button x="10" y="174" label="Show Menu" click="showMenu()"/>
        </s:Panel>
    </s:Application>
    The above code is not working in Flash builder 4 sdk used is 4.1 especially the code snippet in red.
    Thanks,
    Karthick K..

  • [svn] 3913: BLZ-272 Two long polling endpoints not working in same app with Firefox

    Revision: 3913
    Author: [email protected]
    Date: 2008-10-27 13:49:02 -0700 (Mon, 27 Oct 2008)
    Log Message:
    BLZ-272 Two long polling endpoints not working in same app with Firefox
    The long polling waitMonitor object in the FlexSession did not keep track of
    blocking polls via endpoint ID. This prevented the second channel from blocking.
    Enhance the FlexSession.waitMonitor to be a map of endpointID to
    EndpointQueue objects, and keep track of the monitors based on what endpoint
    they are associated with.
    QA: Yes
    Doc:No
    Checkintests: passed
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-272
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/FlexSession.java
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/client/FlexClient.java

    Revision: 3913
    Author: [email protected]
    Date: 2008-10-27 13:49:02 -0700 (Mon, 27 Oct 2008)
    Log Message:
    BLZ-272 Two long polling endpoints not working in same app with Firefox
    The long polling waitMonitor object in the FlexSession did not keep track of
    blocking polls via endpoint ID. This prevented the second channel from blocking.
    Enhance the FlexSession.waitMonitor to be a map of endpointID to
    EndpointQueue objects, and keep track of the monitors based on what endpoint
    they are associated with.
    QA: Yes
    Doc:No
    Checkintests: passed
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-272
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/FlexSession.java
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/client/FlexClient.java

  • My flash light is not working

    My flash light is not working..My phone is a month old... and I only used the flash twice... Doesn't work at all... I tried different apps as well...

    Backup and Restore
    http://support.apple.com/kb/HT1766

  • My flash flayer does not work on my Windows 8 Surface Tablet, it also won't let me see if i already

    My flash flayer does not work on my Windows 8 Surface Tablet, it also won't let me see if i already have it installed...

    1.      Are you getting any error message?
    2.      Which browser are you using?
    3.      Were there any recent changes made on the computer prior to the issue?

  • My flash player does not work on my tablet.

    My flash player does not work on my tablet

    Your tablet uses Android OS.
    There is no more Flash Player for Android and there won't be another. Android is no longer compatible with Flash Player. Playing Flash content is very processor consumptive and it drains your battery, also shortening the life of it. Android (Google) recommends using either "Dolphin" or "Puffin" as your browser if you need to view Flash content with a mobile device running Android. They're both free in the GooglePlay store. These browsers use "server side" rendering to reduce the load on your device.

  • Flash Player does not work with Standard User, but will work when browser is "Run as Administrator"

    I don't understand why this is happening, but Flash Player will not work when a Standard User is using the browser. It will only work when the browser is run as an administrator. Any way to fix this? I've tried to uninstall, and reinstall the player, and it still wouldn't work.
    The user is on Windows 7, 64-bit. Using IE 10.
    Flash not working for Standard User - YouTube

    Any update to provide at all here guys?  Again, in my situation, it's very much rights-related as a standard user doesn't even report that the flash player exists when testing it on the Adobe Flash Version Detection website (despite it showing up in Control Panel and under Add/Remove Programs).  I've already tried giving the C:\Windows\System32\Macromed and files/subfolders appropriate permissions for the standard user and still nothing.  If I either give the user in question full local admin rights or logon as the domain admin, then the Adobe Flash Version Detection website says Flash is installed and Flash works fine.
    Thoughts???

  • Flash Player does not work after steps to resolution

    I am using Windows 8.1 and flash player will not work.  I have "enabled" and removed Active X control as per instructions but it still does not work.

    8.1 means Ie11... and that means...
    "User-Agent Strings"
    That doesn't mean a lot, I'm sure, but it's the root of your problems, and Flash Player has nothing to do with it.
    Microsoft "rewrote" the User-Agent Strings for the abomination they call their latest and greatest browser. User-Agent Strings are what websites use to identify the browser you're using and provide the proper content for it's browser engine, like ActiveX stuff, and Flash or HTML5 video. Thanks to the geniuses in Redmond, WA, the User-Agent Strings for IE11 (which has a Trident engine), ID it as either "Gecko" (Firefox) or "Webkit" (Chrome). Problem is: when the site the directs to the content for one of these two engines, the Trident engine in IE can't intepret it and the site then sees IE as an "unidentified" browser.
    The problem with an unidentified browser is that the plug-ins in that browser aren't recognized either, so even though you're up to date, it says you need the latest Flash Player when you use IE11. YouTube... has converted to HTML5 video so if it doesn't detect Flash Player, it can display HTML5 (MP4) video which requires no plug-in to play. Facebook can't do that, because HTML5 doesn't apply to games... only video.
    Microsoft has no plans to "fix" the mess thay've created because they think it's a great idea to block you out of the websites you visit.
    They recommend using "Compatibility View" and pretending that you're using an older verison of IE... Problem with that is that it's seen limited success, and you have to enable it for EVERY page that has problems... individually.
    I'm not big on "pretending" so I recommend actually using another browser.
    Firefox (from Mozilla)
    Opera (from Opera)
    Safari (from Apple)
    Chrome (from Google)
    ANY of those will work where IE11 won't, with the Flash Player Plug-in (For all other browsers), and Chrome doesn't even need that because it has its own Flash Player plugin built in.

  • Flash player does not work after I installed it

    Flash player does not work after I installed it

    I'm using Mac Osx and my browser is Safari
    Date: Wed, 5 Feb 2014 00:41:29 -0800
    From: [email protected]
    To: [email protected]
    Subject: Flash player does not work after I installed
        Re: Flash player does not work after I installed it
        created by Mike M in Installing Flash Player - View the full discussion
    This is a user-to-user forum, NOT 24/7 support. You're "lucky" I happen to be up at 1:40 am to answer you.
    What OS are you using?
    http://mmonlinedesigns.com/images/os.png
    What browser?
    http://mmonlinedesigns.com/images/browsers.png
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6087541#6087541
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6087541#6087541
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6087541#6087541. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Installing Flash Player at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Flash player does not work in Windows 8 tiles

    Flash player does not work in Windows 8 start metro tile applications. Flash player also does not work in Windows 8 start tile internet explorer 10 1n windows 8. Flash player does work in Windows 8 desktop internet Explorer 10. I tried all of the recommended fixes suggested by adobe Flash Player Issues/windows 8 page. I have reinstalled Windows 8 operating system.  What should I try next?

    This is a known issue with Flash Pro CC - GM build.
    this crash has been fixed in the update that was released recently. Please update to 13.0.1.808 version and it should fix this.
    Please reply if it still persists after the update.
    -Sujai

Maybe you are looking for