ConcurrentHashMap shared with 2 threads

Hello Guys,
I would be really happy if you could help me.
I am having a main program which creates a ConcurrentHashMap and adds key-value pairs to this CHM.
A second thread should iterate over this CHM at the same time and delete expired entries (right now all values mod5 = 0). Unfortunately every time the second thread finds an expired entry, it deletes all elements saved in this list.
What can I do to make this work?
Here the code of my testing program:
//### MAIN #####
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
public class Main {
      * @param args
     public static void main(String[] args) {
          ConcurrentHashMap<Integer, TestContainer> chm = new ConcurrentHashMap<Integer, TestContainer>();
          TestContainer tc = new TestContainer(0,0);
          CleanerThread cleanT = new CleanerThread(chm);
          cleanT.start();
          for(int i = 0; i < 100; i++){
               tc.index = i;
               tc.value = (int) (Math.random()*10);
               System.out.println("1 Thread: Creating ["+tc.index+"="+tc.value+"]");
               chm.put(i, tc);
               System.out.println(chm.size());
               try {
                    Thread.sleep(1000);
               } catch (InterruptedException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
//### Thread ###
import java.util.Iterator;
public class CleanerThread extends Thread {
     ConcurrentHashMap<Integer, TestContainer> chm;
     Iterator it;
     public CleanerThread(ConcurrentHashMap<Integer, TestContainer> chm) {
          this.chm = chm;
     @Override
     public void run() {
          TestContainer tc;
          while (true) {
               it = chm.values().iterator();
               while (it.hasNext()) {
                    tc = (TestContainer) it.next();
                    if ((tc.value % 5) == 0) {
                         System.out.println("2 Thread: Removing ["+tc.index+"="+tc.value+"]");
                         it.remove();
               try {
                    Thread.sleep(3000);
               } catch (InterruptedException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
//### Container ###
public class TestContainer {
     public int index;
     public int value;
     public TestContainer(int index, int value) {
          super();
          this.index = index;
          this.value = value;
/*### Output ###
1 Thread: Creating [0=6]
1 Thread: Element count = 1
1 Thread: Creating [1=9]
1 Thread: Element count = 2
1 Thread: Creating [2=4]
1 Thread: Element count = 3
1 Thread: Creating [3=2]
1 Thread: Element count = 4
1 Thread: Creating [4=4]
1 Thread: Element count = 5
1 Thread: Creating [5=5]
1 Thread: Element count = 6
2 Thread: Removing [5=5]
2 Thread: Removing [5=5]
2 Thread: Removing [5=5]
2 Thread: Removing [5=5]
2 Thread: Removing [5=5]
2 Thread: Removing [5=5]
1 Thread: Creating [6=4]
1 Thread: Element count = 1
1 Thread: Creating [7=6]
1 Thread: Element count = 2
1 Thread: Creating [8=3]
1 Thread: Element count = 3
1 Thread: Creating [9=0]
1 Thread: Element count = 4
1 Thread: Creating [10=6]
1 Thread: Element count = 5
1 Thread: Creating [11=4]
1 Thread: Element count = 6
1 Thread: Creating [12=8]
1 Thread: Element count = 7
1 Thread: Creating [13=9]
1 Thread: Element count = 8
1 Thread: Creating [14=1]
1 Thread: Element count = 9
1 Thread: Creating [15=8]
1 Thread: Element count = 10
1 Thread: Creating [16=7]
1 Thread: Element count = 11
1 Thread: Creating [17=3]
1 Thread: Element count = 12
1 Thread: Creating [18=6]
1 Thread: Element count = 13
1 Thread: Creating [19=3]
1 Thread: Element count = 14
1 Thread: Creating [20=3]
1 Thread: Element count = 15
1 Thread: Creating [21=4]
1 Thread: Element count = 16
1 Thread: Creating [22=7]
1 Thread: Element count = 17
1 Thread: Creating [23=3]
1 Thread: Element count = 18
1 Thread: Creating [24=5]
1 Thread: Element count = 19
1 Thread: Creating [25=8]
1 Thread: Element count = 20
1 Thread: Creating [26=3]
1 Thread: Element count = 21
1 Thread: Creating [27=9]
1 Thread: Element count = 22
1 Thread: Creating [28=1]
1 Thread: Element count = 23
1 Thread: Creating [29=1]
1 Thread: Element count = 24
1 Thread: Creating [30=3]
1 Thread: Element count = 25
1 Thread: Creating [31=5]
1 Thread: Element count = 26
1 Thread: Creating [32=9]
1 Thread: Element count = 27
1 Thread: Creating [33=2]
1 Thread: Element count = 28
1 Thread: Creating [34=9]
1 Thread: Element count = 29
1 Thread: Creating [35=2]
1 Thread: Element count = 30
1 Thread: Creating [36=3]
1 Thread: Element count = 31
1 Thread: Creating [37=8]
1 Thread: Element count = 32
1 Thread: Creating [38=2]
1 Thread: Element count = 33
1 Thread: Creating [39=9]
1 Thread: Element count = 34
1 Thread: Creating [40=0]
1 Thread: Element count = 35
1 Thread: Creating [41=7]
1 Thread: Element count = 36
1 Thread: Creating [42=1]
1 Thread: Element count = 37
1 Thread: Creating [43=1]
1 Thread: Element count = 38
1 Thread: Creating [44=5]
1 Thread: Element count = 39
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
2 Thread: Removing [44=5]
1 Thread: Creating [45=9]
1 Thread: Element count = 1
1 Thread: Creating [46=5]
1 Thread: Element count = 2
1 Thread: Creating [47=4]
1 Thread: Element count = 3
1 Thread: Creating [48=5]
1 Thread: Element count = 4
*/

Actually the session is closed as soon as I delete the key-value pair out of the map. If we get back to my example, you think all I need to do is this to have it concurrent (sounds almost to easy :) )?
public class CleanerThread extends Thread {
     ConcurrentHashMap<Integer, TestContainer> chm;
     Iterator it;
     public CleanerThread(ConcurrentHashMap<Integer, TestContainer> chm) {
          this.chm = chm;
     @Override
     public void run() {
          TestContainer tc;
          while (true) {
               it = chm.values().iterator();
               while (it.hasNext()) {
                    tc = (TestContainer) it.next();
                    if ((tc.value % 2) == 0) {
                         System.out.println("2 Thread: Removing ["+tc.index+"="+tc.value+"]");
                         //it.remove();
                                        //HERE
                         chm.remove(tc.index, tc);
                                                //or chm.remove(tc.index);
                                        //TO HERE
               try {
                    Thread.sleep(10000);
               } catch (InterruptedException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
}Edited by: Varox on Aug 14, 2008 5:19 AM

Similar Messages

  • Another "This itunes account is set up to use family sharing with a different icloud account than Apple ID "

    I saw another thread on the matter but thought I would post because the circumstances are different. Here is how it happened.
    I have had an Apple Store account for years and until recently our family has only had our one Mac and my iPhone 4. Thus any purchases we have made on the Apple App Store were made only with this account.
    We recently purchased two iPhone 5S's--one for my wife and one for my daughter. Neither had Apple IDs so first we set up my wife's iPhone and created an Apple ID for her. Next we used the Family Sharing feature to set up an account for our "under age 13" daughter.
    Because I am still waiting for my iPhone 6 Plus to arrive, and because the iPhone 4 cannot upgrade to iOS 8, and because my Apple ID is the only account with any apps that have been purchased in prior years, I set up my wife as the Family Organizer but when I set up her account, I chose the option to "share purchases from a different account" and entered the information for my Apple ID.
    My daughter is able to view my prior purchases on her iPhone, but when my wife tries to view my prior purchases, she receives the message "This iTunes account is set up to use Family Sharing with a different iCloud account than <her Apple ID>."
    I hope Apple is reading this. I would be more than willing to help them on this one as this feature is one of the main reasons I put our family on iPhones.

    I had this problem. I finally figured it out yesterday. Try this:
    On the device that is having trouble seeing purchases, go to Settings>iCloud>Family Sharing> Then tap on the user of the device you are on. Under "Family Purchases" make sure it has the AppleID of the person for that device. Mine originally had my husbands AppleID in there (he is the Organizer), but I changed it to mine. That doesn't make it so that the purchases are under me. The purchases remained under my husband, but my ID had to be in this spot for it to work.
    After that, I closed settings, then I went to Settings>iTunes and App Store> click on the AppleID and Sign Out, even if it has the right AppleID in there. Then Sign In again using the AppleID of the person on that device. Again-- even if it has the right ID in there to start, still sign out and back in.
    See if they show up. If they don't show up still, try doing a restart (hold down power button and home button until it restarts).
    They should show up by then, but if they don't, at that point, try to go into iCloud and Sign Out and back in.
    I think the key is having the right ID in "Family Purchases". I hope this works for you.

  • In finder, it says that I am shared to a pc which I didn't know about nor do i know the pc, how do I stop sharing with it?

    In finder, it says that I am shared to a pc which I didn't know about nor do i know the pc, how do I stop sharing with it?

    I gather that you are seeing other "pee-seas" (and | other hosts) in MAC OSX Finder UI under SHARED ? T/F ??  The Finder is reflecting what others are sharing.
    In any case consider these items:
    1) Other hosts on your network (local) have ITEMS (folders and structures) that they themselves are sharing
    with anyone on there network and to others outside who will access them via a specic host nae or address. KInda like your mate who has some files he wants to share with you. You connect to his host (machine) either by a host name (yourmate.com), an IP address (33.33.33.11) or on your local area network usually over Bonjour (yourmates_macbookair.local).
    Simply THEY ARE sharing their stuff with you and this your MACs FINDER makes then apear under the SHARED parion of the side bar in the UI. This is likely what you are seeing
    microsoft platforms have their users share DIRECTORIES mainly through the SHARING properties for that opject. YEp.. and then you can at a minimum SEE it . HOwever this doesnt mean you can access the contents.... This is all familiar to most.. nothing to be concerned about.
    Probably no need for concern.....
    (IMO), its amazing the number of PC users that unknowingly expose their folder contents on a hotel WIFI or ETHERNET network... its astonishing....!
    2) YOUR CONCERN that you are sharing your stuff:
    I'll hazard a guess that form you minmal description that you may feel that others on your network can SEE YOUR STUFF?? Bt Default, any user can see ANYTHING you have put in your ~/Public folder (theis is your Public folder in your home directory. Usually they can ONLY read whats there unless you have gone out of your way to change the ACCESS CONTROL LIST (ACL) to an access for others other than READ ONLY.
    An extention so to speak of this sharing is the concept of a "DROP BOX" that is also maintained by default in your homes public folder (~/Public/Drop Box). This is very useful for people to GIVE you their files by DROPPING then into this ~/Public/Drop Box folder.
    So THIS folder is exposed for all to see on your local network.
    How to stop anyone seeing anything?.. easy..
    Step 1: go to SYSTEM PREFERENCES/Sharing/ and UNTICK the  "File Sharing" service. Its probably already unticked. This will stop exposing anything that you have shared to others. pee-sea users may need your to enable SMB/CIFS TO READ YOUR STUFF. YOU WONT HAVE THIS ENABLED UNLESS YOU DID IT YOURSELF. Additionally there are windows .apps to read mac file systems too... so stopping all fie sharing will do the trick
    Step 1.1: if you dont want others to see your ~/Public folder either then simply select the Public folder in your finder, open the Finder inspector (+i), open the disclosure triangle for "sharing and permissions" and then set the access by others to "NO ACCESS"
    Step 2: while you are in SYSTEM PREFERENCES/Sharing/ and UNTICK the  "Remote Login" and "Screen Sharing" services. Its very likely already unticked. This will stop exposing remote services such as ssh and vnc anything that you have shared to others.
    Step 3: for extra go to SYSTEM PREFERENCES/Security/Firewall and enable any setting for network here that you want to disable or filter... seek out these apple discussion forums.. tonnes of stuff here on his.
    Others reading this thread will also have good advice and opinions.
    Post your results for others to see.
    Warwick
    Hong Kong

  • Is there a permissions system in Cloud Files for sharing with peers?

    My organization is interested in migrating to Creative Cloud, and a large part of that would be to replace the generic online file storage system that we currently use to store assets and graphics files.  I understand that files belong to individuals, however my question is about sharing with a limited set of individuals...
    For instance, if an employee uploads some assets received from a client, and these assets are needed by a team, but due to IP contracts it's important they aren't accessible to anyone else, is this possible using Cloud Files? 
    In addition, say a group of employees is working on a Photoshop file, and one person needs to make a change that everyone else needs before they may continue working on it.  Is it possible for one employee to lock the file so nobody else can modify it until the lock is released?
    Thanks, I look forward to your answers!

    This will be possible once improved sharing and collaboration are released. This will be soon by is not yet available. You will see several threads in the forums of customers requesting folder sharing. Folder sharing will be one part of it, but also there will be private sharing with specific individuals.
    Currently you can only share individual files and the shared url is public.

  • Iphoto 9.6 is not sharing with Facebook,iMessage,iCloud and is not working for print orders

    iphoto 9.6 on yosemite is deleting all of the pics from the former library, iphoto 9.6 can't share with Facebook despite that it is oke with the account. no sharing with iMessage and no sharing with iCloud possible the choices stay grey. also print orders are not possible it's stay also grey.

    gombaig wrote:
    I had the same issue too, email, facebook, Twitter  ect, all greyed out.
    What ist the solution?
    Did you read the thread?
    here is one
    I had the same issue, email, iMessage, Facebook,etc.. plus print all greyed out. I went up to the File menu, clicked on the Switch to Library drop down. Since I only have one library it was already selected, hit choose and all of the functions work again. Seems the system wasn't acknowledging my original library once I updated to Yosemite or 9.6. Either way, it works now.
    If that does not work here is another suggestion
    Try repair permissions with Disk Utility.
    LN

  • File/Directory Sharing With Team Members

    Is file/directory sharing with team members going to be added or should I be using dropbox or some other utility to provide this functionality?    This would seem like a MANDATORY requirement for teams that are geographically dispersed such as mine.   Of course a versioning system on top of this would also be of great help.
    Comments?

    There are various threads around here regarding this.
    Some examples:
    Eric_v3
    How do I share a folder in creative cloud, I know how to share individual files..
    http://forums.adobe.com/thread/1207446?tstart=870
    Jorgen K
    Creative Cloud does not allow me to share files
    http://forums.adobe.com/message/5632926#5632926
    kakluttz
    How do I share files via cloud with my teammates?
    http://forums.adobe.com/thread/1152807?tstart=330
    Conclusion: Right now you could as well use Dropbox or similar services…
    Uwe

  • SMB Sharing with Sharing Only Account

    Is there any way to activate SMB sharing with a Sharing Only account? I've created a Sharing Only account but when I go into the Sharing prefs pane under SMB it only lists normal accounts, not the Sharing Only accounts.

    I'm having a similar problem...only with FTP. I created several "Sharing Only" accounts and none of them are able to connect via FTP. I'm able to connect via FTP as a user with a standard account though.
    Other posts about a similar problem:
    http://discussions.apple.com/thread.jspa?messageID=5749529&#5749529
    http://discussions.apple.com/thread.jspa?messageID=5770089&#5770089
    http://discussions.apple.com/thread.jspa?messageID=5794988&#5794988
    http://discussions.apple.com/thread.jspa?messageID=5682121&#5682121
    Error reads "User xxxxxxx may not use FTP" when I try to connect via Transmit.

  • No home sharing with out Apple have your credit card !!!!!!!!!

    Is there soneone out there - that know how to enable home sharing - with out give up your credit card information to Apple !!!!!
    This goes for the Apple ID - that need to "setup" (read give more money to Apple) - and wants your credit card info to complete
    and it seem like if your skip that part in the Apple ID part - your can not use Home sharing

    Thanks, for telling us how to get an Apple ID without a credit card [sarcasm].
    I found out be someone other than an Apple employee how to get an Apple ID without using a credit card...
    You register for the Apple ID by going through your iTunes application instead of going straight to the internet via a browser. There will be a "NONE" icon to click, right next to the credit cards and Pay Pal icons, on the credit card page of the registration. That's how I FINALLY was able to get my Apple ID so I can use Home Sharing for my AppleTV.
    Just to show how cheap the reply was to my question above [via Slash_Gordon/the account that won't allow me into the Apps Store, and won't give me a workable Apple ID for Home Sharing]... Apple sent me a cheap reply today, leading me to this useless conversation thread which had no answer to my problem, which now has the answer in this comment>>
    Go to the iTunes Store through your iTunes application [not your internet browser] > Click on "App Store" at top of page > Click on "Sign In" > A small window opens > Click on "Create Apple ID" > another page will appear in the iTunes application > Click on "Continue" > Agree to their "Terms and Conditions" by checking the "agree" square > Then click on "Agree" > Fill out all the "Provide Apple ID Details" on the next page > Then click on the "NONE" on the credit card/PayPal page and fill out the rest below... not the credit card info, though... finish up. That "NONE" icon is the key, which doesn't appear when we try to register via an internet browser.
    It seems, Apple is purposely being vague so they can get credit card info. I wish they would prove it isn't true by actually giving me the needed info in my email, instead of leading me to a converstion thread which had no solution to the problem. They should have a Support page giving the solution... of course, they'll say they do have one, and really don't. Well, now you have the solution right here, thanks to someone that gave me the solution when I Googled long enough for it.

  • Macs and file sharing with Panasonic Lumix TS5

    I'm trying to set up this camera to send my photos wirelessly to my IMAC but have hit a brick wall.  The instructions with the camera state wifi sharing is supported with OS X 10.4 to 10.8, and I am running 10.75.  The instructions are simple: find the file and enable sharing.  I've completed all the steps, and my camera finds my Imac fine, but then cannot find the shared folder.
    I researched this and found that for a different Panasonic camera, despite what panasonic says, file sharing did not work for mac only environments. (http://www.dpreview.com/forums/thread/3360154). I have contacted panasonic, and am beginning to believe the this is true for my camera as well.  I explained my problem and she first recommended to sign up for a lumix account.  Then it went from here:
    Kerry-Ann W.: In the setup it states where a lumix club account is required to send images to lumix club cloud
    Dave: Ok, do I understand correctly that I needed a lumix club account to transfer images wirelessly to my IMAC?
    Kerry-Ann W.: No I am not saying that. There is some sharing settings that needs to be set on your computer. We recommend that you contact apple so they can assist you in adjusting those settings.
    Dave: Ok, I've signed up for a lumix club account. Will that help me transfer my images to the mac?
    Kerry-Ann W.: We recommend that you contact apple so they can assist you in adjusting the sharing settings on your IMAC.
    Dave: Kerry-Ann, please help me. I've done exactly what the Lumix manual tells me to do with my mac and it's not working. You are supposed to help when the manual doesn't suffice. Isn't there any tips you can give me to try and make this work?
    Kerry-Ann W.: That is correct and based on checks done if it is not seeing your folders that means there needs to be some settings done on your computer for it to see the folders and if that is not done then you will not be able to see the folders.
    Dave: Ok, so will you help me get those settings done on my computer?
    Kerry-Ann W.: We recommend that you contact apple so they can assist you in adjusting those settings.
    I have no idea what settings she is referring to, and she offered no guidance at all.  Has anyone had any success file sharing with panasonic cameras?  Or has anyone else concluded this is hopeless?
    Thank you,
    Dave

    I have run through 2 of these cameras (1st one died-Epic Panasonic Fail) and I'm stoked I found the easy fix. No thanks to PaniCsonic.
    Connect your camera via USB to your MacBook. Don't worry that it won't show.
    Go to System Preferences under the 'Apple' icon (top left corner for any newbies)
    Select the 'Sharing' tab/folder (should be yellow diamond with a person walking to YOUR left direction)
    Select 'Internet Sharing'
    A sub menu 'To computers using' will open up to the right with 3 boxes/options:
    1) Firewire
    2) Ethernet
    3) Bluetooth PAN
    Select Bluetooth PAN box so it check marks as selected.
    Click the 'Internet Sharing' box.
    Select 'Start' when the prompt asks if you are sure you want to turn on Internet sharing.
    The 'Internet Sharing' box will then select.
    Your camera will then prompt you to select a USB mode. Select 'PC'.
    Wait through the access mode and VOILA, your photos will be uploaded straight to iPhoto as they should do in the first place.
    I like the camera for it's simplistic functionality. I had a slick Olympus underwater that had the same features, but was more time in navigating through them all. I don't like PaniCsonic for their poor foresight in making this camera an austosetup feature for Mac users. My iPhone didn't like it much either.
    Nonethless, there's the fix. For/from me.

  • Auto Accept with Screen Sharing with Yosemite Messages App

    I take care of many of my family and friend's Macs and I'm really excited that screen sharing with 10.10 Yosemite through iMessage. I'm wondering if anyone know of a way to enrol their Macs into auto-accepting me to control the screen without the need for them to accept it. I know there was a way to do this back in the days of iChat.

    Hi,
    In Any Finder window use the Go Menu whilst holding down the ALT key.
    Select the Library that appears and the navigate to Application Scripts/com.apple.iChat
    Double click the Auto Accept item to open in in the Script Editor (formerly AppleScript Editor)
    You will note the Text section at the top is commented out by being between (* and then the text and then *) the stars and parentheses.
    Later a single line is also commented out with a # symbol
    In iChat the section for Auto Accepting Screen Sharing used to be commentated out  (originally it was not even there)
    You might decide to comment out the other lines leaving just the bits you want.  (or Copy the AppleScript and alter the copy).
    Then you can go to Messages > Preferences > General Section and select the AppleScript as the Messages Received item.
    NOTE
    I have had issue myself with the AppleScripts as they stand  in Yosemite.
    I have tried several of those that are Included and some that I have collected from iChat and all return and error messages about timing out at present.
    Others have reported the same in various Threads here at the Apple Support Communities.
    At present there does not seem to be a work around.
    9:07 pm      Tuesday; February 24, 2015
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Site & documents shared with me

    Hello,
    I am a member of different site collection & admin shared some documents & folders from different different site collections. Is there any way so that i can see all the sites & document which is shared with me in one place like we have an app
    "Table of contents " but the problem with this app is it shows all the documents & site within a single site collection not from a different site collection.So i want something which can show all the sites & documents which is shared with
    me from different site collection in a single place.

    Hi,
    Per my knowledge, there are two method to share docuements: Share a document and require sign-in; Share a document, but don’t require sign-in.
    What you said is to the second method which is share a link to the external user.
    However, external users cannot create their own personal sites (what used to be referred to as My Sites). This means that they do not have their own SkyDrive Pro document library.
    It is impossible for external user to see all the shared documents from different site collection in a single place.
    If you’re wondering what types of users qualify as external users and what rights an external user has, see
    What is an external
    user?
    If your organization is using one of the Office 365 enterprise plans, see
    Manage external sharing
    for your SharePoint online environment.
    If still no help, for quick and accurate answers to your questions, it is recommended that you initial a new thread in Office 365 forum.
    Office 365 forum
    http://community.office365.com/en-us/forums/default.aspx
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Sharepoint foundation 2013 : After doing backup cannot access the site "Sorry, this site hasn't been shared with you"

    I am using SharePoint Foundation 2013 , i have backed up the site using powershell with the following command:
    -backup-spsite -identity http://dmsserver/sites/demo/ -path C:\SPSiteBackup.bak
    After backup finished, i can't access the site, the message "Sorry, this site hasn't been shared with you" appears, even the site administrator collection is configured coorectly, with the  Administrator account.
    Whats the problem?
    Please Advice.

    Hi husseinsa,
    According to your description, my understanding is that you could not access the site after backing up the site collection in SharePoint 2013 Foundation.
    Could you access other sites at the same site collection?
    Let’s do a troubleshooting for this issue:
    Please delete the IE cache:  IE options->General->Delete, select all checkboxes, and click Delete.
    Go to CA->Application Management->Manage web applications, select the web application which hosts the problematic site .
    Click Permisson Policy, make sure there are not any deny policies for site collection administrator and site collection auditor.
    Back to the web application list page, click User Policy, check whether there are any user policies for denying permissions.
    Change the site collection administrator or add a secondary site collection administrator in CA, then use the new site collection administrator to log in the site, compare the result.
    Open IIS, expand the server, and click application pools.
    Find the problematic web application pool, make the identity of the pool is correct, then do an IISRESET, compare the result.
    If this issue still exists, please check the log file to find more information about this issue. The path of the log file is
    : C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS.
    Or you can use Event Viewer(Start->Run->event viewer) to find the log.
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Onedrive for business: Shared with everyone issues

    I
    We've SharePoint 2013 and OneDrive for Business (on-premises..)
    When user put a file on "shared with everyone" OneDrive folder, other users can't view it... Any idea ?

    Hi  ,
    According to your description, my understanding is that “Shared with everyone” OneDrive folder does not work in your SharePoint 2013.
    For your issue, please check whether everyone has the permission of accessing “Shared with everyone” OneDrive folder.
     You can go to your OneDrive -> My Documents. Click Sharing column of “Shared with everyone” folder, make sure it is shared with everyone:
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Eric Tao
    TechNet Community Support

  • OneDrive for Business/SharePoint API - GET folders 'shared with me' if shared from a group/s.

    Does anybody have any ideas of how to get the list of folders shared with a user from a group?
    I can already retrieve files shared with a user from another user with:
    https://{tenant}-my.sharepoint.com/_api/search/query?querytext='(SharedWithUsersOWSUSER: {account_name} AND contentclass:STS_ListItem_MySiteDocumentLibrary)'
    but this end point does not show any of the files if they were shared from a group, is this possible with the REST API?
    Thanks for any help in advance.

    Hi SpringComp,
    You can change the root path for libraries you sync to your computer, though you can do this only if you’re not currently syncing any libraries. If you’re already syncing at least one library and you want to change the path, you must first
    stop syncing all libraries. Then, the first time you run the OneDrive for Business wizard to sync a library to your computer, you’ll see an option to change the location.
    More information, please refer to the link:
    http://office.microsoft.com/en-001/support/change-the-location-where-you-sync-sharepoint-libraries-on-your-computer-HA102893480.aspx
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Both my iPad and iPhone have ios8 On either device in Calendars edit shared with add person when I enter an email address and press add nothing happens - just goes back to edit screen and what I have entered has gone. No error message or any clue

    Both my iPad and iPhone have ios8
    On either device in Calendars> edit >shared with> add person when I enter an email address and press add nothing happens - just goes back to edit screen and what I have entered has gone. No error message or any clue about why I cant share my calendar. Please help.

    UDPATE:
    Spoke with Express lane, and issue was escalated.  Kudos to the support guys that handled this one (Brian and Yi).  Went through everything in detail and took all the crash dumps off the iphones and ipads to send to engineering.
    After backing up the contacts, the recommendation was to delete all contacts in  iCloud.  Doing that caused my iCloud to crash (in the browser), so more crash dumps were sent to apple.
    Eventually got all contacts deleted, then did a resync.  Looks like IOS devices are coming back to life and syncing again.
    Also, Outlook iCloud connector has just been updated to ver 1.0.1 so i installed that on their recommendation.
    BOTTOM LINE workaround:
    1. Backup contacts
    2. Delete contacts in iCloud
    3. Delete accounts on IOS devices
    4. Recreate accounts on IOS devices.
    Hoping a real root cause can be found and real fix implemented.  This has caused me to doubt the stability of iCloud, so i will procees with caution.

Maybe you are looking for

  • How to call a Forms6i file from Forms10g

    Dear all, Can any one help me on how to call a x.fmb in FORMS6i version from a y.fmb in FORMS10G version.I used CLIENT_HOST( ) buitin for calling a 6i version x.fmb from 10G version y.fmb,but its not working.I gave this CLIENT_HOST( ) built in in whe

  • CS6 - Photoshop sometimes does not save changes to Flash bitmaps

    Sorry if this is in the wrong forum, I figured I'd post it here since it involves two CS6 products in conjunction. I am creating a Flash file that has bitmaps pasted into it. Sometimes I right-click on these bitmaps and "Edit in PHotoshop CS6", make

  • HOW  wireless works? I can`t get conected to ANYWHERE WITH THE IPOD TOUCH

    I do not know how get into itunes with the ipod touch, or you tube or anywhere. Safari only displays can`t get conected to the server. I have a wireless at home Belkin 54b and i connect 1 PSP,2 Wii, 2 laptops, 1Xbox 360, 2 Nintendo DS and they all wo

  • "I got my Internal HD Full, but I've already deleted all my files"

    I got an iMac G3 and I can't do anything, no printing, no opening pdf's, no opening word, excel, pwpoint documents, no photos or music. My Internal HD sais that I got 0 available memory, but I've already deleted all my files (photos, music, docs... a

  • Flash Drop Downs - Please Help!

    THANKS in advance for the help you can provide. I am attempting to build a flash drop down navigation bar and I followed the Tutvid video tutorial on YouTube, which launched successfully - it looks wonderful! However, when I wanted to add additional