aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes URLYBird: Exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "URLYBird: Exceptions" Watch "URLYBird: Exceptions" New topic
Author

URLYBird: Exceptions

donal horgan
Ranch Hand

Joined: Mar 11, 2005
Posts: 54
Can anyone tell me what the DuplicateKeyException is about in the URLYbird project.
In what sitaution does this exception occur?

Also -- what is the SecurityException about?
Tom Henricksen
Ranch Hand

Joined: Mar 23, 2004
Posts: 136

Donal,
This looks like a common question if you search around here. This was one of the better answers I saw. I am doing the B&S and this is also question I had too.

http://www.coderanch.com/t/186868/java-developer-SCJD/certification/DuplicateKeyException

For the SecurityException my assignment says "Throws SecurityException if the record is locked with a cookie other than lockCookie." So I check the cookies and if they don't match throw the exception.

Thanks,
Tom
[ August 24, 2005: Message edited by: Tom Henricksen ]
Thomas Paul Bigbee
Ranch Hand

Joined: Jun 28, 2005
Posts: 71
There is no such thing as a DuplicateKeyException - because there is no key. The interface being used is from a previous assignment from years ago, they just reused the interface, in the old project you wrote the record number back to the database (the record number being the key), so in fact you could have a duplicate key if you read the max record number, incremented it and tried to write it back (at the same exact time as someone else creating a new record), URLYBird, has no physical keys (record numbers), only logical keys (row numbers). I did not implement this exception because there was no way to throw it.

As for the SecurityException, its not in my version of URLYBird.

Hope this helps
Tom
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URLYBird: Exceptions