A struct in the application scope will be lost / damaged

Hello,
we have a strange problem with our CFMX 7,0,2, perhaps
somebody can help?
In the application.cfm a xml-file will be loaded, parsed and
saved as a struct in an application variable. This will take place
only if the struct isn't defined. We set the application variable
exclusive by cflock. After some times, the struct or an element of
the struct will be lost. At this time, we get "Null Pointer
Exceptions".
java.lang.NullPointerException
at coldfusion.xml.XmlNodeMap.size(XmlNodeMap.java:656)
at coldfusion.runtime.Struct.StructCount(Struct.java:172)
at coldfusion.runtime.CFPage.StructCount(CFPage.java:4133)
Some questions:
- Why is the struct / the elements in the application scope
are lost? The application timeout is set to 2days, and other
application variables aren't lost.
- Why will cftry / cfcatch not work in this case?
What can we do?
Kind regards
Karl-Heinz

you can use the isDefined function in the onRequestStart
function in Application.cfc
I have never had an application scoped variable / object get
lost or damaged in the way that you're describing.
are you loading it in the onApplicationStart function of
Application.cfc ? that would be a good place to do it.
oh, actually, I did have a contractor who assigned the
application name dynamically, I think the name contained the
current date so each time the date would change the application
would change - you might want to make sure that is not happening to
you.

Similar Messages

  • Will the Application Scope be shared across the cluster in a multi-node OC4

    Hi,
    I have the following requirement:
    Users of the application can only have single (browser) session. When a user who already has a session connects again, he should no longer be allowed to access the older session.
    My proposed implementation is:
    -     After successful login – possibly using a Session Listener - an entry is made in a HashMap UserSessions that lives in the application scope. Key is the username, value is the session id (HttpSession.getId()).
    -     For every request, using a ServletFilter, we check whether the session is still in the UserSessions HashMap for the current user. If a new session has been created for the same user, the session id for that new session is in the UserSessions map and the servletfilter will not find the session. In that case, the filter should invalidate the session and forward to the user to an error page.
    However, the application will run on a multi-node OC4J cluster. I am starting to wonder:
    Will the Application Scope be shared across the cluster in a multi-node OC4J environment?
    I know session state can be shared. But what application state/scope?
    Does anyone know? Do I have to do anything special in the cluster or the application to get this to work?
    Thanks for your help.
    Lucas

    gday Lucas --
    Application scope is not replicated across JVM boundaries with OC4J.
    I'm sure this used to be described in the doc, but I can't find it now from a quick scan.
    If you wanted to use this type of pattern, you could look to use a Coherence cache as distribution mechanism to share objects across multiple JVMs/nodes.
    -steve-

  • I have a macbook pro 10.8.5 and the Application Safari will not open no matter what i do, I try to open the menu of Safari but it won't let me either, the mouse will just be loading. Each time i open it, it says "Application Not Responding"

    I have a macbook pro 10.8.5 and the Application Safari will not open no matter what i do, I try to open the menu of Safari but it won't let me either, the mouse will just be loading. Each time i open it, it says "Application Not Responding" and I try opening it in my Finder and it'll say "The Application 'Safari' cannot be opened." and below that it'll say "-1712" Please help? I would really like to open it again.

    The application Safari can't be opened -1712
    What to do about "The application 'Safari' can't be opened" -1712 ?

  • What are the pros and cons of storing heavely used CFCs in the application scope?

    I've been storing all the required CFCs for a site in the application scope. During onApplicationStart I do something like this application.objSomeCfc =CreateObject('component', 'com.someCfc').init().
    Here is my reasoning.
    Get the CFCs initialized once and stored in memory for better performance.
    Using CreateObject several times on each page load can have a negative impact on performance.
    Having one place to create application scoped CFCs makes it easier to manage code.
    So is my thinking flawed? Are there any additional pros or cons for dealing with CFCs? Is there any docs, articles, blogs, videos, frameworks, ...... that I should check that may change my perspective on how I'm doing this?
    Thanks

    Your approach is fine, depending on how many and what type of CFCs you are talking about. If they are "singletons" - that is, only one instance of each CFC is needed to be in memory and can be reused/shared from multiple parts of your application - caching them in the application scope is common.  Just make sure they are thread safe ("var" or local.* all your method variables).
    You might consider taking advantage of a dependency injection framework, such as DI/1 (part of the FW/1 MVC framework), ColdSpring, or WireBox (a module of the ColdBox platform that can be used independently).  They have mechanisms for handling and caching singletons.  Then you wouldn't have to go to the application scope to get your CFC instances.
    -Carl V.

  • HT3415 Ive formatted my iMac and now the applications disc will not install on my computer

    Ive formatted my iMac as I am selling it on and now the applications disc will not install on my computer.

    Isaac, Two knowledge base articles that may be of further help are:
    Reinstalling Mac OS X 10.6http://support.apple.com/kb/PH6606
    and Reinstalling Application Software that came with Mac OS X 10.6
    Be sure to read them through if you have any further problems.
    Regards,
    Ralph

  • I am having problem downloading application on Mac app store, when I try to login and start downloading the application, it will say "Your device cannot be verified"

    I am having problem downloading application on Mac app store, when I try to login and start downloading the application, it will say "Your device cannot be verified"

    Back up all data before proceeding.
    Step 1
    Triple-click anywhere in the line below on this page to select it:
    /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
    Right-click or control-click the line and select
              Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item selected. Move the selected item to the Trash. You may be prompted for your administrator login password. Restart the computer and test.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.
    Log out, log back in, and test. If there's no improvement, continue.
    Step 2
    Reset your computer’s PRAM.

  • My ipod touch thats not copy the application, what will i do?

    my ipod touch thats not copy the application, what will i do????

    What actually are you trying to do? Where are you trying to copy it from? It is possible that the apps is not yet available for gen lower than iOS 5 like Find my Friends app.

  • I attempted to open iPhoto and got this message: you can't open the application because it may be damaged or incomplete. Now the iPhoto icon has a little line through it. Nice.

    I attempted to open iPhoto and got this message: you can't open the application because it may be damaged or incomplete. Now the iPhoto icon has a little line through it.
    Nice. Shall I say goodbye to my treasured iPhoto library? What happened?
    I did just upgrade my iPhone to OS 5. Could that be related somehow?
    Help!

    1. Back up your iPhoto Library - you should always have a back up anyway.
    Most Simple Back Up
    Drag the iPhoto Library from your Pictures Folder to another Disk. This will make a copy on that disk.
    Slightly more complex:
    Use an app that will do incremental back ups. This is a very good way to work. The first time you run the back up the app will make a complete copy of the Library. Thereafter it will update the back up with the changes you have made. That makes subsequent back ups much faster. Many of these apps also have scheduling capabilities: So set it up and it will do the back up automatically. Examples of such apps: Chronosync or DejaVu . But are many others. Search on MacUpdate
    2. Reinstall
    To re-install iPhoto
    1. Put the iPhoto.app in the trash (Drag it from your Applications Folder to the trash)
    2a: On 10.5:  Go to HD/Library/Receipts and remove any pkg file there with iPhoto in the name.
    2b: On 10.6: Those receipts may be found as follows:  In the Finder use the Go menu and select Go To Folder. In the resulting window type
    /var/db/receipts/
    2c: on 10.7 they're at
    /private/var/db/receipts
    A Finder Window will open at that location and you can remove the iPhoto pkg files.
    3. Re-install.
    If you purchased an iLife Disk, then iPhoto is on it.
    If iPhoto was installed on your Mac when you go it then it’s on the System Restore disks that came with your Mac. Insert the first one and opt to ‘Install Bundled Applications Only.
    If you purchased it on the App Store you can find it in your Purchases List.

  • When I try to open iPhoto, I get an error message that says it can't open the application because it may be damaged or incomplete.

    When I try to open iPhoto, I get an error message that says it can't open the application because it may be damaged or incomplete.

    Make a temporary, backup copy (if you don't already have a backup copy) of the library and apply the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Select the options identified in the screenshot. 
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    Download iPhoto Library Manager and launch.
    Click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option
    In the next  window name the new library and select the location you want it to be placed.
    Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    Happy New Year

  • I keep getting the error message: " You can't open the application "%@" because it may be damage or incomplete" when I try to install a software that I purchased.

    I have a typing software that I bought a while ago. I had installed it on an old pc but I just bought a macbook and I'd like to install it onto the new macbook, as I no longer use the old pc. When I open the installer, I get the error message: " You can't open the application "%@" because it may be damage or incomplete"
    Does anybody know if this is fixable or if I need to just buy a new disk?
    Thanks!!!

    I copy pasted this from the developers website for the minimum requirements of your device: Macintosh® OS X 10.4 – 10.5, PowerPC G4, G5 or Intel Core Duo processor, 800 MHz processor or higher, 256 MB RAM, CD/DVD-ROM drive, 300 MB free hard disk space, Video card with 32 MB of video RAM, 1024 x 768 24-bit color display, Speakers, keyboard & mouse.
    Does a macbook pro meet these requirements?

  • When I try to open iPhoto a box comes up that says "You can't open the application because it may be damaged or incomplete."  I just scanned some pictures in, and then this happened.

    Does anyone know what to do if you try to open iPhoto and the box comes up and says "You can't open the application iPhoto because it may be damaged or incomplete."  Previous to this I added some pictures and documents that were scanned from my Lexmark all-in-one.  Now I can't open iPhoto.

    To re-install iPhoto
    1. Put the iPhoto.app in the trash (Drag it from your Applications Folder to the trash)
    2a: On 10.5:  Go to HD/Library/Receipts and remove any pkg file there with iPhoto in the name.
    2b: On 10.6: Those receipts may be found as follows:  In the Finder use the Go menu and select Go To Folder. In the resulting window type
    /var/db/receipts/
    2c: on 10.7 they're at
    /private/var/db/receipts
    A Finder Window will open at that location and you can remove the iPhoto pkg files.
    3. Re-install.
    If you purchased an iLife Disk, then iPhoto is on it.
    If iPhoto was installed on your Mac when you go it then it’s on the System Restore disks that came with your Mac. Insert the first one and opt to ‘Install Bundled Applications Only.
    If you purchased it on the App Store you can find it in your Purchases List.

  • Iphoto app says  "can't open the application because it may be damaged or incomplete". How do I repair this?

    When I try to open iphono on my macbook pro it says "Can't open the applicaiton because it may be damaged or incompete". How do I repair this?

    1. Back up your iPhoto Library - you should always have a back up anyway.
    Most Simple Back Up
    Drag the iPhoto Library from your Pictures Folder to another Disk. This will make a copy on that disk.
    Slightly more complex:
    Use an app that will do incremental back ups. This is a very good way to work. The first time you run the back up the app will make a complete copy of the Library. Thereafter it will update the back up with the changes you have made. That makes subsequent back ups much faster. Many of these apps also have scheduling capabilities: So set it up and it will do the back up automatically. Examples of such apps: Chronosync or DejaVu . But are many others. Search on MacUpdate
    2. Reinstall
    To re-install iPhoto
    1. Put the iPhoto.app in the trash (Drag it from your Applications Folder to the trash)
    2a: On 10.5:  Go to HD/Library/Receipts and remove any pkg file there with iPhoto in the name.
    2b: On 10.6: Those receipts may be found as follows:  In the Finder use the Go menu and select Go To Folder. In the resulting window type
    /var/db/receipts/
    2c: on 10.7 they're at
    /private/var/db/receipts
    A Finder Window will open at that location and you can remove the iPhoto pkg files.
    3. Re-install.
    If you purchased an iLife Disk, then iPhoto is on it.
    If iPhoto was installed on your Mac when you go it then it’s on the System Restore disks that came with your Mac. Insert the first one and opt to ‘Install Bundled Applications Only.
    If you purchased it on the App Store you can find it in your Purchases List.

  • Iphoto wont open.  Message reads "you can't open the application. It might be damaged....

    I get a message :-  You can't open the application IPhoto because it may be damaged or incomplete.    Any ideas??

    Installing iDVD shouldn't affect iPhoto. I still have iDVD on my machine and it runs just fine!
    Hmm....
    Clinton
    MacBook Pro (15-inch Late 2011), OS X Mavericks 10.9.5, 16GB Crucial RAM, Crucial M500 960GB SSD, 27” Apple Thunderbolt Display

  • Locking when using a component as an object in the application scope...

    I have a component that I am building right now that hold
    application settings that are stored in a database table. The
    settings are maintained in a structure "variables.settings" within
    the component and can only be accessed by get and set methods. I
    use the following to create the instance of the object:
    <cfset application.settings =
    createObject("settings","component").init() />
    Now when getting a setting I do not think locking is needed
    as its just reading the value and I am not really concerned with a
    race condition...
    But when using the set method which will update the value of
    the setting.... should I be locking that as technically the object
    is in a shared variable scope? Or is it safe because its within the
    cfc/object?
    If locking is needed, would I need to lock when using the set
    method? or can I just build the lock into the set method so that
    its always there?

    To disagree with craigkaminsky, I think you only need to lock
    if you are
    concerned about race conditions and what could happen during
    a 'dirty
    read' and|or conflicting writes.
    A lot of developers have an old impression of ColdFusion that
    one *must*
    lock all shared scope variable access to maintain a stable
    application.
    This dates from the ColdFusion 4.5 days where there where
    bugs in
    ColdFusion that could cause memory leaks and eventual
    application
    instability if one did not lock shared scope reads and
    writes. This has
    long been fixed, but the advice persists.
    So now it is only a matter of your data and what would happen
    if one
    user read an old value while it was in the process of being
    updated by
    another user. Or could two users be updating the same value
    at the same
    time and cause conflict. If either of those two statements
    are true,
    then yes you should use locking as required by your
    application.
    But if they are both false and it does not matter that user A
    might get
    the old value microseconds before user B changes it. Or there
    is no
    concern with user A changing it once and user B changing it
    again to
    something different moments later without knowing the user A
    has already
    changed it. Then locking is probably unnecessary.
    There can be a cost to over locking shared variable writes
    and|or reads.
    Every time one creates a lock, one is single threading some
    portion of
    ones code. Depending on how the locking is done, this single
    threading
    may only apply to individual users or it may apply to every
    single user
    on the entire server. Either way, too much of this in the
    wrong places
    can create a significant bottle necks in ones application if
    too many
    user requests start piling up waiting for their turn through
    the locked
    block of code.

  • Apple iOS is ****.... I just update my apps then for some reason is stop and can't use it.. If you delete and reinstall your apps profile will be lost..

    Apple iOS is ****.... I just update my apps then for some reason is stop and can't use it.. If you delete and reinstall your apps profile will be lost....
    There's no rollback in the application if you encountered failed during the installation.. The application profile will be lost... ****....

    Try update the app using iTune (computer) and sync to iPad.
    http://i1224.photobucket.com/albums/ee374/Diavonex/Album%201/47e895d853a70f226f0 e254ed8bca59f.jpg

Maybe you are looking for