Wallpaper defaults to 'Galaxy' after log out + now stuck on grey screen

Hi all,
Hope someone can help with this one.
Basically, like many others, I've been trying to get around
the wallpaper problem that Lion has brought with it.
By this, I mean how if you change the wallpaper to a custom
image, as soon as you log out and back in it changes back
to the galaxy one from Lion.
So after searching the solutions on the forums I decided to
act on the following troubleshooting advice from a member
commenting on the problem... (advice I followed in bold)
(Originally posted by member: Ahmed21788)
One basic solution for this is to save your wallpapers in the HDD where you've installed the MAC OS X..
but I didnt want to save all my wallpapers in Native Mountain Lion HDD, so i figured out my perfect fix..!!
This is how i fixed..
I found this file in my Lion install drive.. autodiskmount.plist
Library/Preferences/SystemConfiguration/autodiskmount.plist
If you can't find it on your OS X Install Drive then you can make one by typing
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="0.9">
<dict>
<key>AutomountDisksWithoutUserLogin</key><true/>
</dict>
</plist>
rename ur txt file to autodiskmount.plist
save this in your MAC OS X HDD
Library/Preferences/SystemConfiguration/autodiskmount.plist
restart your system..
So... after following this advice I haven't been able to get my machine back on!
It just gets to the grey screen with apple and spinning wheel and goes no further.
It won't even safe boot.
However I did manage to get to repair disk permissions via cmd+option+p+r.
But when I restarted it still wouldn't go any further than the grey screen/spinning wheel.
Any help/ideas would be greatly appreciated.
Cheers,
Ben.

Hi keithos27,
I have a macbook pro early 2011 15" like you, and unfortunately something identical happened to me: "... the computer went black and an audio was stuck on a loop over and over..." - "...grey screen on for a few minutes and eventually the computer's fan spins up and runs at full speed".
I followed the article mentioned too, but nothing solved the problem.
Eventually I took the mac to the local authorized service provider. It turns out that the problem is due to the notorious GPU failure of the 2011 macbook pro.
It means that unless I replace the entire logic board, I end up with a marvellous piece of aluminium...
This is my experience, I can't say that's 100% your case. I hope it isn't. Try to check at an apple store.
Good luck!

Similar Messages

  • Downloaded OSX Mountain Lion on MacBook now stuck on grey screen with spinning wheel HELP?!?!

    Downloaded OSX Mountain Lion on MacBook now stuck on grey screen with spinning wheel. What can I do, will I loose everything on my laptop?

    ashg23 wrote:
    Thank you, I have restarted but it is still stuck at the grey page with the spinning wheel? Any idea?
    Have you started up holding down Command + R and attempted to install again?
    Pete

  • I accidently put vr files in trash but did not delete, now stuck on grey screen after battery dying! Help

    I am not very tech savvy but recently used a program that tells you what programs and files are using up large amounts of space on your computer I think it was called disc utility maybe. I deleted a whole bunch of things but accidently deleted a folder called vr, I realised I made a mistake and went to remove it from the trash when my laptop died, now it won't turn on past the grey screen with the apple logo!
    I didn't delete the files they are just sitting in the trash. Is there anything I am able to do? I don't have any install discs or anything or wifi at my house or have any computer knowledge really. Please help!

    Thank you! But do you think that a defective cable would cause it to not boot the cd now as well as the HD errors?
    Also, this is kind of embarrassing, but if my trackpad happened to be broken to where I couldn't click it (broke a while back, but I use an external mouse so it never really bothered me) can I hold down the mouse button on my external mouse at startup to eject the cd or does it have to be the trackpad. If not, is there another way I can eject the cd?
    Thanks again!

  • Replaced fried hd with ssd, now stuck on grey screen, cd won't eject

    Please help, I'm kind of freaking out. 2 days ago my computer wouldn't boot past the grey screen except for a message that said the master boot record was corrupted (I dual boot windows 7 with bootcamp). I put in my snow leopard cd and booted into setup. From there I ran disk utility and it said that the disk was corrupted, couldn't be repaired and that I should backup and reformat the disk.
    I then tried to boot it as a target disk to salvage some of my files, but even though it would boot as a target, I couldn't copy more than a handful of files (using ditto, cp, and one other method). At that point I decided it was pointless and was going to reinstall os x and start over. When I rebooted into the install cd and tried to format the drive I got an error saying it couldn't be completed (something about a node). That's when I figured the hd was completely fried so I bought a replacement SSD.
    After installing it, I tried to boot into the install cd again to format it and proceed. That's where I'm at now. The computer won't boot past the grey screen. The apple logo doesn't even come up. Ive held down the c key but it won't boot the cd. I have reset the PRAM (or whatever it's called when you press command shift p r). I've tried holding option (stays stuck on the grey screen), booting into verbose and single user modes (stays stuck on the grey screen), and running apple hardware test (stays stuck on the grey screen).  Also, now I can't eject the cd when it boots (tried holding eject and also function+eject)
    Please help, I'm freaking out at this point.

    Thank you! But do you think that a defective cable would cause it to not boot the cd now as well as the HD errors?
    Also, this is kind of embarrassing, but if my trackpad happened to be broken to where I couldn't click it (broke a while back, but I use an external mouse so it never really bothered me) can I hold down the mouse button on my external mouse at startup to eject the cd or does it have to be the trackpad. If not, is there another way I can eject the cd?
    Thanks again!

  • Help-eMac froze during software update and is now stuck on Grey Screen!

    So I recently moved, and was updating the software on my eMac. While it was updating, I was looking through some photos(probably my first mistake). When I tried opening one torwards the end of the update, my computer froze up. I waited a few minutes for it to resolve but ended up resetting the computer by holding down the power switch(second mistake?). When I restarded the computer, all I got was a grey screen. Now I'm stuck and don't know what to do. Can someone out there help me? I can't find my restart disc and tried the command,option,p,r-trick.
    thanks for your time,
    Andrew

    MingusBass,
    Welcome to the Apple Discussions!
    Ouch. As you've already discovered, running anything else while a system or security update is running is not a good idea. If you use the power button to force-restart a Mac while it's still at the "optimizing system" stage, stalled or not, it can damage the Finder and the startup manager / login items (e.g., leave the previous version marked .old without finishing 'blessing' the new copy).
    Is it possible to borrow a second Mac with the same OS / security version, or a bootable external hard drive? It's possible to boot a Mac that crashed while optimizing the system in FireWire target disk mode and replace the damaged files (bear in mind, I say that as an interested observer at work several years ago and I can't swear I remember each and every step, other than replacing a Finder.old in the System folder).
    You really need your OS X Install disc, which would let you do an Archive and Install. I'm doubtful if booting into single-user mode to run the Unix file system check utility fsck would help but you can always try it.

  • Help, Mac Pro wouldn't start now stuck on grey screen

    Hi,
    My Mac Pro computer wouldn't start up properly. Sometimes I would press the button 30 times and still it wouldn't start.
    I have taken it to a Authorised Apple shop and first of all had a new graphics board replaced.
    A week later the same problem, it wouldn't start up, some times switch itself off so I took it back to the Apple shop where it turned on perfectly and the tests showed nothing wrong.
    Week and a half later it happened again so I took it back and they gave me a new hard drive and memory cage.
    Three weeks later, same problem took it back to the store and they found nothing wrong with it so I had to bring it back home.
    Worked again for another week and then it wouldn't start a few times so I left it on and it turned itself off.
    Today it is starts but gets stuck on the grey screen with spinning wheel and then turns itself off.
    Please, please can anybody help. The Authorised Apple shop doesn't know what the problem is so has given up..
    Best Regards..

    If you unplug it from all power & peripherals like taking it in would do, wait a few hours & plug it back in does it work?
    Is there an Uninterruptible Power Supply involved?

  • Sgd client does not close after logging out of sgd on windows vista

    Hi,
    I have a scenario wherein I find that the sgd client in the system tray does not close even after logging out of sgd (using the browser).
    We are using sgd 4.3.1
    Is this a known issue.
    Thanks,

    Well, after searching every where, somewhere (not sure where now) I saw the suggestion to turn off bluetooth and NFC. I turned off both and it *seems* like the issue may be corrected. But what if I want touse a BT device, I guess I am stuck?
    As to your questions, I my have changed to a larger mouse cursor, either that or the default cursor. 
    I think I may have had "mouse trails" clicked, not sure if that it the same as a mouse shadow?  Neither ofthese options seem to make a difference.
    I had a standard Windows provided background for use, no personal photos. 
    Hopefully this partial fix (turning off the other settings) helps someone else. It seems to have fixed the problem for me, at least in the last 3-4 days since switching I have not noted a return of the problem. 
    Dragon-Fur wrote:
    I wish I were writing with a fix.  I, too, have a new X2 -- I like it very much.  I have not seen what you describe.
    Instead, I have more questions;  I am intrigued.  I wonder if the way in which you have the system set is having an affect on the way it is behaving.
    Do you see the problem regardless of which mouse pointer you set? 
    There are a variety of choices -- I use an extra large white arrow most of the time; sometimes I switch to a black cursor just for grins.  You can change the selectors, too.  Right-Click on the Background Screen and click Personalize ...
    Are you using the entirely useless, but oh-so-pretty "mouse shadow"?
    I am wondering if changing the pointer has had any effect on the disappearing act.
    What about the background?  Are you using a personal photo?  Lots of colors?  Does changing the background make any difference?

  • My Imac says "you need to restart your computer" after logging out and click on sleep. 10.6.8?

    My Imac recently gives a message "you need to restart your computer"  after logging out and clicking "sleep".  After a few seconds, gray screeen will roll down and give that messasge.  I disconnected  USB cable from my  printer.  Today,  after turning it on,  the log in screen showed then after 2 seconds the gray screen rolled down again and prompted "you need to restart the computer". I've read the apple communities about kernel panics but to no success. I have a 10.6.8, 2.7 ghz, 4GB.  This is the error that showed which I reported to apple mutiple times already.
    Panics Since Last Report:          4
    Anonymous UUID:                    522B583E-D9D7-463D-B57E-6849A69E41D9
    Wed Jan 22 11:52:33 2014
    panic(cpu 0 caller 0xffffff80002d1208): Kernel trap at 0xffffff7f80e2750d, type 14=page fault, registers:
    CR0: 0x000000008001003b, CR2: 0x00000000000001e0, CR3: 0x0000000000100000, CR4: 0x0000000000040660
    RAX: 0x000000000000000a, RBX: 0x00000000000001e0, RCX: 0x0000000001000000, RDX: 0x0000000000000000
    RSP: 0xffffff805e413eb0, RBP: 0xffffff805e413f10, RSI: 0x00000000000000dd, RDI: 0xffffff800b3eb7e0
    R8:  0x0000000000000003, R9:  0x0000000000000001, R10: 0x0000000000000007, R11: 0x0000000000000051
    R12: 0x000000000000000a, R13: 0xffffff804aa59004, R14: 0xffffff800d15f1b4, R15: 0x0000000000000000
    RFL: 0x0000000000010202, RIP: 0xffffff7f80e2750d, CS:  0x0000000000000008, SS:  0x0000000000000010
    Error code: 0x0000000000000000
    Backtrace (CPU 0), Frame : Return Address
    0xffffff805e413b50 : 0xffffff8000204d15
    0xffffff805e413c50 : 0xffffff80002d1208
    0xffffff805e413da0 : 0xffffff80002e3f4a
    0xffffff805e413db0 : 0xffffff7f80e2750d
    0xffffff805e413f10 : 0xffffff7f80e7f7d3
    0xffffff805e413f30 : 0xffffff800053e46d
    0xffffff805e413f60 : 0xffffff8000285b66
    0xffffff805e413fa0 : 0xffffff80002c8527
          Kernel Extensions in backtrace (with dependencies):
             com.apple.driver.AirPort.Atheros9388(426.35.3)@0xffffff7f80e1c000->0xffffff7f80 f66fff
                dependency: com.apple.iokit.IOPCIFamily(2.6.8)@0xffffff7f80804000
                dependency: com.apple.iokit.IO80211Family(320.1)@0xffffff7f80df7000
                dependency: com.apple.iokit.IONetworkingFamily(1.10)@0xffffff7f80ddd000
    BSD process name corresponding to current thread: kernel_task
    Mac OS version:
    10K549
    Kernel version:
    Darwin Kernel Version 10.8.0: Tue Jun  7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64
    System model name: iMac12,2 (Mac-942B59F58194171B)
    System uptime in nanoseconds: 4614091555750
    unloaded kexts:
    com.apple.driver.AppleUSBUHCI          4.2.5 (addr 0xffffff7f80969000, size 0x65536) - last unloaded 128892379106
    loaded kexts:
    com.apple.filesystems.afpfs          9.7.1 - last loaded 1016854024083
    com.apple.nke.asp_tcp          5.0
    com.apple.filesystems.smbfs          1.6.7
    com.apple.filesystems.autofs          2.1.0
    com.apple.driver.AGPM          100.12.31
    com.apple.driver.AppleHWSensor          1.9.3d0
    com.apple.driver.AudioAUUC          1.57
    com.apple.driver.AppleUpstreamUserClient          3.5.7
    com.apple.driver.AppleMikeyHIDDriver          1.2.0
    com.apple.driver.AppleMCCSControl          1.0.26
    com.apple.Dont_Steal_Mac_OS_X          7.0.0
    com.apple.driver.AppleMikeyDriver          2.0.8f3
    com.apple.kext.ATIFramebuffer          6.4.2
    com.apple.driver.AppleIntelHDGraphics          6.4.2
    com.apple.driver.AudioIPCDriver          1.1.6
    com.apple.driver.AppleHDA          2.0.8f3
    com.apple.ATIRadeonX3000          6.4.2
    com.apple.iokit.AppleBCM5701Ethernet          3.0.8b2
    com.apple.driver.AirPort.Atheros9388          426.35.3
    com.apple.driver.ACPI_SMC_PlatformPlugin          4.7.0a1
    com.apple.driver.AppleLPC          1.5.1
    com.apple.driver.AppleBacklight          170.0.48
    com.apple.kext.AppleSMCLMU          1.5.2d10
    com.apple.driver.AppleIntelSNBGraphicsFB          6.4.2
    com.apple.driver.AppleBluetoothMultitouch          54.3
    com.apple.driver.AppleUSBCardReader          2.6.1
    com.apple.driver.AppleIRController          303.8
    com.apple.iokit.SCSITaskUserClient          2.6.9
    com.apple.iokit.IOAHCIBlockStorage          1.6.6
    com.apple.driver.AppleFWOHCI          4.7.7
    com.apple.driver.AppleUSBHub          4.2.5
    com.apple.BootCache          31.1
    com.apple.AppleFSCompression.AppleFSCompressionTypeZlib          1.0.0d1
    com.apple.driver.AppleEFINVRAM          1.4.0
    com.apple.driver.AppleAHCIPort          2.2.0
    com.apple.driver.AppleUSBEHCI          4.2.6
    com.apple.driver.AppleACPIButtons          1.3.6
    com.apple.driver.AppleRTC          1.3.1
    com.apple.driver.AppleHPET          1.5
    com.apple.driver.AppleSMBIOS          1.7
    com.apple.driver.AppleACPIEC          1.3.6
    com.apple.driver.AppleAPIC          1.4
    com.apple.driver.AppleIntelCPUPowerManagementClient          142.6.0
    com.apple.security.sandbox          1
    com.apple.security.quarantine          0
    com.apple.nke.applicationfirewall          2.1.14
    com.apple.driver.AppleIntelCPUPowerManagement          142.6.0
    com.apple.driver.AppleProfileReadCounterAction          17
    com.apple.driver.AppleProfileTimestampAction          10
    com.apple.driver.AppleProfileThreadInfoAction          14
    com.apple.driver.AppleProfileRegisterStateAction          10
    com.apple.driver.AppleProfileKEventAction          10
    com.apple.driver.AppleProfileCallstackAction          20
    com.apple.iokit.IOSurface          74.2
    com.apple.iokit.IOBluetoothSerialManager          2.4.5f3
    com.apple.iokit.IOSerialFamily          10.0.3
    com.apple.driver.DspFuncLib          2.0.8f3
    com.apple.iokit.IOAudioFamily          1.8.3fc2
    com.apple.kext.OSvKernDSPLib          1.3
    com.apple.driver.AppleSMBusController          1.0.10d0
    com.apple.driver.AppleBluetoothHIDKeyboard          141.5
    com.apple.driver.AppleHIDKeyboard          141.5
    com.apple.iokit.IOFireWireIP          2.0.4
    com.apple.iokit.AppleProfileFamily          41
    com.apple.driver.AppleHDAController          2.0.8f3
    com.apple.iokit.IOHDAFamily          2.0.8f3
    com.apple.driver.ApplePolicyControl          3.0.17
    com.apple.driver.AppleGraphicsControl          3.0.17
    com.apple.iokit.IO80211Family          320.1
    com.apple.iokit.IONetworkingFamily          1.10
    com.apple.driver.IOPlatformPluginFamily          4.7.0a1
    com.apple.driver.AppleSMBusPCI          1.0.10d0
    com.apple.driver.AppleBacklightExpert          1.0.2
    com.apple.iokit.IONDRVSupport          2.2.1
    com.apple.driver.AppleSMC          3.1.0d5
    com.apple.driver.AppleThunderboltEDMSink          1.1.3
    com.apple.driver.AppleThunderboltEDMSource          1.1.3
    com.apple.kext.ATI6000Controller          6.4.2
    com.apple.kext.ATISupport          6.4.2
    com.apple.iokit.IOGraphicsFamily          2.2.1
    com.apple.driver.IOBluetoothHIDDriver          2.4.5f3
    com.apple.driver.AppleMultitouchDriver          207.11
    com.apple.driver.AppleThunderboltDPOutAdapter          1.5.9
    com.apple.driver.AppleThunderboltDPInAdapter          1.5.9
    com.apple.driver.AppleThunderboltDPAdapterFamily          1.5.9
    com.apple.driver.AppleThunderboltPCIDownAdapter          1.2.1
    com.apple.iokit.IOUSBMassStorageClass          2.6.7
    com.apple.iokit.IOSCSIBlockCommandsDevice          2.6.9
    com.apple.iokit.IOUSBHIDDriver          4.2.5
    com.apple.driver.BroadcomUSBBluetoothHCIController          2.4.5f3
    com.apple.driver.AppleUSBBluetoothHCIController          2.4.5f3
    com.apple.iokit.IOBluetoothFamily          2.4.5f3
    com.apple.iokit.IOSCSIMultimediaCommandsDevice          2.6.9
    com.apple.iokit.IOBDStorageFamily          1.6
    com.apple.iokit.IODVDStorageFamily          1.6
    com.apple.iokit.IOCDStorageFamily          1.6.1
    com.apple.driver.XsanFilter          402.1
    com.apple.iokit.IOAHCISerialATAPI          1.2.6
    com.apple.iokit.IOSCSIArchitectureModelFamily          2.6.9
    com.apple.driver.AppleThunderboltNHI          1.3.2
    com.apple.iokit.IOThunderboltFamily          1.7.4
    com.apple.driver.AppleUSBMergeNub          4.2.5
    com.apple.driver.AppleUSBComposite          3.9.0
    com.apple.iokit.IOFireWireFamily          4.2.7
    com.apple.iokit.IOUSBUserClient          4.2.4
    com.apple.iokit.IOAHCIFamily          2.0.7
    com.apple.iokit.IOUSBFamily          4.2.6
    com.apple.driver.AppleEFIRuntime          1.4.0
    com.apple.iokit.IOHIDFamily          1.6.6
    com.apple.iokit.IOSMBusFamily          1.1
    com.apple.security.TMSafetyNet          6
    com.apple.kext.AppleMatch          1.0.0d1
    com.apple.driver.DiskImages          289
    com.apple.iokit.IOStorageFamily          1.6.3
    com.apple.driver.AppleACPIPlatform          1.3.6
    com.apple.iokit.IOPCIFamily          2.6.8
    com.apple.iokit.IOACPIFamily          1.3.0
    Model: iMac12,2, BootROM IM121.0047.B1F, 4 processors, Intel Core i5, 2.7 GHz, 4 GB, SMC 1.72f1
    Graphics: AMD Radeon HD 6770M, AMD Radeon HD 6770M, PCIe, 512 MB
    Memory Module: global_name
    Bluetooth: Version 2.4.5f3, 2 service, 19 devices, 0 incoming serial ports
    Network Service: Ethernet, Ethernet, en0
    Serial ATA Device: ST31000528AS, 931.51 GB
    Serial ATA Device: OPTIARC DVD RW AD-5680H
    USB Device: FaceTime HD Camera (Built-in), 0x05ac  (Apple Inc.), 0x850b, 0xfa200000 / 3
    USB Device: Hub, 0x0424  (SMSC), 0x2514, 0xfa100000 / 2
    USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0xfa110000 / 4
    USB Device: Bluetooth USB Host Controller, 0x05ac  (Apple Inc.), 0x8215, 0xfa111000 / 6
    USB Device: Hub, 0x0424  (SMSC), 0x2514, 0xfd100000 / 2
    USB Device: IR Receiver, 0x05ac  (Apple Inc.), 0x8242, 0xfd120000 / 4
    USB Device: Internal Memory Card Reader, 0x05ac  (Apple Inc.), 0x8403, 0xfd110000 / 3
    What is going on with this error?

    It hasn't been acting up since I:
    1) Since I unplug my all in one printer with wifi (Hewlett Packard).  I barely use the printer and it keeps cleaning out the jets and wasting my **** ink.  Plus it'll do a loud self test @ 3:00 in the morning & by this time, I pulled my baseball bat from under the bed and ready to smash some skulls in the office room thinking its a burglar.
    But seriously it stop doing it. 
    This is a late reply but confirmed after 7 months.
    Note:  I shut down instead of sleep my Imac now because I hardly use it.

  • After Time Machine backs up my file vault files (after logging out), when I next log into the user account it beachballs permanently during log in.

    After Time Machine backs up my file vault files (after logging out), when I next log into the user account it beachballs permanently during log in.  The backup was successful, as I had to restore after this issue last time.  Hard resetting doesn't resolve the issue.  Is there a Time Machine setting that I should be aware of?
    I have 2011 13" MBP, 10.6.8 and use an external hard drive connected via USB for my Time Machine backups.
    Thanks

    I was able to get it to work.  Thanks for your help.  It's unfortunate the two applications do not work well together.  This is what I did:
    1) Safe boot and logged into the affected user (since the whole issue damaged the account's system settings).
    2) Turned off File Vault in System Preferences. I needed to make some space on the hard drive first since apparently the total free space on the hard drive has to equal or exceed the amount of data currently in the file vault.  I deleted some files and moved others to the Admin account.  This whole process took awhile.
    3) Finally, just restarted and logged in.  The next time machine backup seems to be a significant backup, I assume because it's backing up the user account in a different way now that File Vault is turned off.
    Thanks again!

  • After logging out of mozilla firefox i cannot log back in to mozilla firefiox , why ?

    after logging out of Mozilla Firefox
    I can't log back in
    why ?
    please help me

    This just happened to me too. But I've been on iTunes Match for several months now. I've had the problem several times before where ITM says something's "not available at this time; try again later," and at those times I've had to sign out of my iTunes Store account and back in for ITM to work again.
    But this time, when I tried to turn on iTunes Match again, I got this error (on my screen right now):
    iTunes match is matching a library from another computer. Only one library can be matched at a time. If you continue, the other iTunes Match session will be stopped and this computer's library will be matched instead. Buttons: [Cancel] [Match this computer]
    Well, I surely do NOT want to "Match this computer", as I have several thousand songs in iCloud that are NOT on this computer!
    What is going on???

  • How to stop the gray wheel from spinning after logging out

    how to stop the gray wheel from spinning after logging out?

    Frank ...
    Make sure to quit all open applications before logging out.
    Your proflie indicates your Mac has v10.7.1 installed.
    If that is the case, updating your system software will help as far as functionaly as well as security.
    Install the OS X Lion Update 10.7.5 (Client Combo)
    Then restart your Mac.
    message edited by:  cs

  • New to the Apple and I want to set up a user account that will not delete the guest users files and allow and preserve their personal settings after log out. Is this possible?

    New to the Apple and I want to set up a user account that will not delete the guest users files and allow and preserve their personal settings after log out. Is this possible?

    The built-in guest user account will not do this. Simply create a new standard account and call it "Guest" or "Guest Users" or whatever you like.
    Go to System Preferences > Users& Groups, click "+" to make a new account.

  • Getting Error 500 when pressing the backbutton of the browser after log out

    I am working on a web project , and am using AJAX in my application. I need to get list of templates and events stored in the database when my page is being loaded so im using AJAX. the problem is, when i press the logout in my page and after logging out if i press the browsers back button then im getting the Http Error 500.
    Regarding this issue i previously also posted but i havent get solved my problem. (may be i havent posted my source code , rather i just posted error message.).
    Here is the error message of the browser,
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    java.lang.NullPointerException
         com.koffee.eon.subscriber.action.TemplateNames.doPost(TemplateNames.java:66)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:416)
    Here is my source code of the TemplateNames class,
    package com.koffee.eon.subscriber.action;
    import com.koffee.eon.subscriber.persistence.*;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    import java.text.SimpleDateFormat;
    import java.util.*;
    public class TemplateNames extends HttpServlet {
    public void doPost(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException {
         response.setContentType("text/html");
         PrintWriter out = response.getWriter();
         String html="",html1="";
         HttpSession session=request.getSession();
         UserCompleteDetails sessionDetails=(UserCompleteDetails)session.getAttribute("userdetails");
         System.out.println("checking session after logout"+sessionDetails);
         if(sessionDetails==null)
         System.out.println("session details in if condition is:"+sessionDetails);
         response.sendRedirect("/login.jsp");
         System.out.println("after checking "+sessionDetails);
         String type=null;
         type=request.getParameter("type");
    String subscriberUserEONId=sessionDetails.getUserEonId();
    System.out.println("subscriberUserEONId from session is: "+subscriberUserEONId);
         SimpleDateFormat sdfDate=new SimpleDateFormat("yyyy-MM-dd");
         SimpleDateFormat sdfTime=new SimpleDateFormat("HH:mm:ss");
         TemplateManagement dbObj=new TemplateManagement();          
    EventManager dbObj1=new EventManager(); // for events
         List templateNames=dbObj.getTemplates(subscriberUserEONId);
         List eventIds=dbObj1.getEventsCompleteList(subscriberUserEONId); // for events
         System.out.println("size of list of templates is:" + templateNames.size());
         System.out.println("size of list of events is: "+eventIds.size()); // for events
         if(type==null)
         html+="<table><tr><td>Select Your Invitation Card: ";
         html+="<select name=\"templateName\" class=\"cell\" onchange=getImage(this.value) onblur=checkTemplate() tabindex=\"1\">";
         html+= "<option value=\"0\">Select</option>";
         HashMap hmap=new HashMap();
         try {
         for(int i=0;i<templateNames.size();i++) {
         TemplateMaster bean=(TemplateMaster)templateNames.get(i);
         Integer templateid=bean.getTemplateId();
         String templatepath=bean.getTemplateRelevantpath();
         hmap.put(templateid,templatepath);
         System.out.println("path recevied from db for template is: "+templatepath);
    System.out.println("template id received from db is : "+templateid);
         html+= "<option value=\"" + templateid + "\">" + templateid + "</option>";
         } catch(Exception ee) {ee.printStackTrace();}
         session.setAttribute("hmap", hmap);
         html+="</select></td></tr><tr><td>";
         System.out.println("path new is : "+html);
         html+="</td>";
         System.out.println(html);
    html+="</td></tr><tr><td>Select an Event: ";
              html+="<select name=\"eventId\" class=\"cell\">";
              try {
         for(int j=0;j<eventIds.size();j++) {
         EventMaster bean=(EventMaster)eventIds.get(j);
         String eventName=bean.getEventName();
         Integer eventId1=bean.getEventId();
         String eventStartDate=sdfDate.format(bean.getEventStartdate());
         String eventStartTime=sdfTime.format(bean.getEventStarttime());
         String eventId=eventName+" on "+eventStartDate+" at "+eventStartTime;
         System.out.println("event id from database is : "+eventId1);
         System.out.println("event list from database is : "+eventId);
         html+= "<option value=\"" + eventId1 + "\">" + eventId + "</option>";
         } catch(Exception eee) {eee.printStackTrace();}
         html+="</select></td></tr></table>";
         System.out.println(html);
         out.println(html);
         out.flush();
         out.close();     
         if(type!=null)
         html1+="</td></tr><tr><td>Select an Event: ";
         html1+="<select name=\"eventId\" class=\"cell\">";
         try {
         for(int j=0;j<eventIds.size();j++) {
         EventMaster bean=(EventMaster)eventIds.get(j);
         Integer eventId1=bean.getEventId();
    String eventId2=eventId1.toString();
         String eventName=bean.getEventName();
         String eventStartDate=sdfDate.format(bean.getEventStartdate());
         String eventStartTime=sdfTime.format(bean.getEventStarttime());
         String eventId=eventName+" on "+eventStartDate+" at "+eventStartTime;
         System.out.println(eventId);
         html1+= "<option value=\""
    + eventId2 + "\">" + eventId + "</option>";
         } catch(Exception eee) {eee.printStackTrace();}
         html1+="</select></td></tr></table>";
         out.println(html1);
         out.flush();
         out.close();     
    }

    chinni wrote:
    java.lang.NullPointerException
         com.koffee.eon.subscriber.action.TemplateNames.doPost(TemplateNames.java:66)Do you understand when a NPE will be thrown? Some object reference at line 66 of TemplateNames.java is null while you didn't expect and you still invoke/access it. To fix this, add a nullcheck or just instantiate the reference.

  • How to prevent Spaces from creating a new session after logging out

    Hi,
    I'm using WebCenter Spaces (11.1.1.4), and I notice that the user is redirected to the landing page after logging out which causes a new HTTP session to be created. I'd like to avoid this behavior, and I was told that this could be done by creating a custom logout page with pure HTML and redirect the user there upon logout. How do I go about doing this? I couldn't find anything related to this in the documentation.
    Thanks,
    Robert

    What's wrong with a new session?
    When you logout, the current session will be destroyed so it's just normal that he creates a new webcenter that does not contain a user credential.

  • Preventing the User from going back to the main page after logging out.

    Hi all,
    In my project I want to prevent the User from going back to the Main page, by clicking the back button of the browser, after the user has loggged out.I had invalidated the session so the user will not be able to do any operations, but he can vew the infos. I want to redirect to the login page if the user tries to go back using the back button after he has logged out.
    I tried the same in this forum after loging out. Surprisingly it is the same. I can browse through all the operations i did even after logging out from here.
    Is it not possible to do that in Servlets?Could somebody help?
    Thanks,
    Zach.

    Hi,
    You can use a servlet filter to do this , as it can interceptany request to your application you can decide to allow user access or not to any page/servlet.
    public class Test implements Filter{
         public void destroy() {
         public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain arg2) throws IOException,
                   ServletException {
              System.out.println("filter");
              HttpServletRequest request = (HttpServletRequest) arg0;
              if(!request.getRequestURI().contains("index")){ // set condition that will be checked to verify if the user is logged in
                   System.out.println("redirecting ... ");
                   RequestDispatcher d = arg0.getRequestDispatcher("/index.jsp");
                   d.forward(arg0, arg1);
              arg2.doFilter(arg0, arg1);
         public void init(FilterConfig arg0) throws ServletException {
    }in you web.xml add :
    <filter>
              <filter-name>test</filter-name>
              <filter-class>test.Test</filter-class>
         </filter>
         <filter-mapping>
              <filter-name>test</filter-name>
              <url-pattern>/*</url-pattern>
         </filter-mapping>

Maybe you are looking for