Notes Ninjas Notes Ninjas
Lotus Notes hints, tips, error messages
"Error 500 HTTP Web Server: Illegal Arguments Exception"

Hint Short Cut: Add this to your code & documentation to help you find this page.
http://www.notesninjas.com/#IllegalArgumentsException or http://www.notesninjas.com/A555F9/nn.nsf/ByAlias/IllegalArgumentsException


I had a web database which gave "Error 500 HTTP Web Server: Illegal Arguments Exception" whenever a user went to the http://server/db.nsf link without first logging in.





 

Error 500
HTTP Web Server: Illegal Arguments Exception

 

The database ACL (access control list)  was:

The database should have "Default: no access, Read public documents was ticked.

The database should have "Anonymous: no access, and Read public documents was ticked.

 

The database web launch option was "Launch first document in view".

 

This was a very annoying error which occurred if the user went to http://server/db.nsf but not if the user went to

http://server/db.nsf?open&login

I think this is a feature that has been introduced into Lotus Notes versions 6 to fix a read public documents bug.

 

I solved this firstly by changing the Launch options to Open Page and then put in a redirect that opened up the document in the view directly using javascript code:

<script>
window.location.href = "/<Computed Value>/HomePageView/firstdocunid?Open&Login"

</script>

This solved the problem, but I was not happy with this, so I decided to get to the bottom of the problem:

I tried removing all the bits of the document's form in question until there was only a bit of text, but the error still came up.

I then decided to make sure the view, the form and the document were all Public Access. This worked!

To make a document public access: put this in an action button and run it on the document in Notes:

 Dim uiw As New notesuiworkspace
Dim uidoc As notesuidocument
Set uidoc = uiw.CurrentDocument

Dim doc As notesdocument    
Set doc = uidoc.Document
If doc Is Nothing Then
 Msgbox "No About document"
Else
 Dim i As notesitem
 Set i = doc.ReplaceItemValue( "$PublicAccess", "1")
 Call doc.save(True,True)
End If

Then you are sorted.

The login box will come up properly, and if the user fails or cancels a nice Authorisation form will put up a friendly message.

See capture web error forms for details on how to do that.

 

 

 

 Jump to:     Notes Tips
    Lotus Notes Index 
  Register for Tips
Previous Lotus Notes Tip 
    Next Lotus Notes Tip
Your company logo here?
Adam Foster
Free Cash Making Web Site
Free Revenue Earning Blog Site
 Free Revenue Earning Newsletter Site   
Free Search Pages Free Web stats
Free Contact Us page
Cheap .com domain names
 Need a website or 
   Lotus Notes
  problem solved?
Adam Foster
Lotus Notes and Domino 6 Programming Bible by Brian Benz, Rocky Oliver
Covers all the programming techniques, concepts, and languages used with Notes and Domino, as well as the many new features of Domino 6 Thoroughly examines the Notes and Domino role with Java, XML, Web services, and other IBM products and technologies Provides extensive code and examples, many geared to the needs of administrators High-profile authors, known to their audience through conferences and articles Companion Web site shows example applications from the book running on a live Domino server and provides code download.
See at: Amazon.co.uk | Amazon.com |