The NBA has rules which allow teams to go over the cap under certain specific circumstances. To re-sign their own draftees.. or to re-sign guys who have been with their team a certain number of years. They can go over without penalty in those circumstances.. but they can go over for any reason but incur a 'luxury tax' from the league for doing so. They also are allowed one "exception" at several different defined salary levels. That's how the Lakers can be playing both Lebron and AD super max contracts and still not be "over the camp."
Thanks for the details for those of us who do not follow the NBA. This sounds like an interesting system because it rewards teams that draft well. As it should be. With the current contract structure in the NFL, if a team does well finding gems in the later rounds they get screwed because the CAP does not allow the team to keep all of them. They draft good players and watch them leave after 3 or 4 years, just as they are reaching their prime.
I have said for a while I would like to see a team have the ability to keep it's star for their entire careers rather than watch players like Montana, Emmitt, and a few others leave to finish their careers with strange teams.